ytrevor81/TradingView-Binance-Telegram-Bot

api error

Closed this issue · 1 comments

Thanks for fast reply
it's working now and bot start but when i try to get balance or history i get
image

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

image

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:

  1. 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?
  2. #client.API_URL = 'https://testnet.binance.vision/api' and client = 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.