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

Method fetch_margin_modes

python/ccxt/weex.py:3307–3320  ·  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

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