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={})
| 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) |
nothing calls this directly
no test coverage detected