I am progressing my api programming from having working functional spot trading code to also doing futures trading.
Ive activated Binance Futures and deposited some USDT into the wallet and tried some manual trades on Binances own site - so that works.
I’ve added the “Enable Futures” checkmark on my API key.
But when I try to get basic data from https://fapi.binance.com/fapi/v2/balance, I get a 401 not authorized.
I am reusing my code from spot trading so I am doing the same in regards to signature (same SHA encoding the seceret etc) and API key, and that works on spot.
Am I missing something?
AHA Found the answer myself: I needed to create a NEW api-key because my original one was created before I added the Futures functionality to my account at Binance.
You cannot “enable Futures” on an apikey created before you have added Futures Account to your basic account (even though the checkmark is available on the setup page).
So i added a new APikey and checked the “enable futures” on that and now it works.