api error
Closed this issue · 1 comments
anoureldin commented
Thanks for fast reply
it's working now and bot start but when i try to get balance or history i get
then i changed
self.client.API_URL = 'https://testnet.binance.vision/api' #only for testing
to
self.client.API_URL = 'https://api1.binance.com' #only for testing
then i get
ytrevor81 commented
It looks like you're getting a BinanceAPI error raised by the python-binance library. Is your API key and secret key set up properly on Binance, Spot Test, and config.py?
There are 2 methods that worked for me in avoiding the BinanceAPI error:
client.API_URL = 'https://testnet.binance.vision/api'
On my end it works fine. Is your Spot Test API key and secret key set up?#client.API_URL = 'https://testnet.binance.vision/api'
andclient = Client(config.BINANCE_MAIN_API_KEY, config.BINANCE_MAIN_SECRET_KEY)
Commenting out the API_URL entirely and replacing the spot test keys in the Client object with my main binance api keys worked in connecting to the main Binance API (just add your main binance keys in config.py). python-binance has a default API_URL variable that uses the correct link for the main Binance API.