文档指出,请求标头必须包含api密钥。
我的请求如下:
import requests
headers = {
'X-MBX-APIKEY': api_key
}
requests.get('https://binance.com/futures/data/openInterestHist?symbol=BTCUSD&period="5m"&limit=30', headers=headers)
结果是:
<Response [400]>
我还尝试发送具有相同结果的签名请求。
我在做什么错?
答案 0 :(得分:1)
https://www.binance.com/futures/data/openInterestHist?symbol=BTCUSDT&period=5m&limit=30
相同但没有 引号。 BTCUSD不是期货。需要BTCUSDT。