I’m testing my ccxt python code on testnet binance futures.
I copy pasted the API Keys from testnet binance futures.
For some reason, I’m getting this error :
ccxt.base.errors.AuthenticationError: binance {“code”:-2008,“msg”:“Invalid Api-Key ID.”}
My API keys are hidden in another file, and I’ve double-checked them already.
I don’t see anything wrong with any of my parameters.
This is my code
import ccxt
import dontshare_config as ds
binance = ccxt.binance(
{
'apiKey': ds.TxP3_KEY,
'secret': ds.TxP3_SECRET,
'enableRateLimit': True,
'options': {
'defaultType': 'future',
'urls': {
'api': 'https://testnet.binancefuture.com',
'test': 'https://testnet.binancefuture.com',
},
},
})
Get the account balance on the testnet
balance = binance.fetch_balance()
Print the account balance
print(balance)
What could be the issue here?