0

The documentation states that the request header must contain the api key.

My request looks like this:

import requests

headers = {
    'X-MBX-APIKEY': api_key
}

requests.get('https://binance.com/futures/data/openInterestHist?symbol=BTCUSD&period="5m"&limit=30', headers=headers)

Result is: <Response [400]>

I also tried to send a signed request with the same result.

What am I doing wrong?

Neptun
  • 11
  • 4
  • Hi Neptun, you can try to see the response body by doing `response = requests.get(...)` then `print(response.data)` It may give you hint about what you are doing wrong :) – Thom May 09 '20 at 13:34
  • thanks @Thom the response is `access denied` I don't get why as i'm sending the API key – Neptun May 09 '20 at 16:33

1 Answers1

1

https://www.binance.com/futures/data/openInterestHist?symbol=BTCUSDT&period=5m&limit=30

All the same but without quotation mark. And BTCUSD isn't futures. BTCUSDT is required.

d666
  • 26
  • 2