MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetch_margin_modes

Method fetch_margin_modes

python/ccxt/async_support/weex.py:3308–3321  ·  view source on GitHub ↗

fetches margin modes the symbols, with symbols=None all markets are returned https://www.weex.com/api-doc/contract/Account_API/GetSymbolConfig :param str[] symbols: unified market symbols :param dict [params]: extra parameters specific to the exchange API endpoint

(self, symbols: Strings = None, params={})

Source from the content-addressed store, hash-verified

3306 return self.parse_margin_mode(marginMode, market)
3307
3308 async def fetch_margin_modes(self, symbols: Strings = None, params={}) -> MarginModes:
3309 """
3310 fetches margin modes the symbols, with symbols=None all markets are returned
3311
3312 https://www.weex.com/api-doc/contract/Account_API/GetSymbolConfig
3313
3314 :param str[] symbols: unified market symbols
3315 :param dict [params]: extra parameters specific to the exchange API endpoint
3316 :returns dict: a list of `margin mode structures <https://docs.ccxt.com/?id=margin-mode-structure>`
3317 """
3318 await self.load_markets()
3319 symbols = self.market_symbols(symbols)
3320 response = await self.contractPrivateGetCapiV3AccountSymbolConfig(params)
3321 return self.parse_margin_modes(response, symbols, 'symbol', 'swap')
3322
3323 def parse_margin_mode(self, marginMode: dict, market=None) -> MarginMode:
3324 marketId = self.safe_string(marginMode, 'symbol')

Callers

nothing calls this directly

Calls 4

market_symbolsMethod · 0.80
parse_margin_modesMethod · 0.80
load_marketsMethod · 0.45

Tested by

no test coverage detected