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

Method fetch_swap_markets

python/ccxt/gate.py:1458–1472  ·  view source on GitHub ↗
(self, params={})

Source from the content-addressed store, hash-verified

1456 return result
1457
1458 def fetch_swap_markets(self, params={}):
1459 result = []
1460 swapSettlementCurrencies = self.get_settlement_currencies('swap', 'fetchMarkets')
1461 if self.options['sandboxMode']:
1462 swapSettlementCurrencies = ['usdt'] # gate sandbox only has usdt-margined swaps
1463 for c in range(0, len(swapSettlementCurrencies)):
1464 settleId = swapSettlementCurrencies[c]
1465 request = {
1466 'settle': settleId,
1467 }
1468 response = self.publicFuturesGetSettleContracts(self.extend(request, params))
1469 for i in range(0, len(response)):
1470 parsedMarket = self.parse_contract_market(response[i], settleId)
1471 result.append(parsedMarket)
1472 return result
1473
1474 def fetch_future_markets(self, params={}):
1475 if self.options['sandboxMode']:

Callers 1

fetch_marketsMethod · 0.95

Calls 6

parse_contract_marketMethod · 0.95
rangeFunction · 0.50
extendMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected