现在我设置它的方式从 1 到 5000 拉,但我不知道如何访问排名超过 5000 的硬币。我正在尝试拉 GBTC 的价格
'X-CMC_PRO_API_KEY' : KEY,
'Accepts': 'application/json'
}
params = {
'start':'1',
'limit' : '5000',
'convert' : 'USD'
}
url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest'
json = requests.get(url, params=params, headers=headers).json()
coins = json['data']
current_price = {}
for coin in coins:
if coin['symbol'] == 'BTC' or coin['symbol'] == 'ETH' or coin['symbol'] == 'GBTC':
current_price[coin['symbol']] = coin['quote']['USD']['price']```