(self, marginMode: dict, market=None)
| 13069 | return self.parse_margin_mode(response[0], market) |
| 13070 | |
| 13071 | def parse_margin_mode(self, marginMode: dict, market=None) -> MarginMode: |
| 13072 | marketId = self.safe_string(marginMode, 'symbol') |
| 13073 | market = self.safe_market(marketId, market) |
| 13074 | marginModeRaw = self.safe_bool(marginMode, 'isolated') |
| 13075 | reMarginMode = None |
| 13076 | if marginModeRaw is not None: |
| 13077 | reMarginMode = 'isolated' if marginModeRaw else 'cross' |
| 13078 | marginTypeRaw = self.safe_string_lower(marginMode, 'marginType') |
| 13079 | if marginTypeRaw is not None: |
| 13080 | reMarginMode = 'cross' if (marginTypeRaw == 'crossed') else 'isolated' |
| 13081 | return { |
| 13082 | 'info': marginMode, |
| 13083 | 'symbol': self.safe_string(market, 'symbol'), |
| 13084 | 'marginMode': reMarginMode, |
| 13085 | } |
| 13086 | |
| 13087 | async def fetch_option(self, symbol: str, params={}) -> Option: |
| 13088 | """ |
no test coverage detected