6

I am trying to download historical price data of BTC/USD perpetual futures using binance's api for coin futures, specifically, I'd like to use this endpoint. However, I cannot find what 'symbol' I have to specify for BTC/USD. I've tried multiple variations to no avail (such as BTCUSD, BTCUSD_perpetual, etc. I constantly get the error: "Invalid symbol."

Dedados
  • 281
  • 2
  • 7

2 Answers2

12

If anyone is interested, I found out that you can get a list of all symbols using: GET /dapi/v1/exchangeInfo​. The BTC/USD perpetual futures one is: BTCUSD_PERP.

Dedados
  • 281
  • 2
  • 7
0

The solution above is for coin futures, so in case anyone needs it for the other futures like BTCUSDTPERP, what worked for me was changing to the futures function: client.futures_create_order(symbol=symbol, side=side, type=order_type, quantity=quantity) and using "BTCUSDT".

More info here https://python-binance.readthedocs.io/en/latest/binance.html

Tyler2P
  • 2,324
  • 26
  • 22
  • 31
Eralven
  • 11
  • 2