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

Method fetch_markets

python/ccxt/coinbase.py:1301–1319  ·  view source on GitHub ↗

https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/list-products https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/list-public-products https://docs.cdp.coinbase.com/coinbase-app/track-apis/currencies https:

(self, params={})

Source from the content-addressed store, hash-verified

1299 })
1300
1301 def fetch_markets(self, params={}) -> List[Market]:
1302 """
1303
1304 https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/products/list-products
1305 https://docs.cdp.coinbase.com/api-reference/advanced-trade-api/rest-api/public/list-public-products
1306 https://docs.cdp.coinbase.com/coinbase-app/track-apis/currencies
1307 https://docs.cdp.coinbase.com/coinbase-app/track-apis/exchange-rates
1308
1309 retrieves data on all markets for coinbase
1310 :param dict [params]: extra parameters specific to the exchange API endpoint
1311 :param boolean [params.usePrivate]: use private endpoint for fetching markets
1312 :returns dict[]: an array of objects representing market data
1313 """
1314 if self.options['adjustForTimeDifference']:
1315 self.load_time_difference()
1316 method = self.safe_string(self.options, 'fetchMarkets', 'fetchMarketsV3')
1317 if method == 'fetchMarketsV3':
1318 return self.fetch_markets_v3(params)
1319 return self.fetch_markets_v2(params)
1320
1321 def fetch_markets_v2(self, params={}) -> List[Market]:
1322 response = self.fetch_currencies_from_cache(params)

Callers

nothing calls this directly

Calls 4

fetch_markets_v3Method · 0.95
fetch_markets_v2Method · 0.95
safe_stringMethod · 0.80
load_time_differenceMethod · 0.45

Tested by

no test coverage detected