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

Method fetch_markets

python/ccxt/async_support/coinbase.py:1302–1320  ·  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

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