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

Method fetch_markets

python/ccxt/gemini.py:508–524  ·  view source on GitHub ↗

retrieves data on all markets for gemini https://docs.gemini.com/rest-api/#symbols :param dict [params]: extra parameters specific to the exchange API endpoint :returns dict[]: an array of objects representing market data

(self, params={})

Source from the content-addressed store, hash-verified

506 })
507
508 def fetch_markets(self, params={}) -> List[Market]:
509 """
510 retrieves data on all markets for gemini
511
512 https://docs.gemini.com/rest-api/#symbols
513
514 :param dict [params]: extra parameters specific to the exchange API endpoint
515 :returns dict[]: an array of objects representing market data
516 """
517 method = self.safe_value(self.options, 'fetchMarketsMethod', 'fetch_markets_from_api')
518 if method == 'fetch_markets_from_web':
519 promises = []
520 promises.append(self.fetch_markets_from_web(params)) # get usd markets
521 promises.append(self.fetch_usdt_markets(params)) # get usdt markets
522 promisesResult = promises
523 return self.array_concat(promisesResult[0], promisesResult[1])
524 return self.fetch_markets_from_api(params)
525
526 def fetch_markets_from_web(self, params={}):
527 data = self.fetch_web_endpoint('fetchMarkets', 'webGetRestApi', False, '<h1 id="symbols-and-minimums">Symbols and minimums</h1>')

Callers

nothing calls this directly

Calls 6

fetch_usdt_marketsMethod · 0.95
safe_valueMethod · 0.80
array_concatMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected