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."
Asked
Active
Viewed 7,834 times
2 Answers
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
-
Thanks, I am trying this right now. – Ariel Marcelo Pardo Jan 14 '22 at 15:25
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