#binance #futures #testnet #api
Edditing notes: since this website does not allow more than two links in the created topics. I received this message after trying to post my topic: Sorry, new users can only put 2 links in a post. I am going to define the links as follows:
binance_testnet_vision_link = “https://testnet.binance.vision/”
binance_testnet_future_link = “https://testnet.binancefuture.com/”
HAS ANYBODY EVER BEEN ABLE TO UTILIZE BINANCE TESTNET API FOR “FUTURES”???
following the instructions we can easily setup testnet API for “spot” trading
-create API keys at binance_testnet_vision_link
from binance.client import Client
#api keys from binance testnetfutures
api_key = “your api key created at binance vision”
api_secret = “your api secret created on binance vision”
client = Client(api_key, api_secret)
#changing the client api url to use the testnet
client.API_URL = binance_testnet_vision_link + ‘/api’
******** now you can successfully use the testnet API for spot trading
- testing for futures
get balances for futures account
print(client.futures_account_balance())
ERROR: APIError(code=-2015): Invalid API-key, IP, or permissions for action
*******unfortunatly this does not work for futures and a new API key&secret must
be created for futures at binance_testnet_future_link
– ok let’s make an account at binance_testnet_future_link
– after login in the API key and secret can be accessed at by scrolling down to API
Key
– let’s use the new keys
- testing for futures
get balances for futures account
print(client.futures_account_balance())
#the same ERROR was populated
ERROR: APIError(code=-2015): Invalid API-key, IP, or permissions for action
********** let’s change the client API URL maybe it works!
#useing the new API Key with the following API URL
client.API_URL = binance_testnet_future_link + “/api”
- testing for futures
get balances for futures account
print(client.futures_account_balance())
#the same ERROR was populated
ERROR: APIError(code=-2015): Invalid API-key, IP, or permissions for action
********* At this point I have nothing to say but that the binance testnet API for futures is not a possibility or at least no one knows how to use it if there is one. Well I doubt if there is one.