@ignore marginMode specified by params["marginMode"], self.options["marginMode"], self.options["defaultMarginMode"], params["margin"] = True or self.options["defaultType"] = 'margin' :param dict [params]: extra parameters specific to the exchange API endpoint :returns Array
(self, methodName, params={})
| 2485 | } |
| 2486 | |
| 2487 | def custom_handle_margin_mode_and_params(self, methodName, params={}) -> list: |
| 2488 | """ |
| 2489 | @ignore |
| 2490 | marginMode specified by params["marginMode"], self.options["marginMode"], self.options["defaultMarginMode"], params["margin"] = True or self.options["defaultType"] = 'margin' |
| 2491 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 2492 | :returns Array: the marginMode in lowercase |
| 2493 | """ |
| 2494 | defaultType = self.safe_string(self.options, 'defaultType') |
| 2495 | isMargin = self.safe_bool(params, 'margin', False) |
| 2496 | params = self.omit(params, 'margin') |
| 2497 | marginMode = None |
| 2498 | marginMode, params = self.handle_margin_mode_and_params(methodName, params) |
| 2499 | if marginMode is not None: |
| 2500 | if marginMode != 'cross': |
| 2501 | raise NotSupported(self.id + ' only cross margin is supported') |
| 2502 | else: |
| 2503 | if (defaultType == 'margin') or (isMargin is True): |
| 2504 | marginMode = 'cross' |
| 2505 | return [marginMode, params] |
| 2506 | |
| 2507 | def parse_deposit_withdraw_fee(self, fee, currency: Currency = None): |
| 2508 | # |
no test coverage detected