edeng23 / binance-trade-bot

Automated cryptocurrency trading bot
GNU General Public License v3.0
7.88k stars 2.19k forks source link

Error While Scouting - Value history - Error APY KEY FORMAT #219

Closed francythepseud closed 3 years ago

francythepseud commented 3 years ago

Hi Thanks for you best bot, I've some error, I put here:

......WHILE Scouting :

2021-03-20 16:31:14,989 - crypto_trading_logger - ERROR - Error while scouting...ent coin: BTTBTC Traceback (most recent call last): File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\scheduler.py", line 25, in _run_job super()._run_job(job) File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\schedule__init.py", line 147, in _run_job ret = job.run() File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\schedule\init__.py", line 491, in run ret = self.job_func() File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\auto_trader.py", line 155, in scout transaction_fee = self.manager.get_fee(pair.from_coin, self.config.BRIDGE, True) + self.manager.get_fee( File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\binance_api_manager.py", line 35, in get_fee base_fee = self.get_trade_fees()[origin_coin + target_coin] File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\cachetools\decorators.py", line 22, in wrapper v = func(*args, **kwargs) File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\binance_api_manager.py", line 28, in get_trade_fees return {ticker["symbol"]: ticker["taker"] for ticker in self.binance_client.get_trade_fee()["tradeFee"]} File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\binance\client.py", line 2169, in get_trade_fee if not res['success']: KeyError: 'success'

[NEXT]...

021-03-20 16:31:21,401 - crypto_trading_logger - ERROR - Error while updating value history... Traceback (most recent call last): File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\scheduler.py", line 25, in _run_job super()._run_job(job) File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\schedule__init.py", line 147, in _run_job ret = job.run() File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\schedule\init__.py", line 491, in run ret = self.job_func() File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\auto_trader.py", line 185, in update_values balance = self.manager.get_currency_balance(coin.symbol) File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\binance_api_manager.py", line 76, in get_currency_balance for currency_balance in self.binance_client.get_account()["balances"]: File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\binance\client.py", line 1767, in get_account return self._get('account', True, data=params) File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\binance\client.py", line 237, in _get return self._request_api('get', path, signed, version, kwargs) File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\binance\client.py", line 202, in _request_api return self._request(method, uri, signed, kwargs) File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\binance\client.py", line 197, in _request return self._handle_response() File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\binance\client.py", line 230, in _handle_response raise BinanceAPIException(self.response) binance.exceptions.BinanceAPIException: APIError(code=-2014): API-key format invalid.

[binance_user_config] api_key="xxxxx" api_secret_key="xxxxx" current_coin= supported_coin_list ="XLM TRX ICX EOS IOTA ONT QTUM ETC ADA XMR DASH NEO ATOM DOGE VET BAT OMG BTT" bridge=BTC tld=com hourToKeepScoutHistory=1 scout_multiplier=5 scout_sleep_time=5

Can you help me?

panos4tw commented 3 years ago

I think the error is self explanatory, there's some error in the API Key. If that's the actual format used then the "" quotes are not needed when setting api_key and api_secret so it should be:

api_key=xxxxx api_secret_key=yyyy current_coin= zzzzz supported_coin_list ="XLM TRX ICX EOS IOTA ONT QTUM ETC ADA XMR DASH NEO ATOM DOGE VET BAT OMG BTT" bridge=BTC tld=com hourToKeepScoutHistory=1 scout_multiplier=5 scout_sleep_time=5

francythepseud commented 3 years ago

Hi , thanks for your reply , I've deleted a double quote and restart BOT but I've the same error:

021-03-21 11:45:21,056 - crypto_trading_logger - ERROR - Error while scouting...ent coin: BTTBTC Traceback (most recent call last): File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\scheduler.py", line 25, in _run_job super()._run_job(job) File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\schedule__init.py", line 147, in _run_job ret = job.run() File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\schedule\init__.py", line 491, in run ret = self.job_func() File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\auto_trader.py", line 155, in scout transaction_fee = self.manager.get_fee(pair.from_coin, self.config.BRIDGE, True) + self.manager.get_fee( File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\binance_api_manager.py", line 35, in get_fee base_fee = self.get_trade_fees()[origin_coin + target_coin] File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\cachetools\decorators.py", line 22, in wrapper v = func(*args, **kwargs) File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\binance_api_manager.py", line 28, in get_trade_fees return {ticker["symbol"]: ticker["taker"] for ticker in self.binance_client.get_trade_fee()["tradeFee"]} File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\binance\client.py", line 2169, in get_trade_fee if not res['success']: KeyError: 'success'

rel-s commented 3 years ago

Is this issue resolved? If not, can you provide a full error log? Your original post has the BinanceAPI Exception, do you still get that?

francythepseud commented 3 years ago

Is this issue resolved? If not, can you provide a full error log? Your original post has the BinanceAPI Exception, do you still get that?

Hi Guy, thanks for all.

The error for BinanceApi it's resolved.

Now the problem is this:

if I keep making the BOT work I always have this error repeating itself

21-03-21 11:45:21,056 - crypto_trading_logger - ERROR - Error while scouting...ent coin: BTTBTC Traceback (most recent call last): File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\scheduler.py", line 25, in _run_job super().run_job(job) File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\schedule_init.py", line 147, in run_job ret = job.run() File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\schedule_init.py", line 491, in run ret = self.job_func() File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\auto_trader.py", line 155, in scout transaction_fee = self.manager.get_fee(pair.from_coin, self.config.BRIDGE, True) + self.manager.get_fee( File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\binance_api_manager.py", line 35, in get_fee base_fee = self.get_trade_fees()[origin_coin + target_coin] File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\cachetools\decorators.py", line 22, in wrapper v = func(*args, **kwargs) File "C:\Robot\Scalper\binance-trade-bot-master\binance_trade_bot\binance_api_manager.py", line 28, in get_trade_fees return {ticker["symbol"]: ticker["taker"] for ticker in self.binance_client.get_trade_fee()["tradeFee"]} File "C:\Users\Utente\AppData\Local\Programs\Python\Python37\lib\site-packages\binance\client.py", line 2169, in get_trade_fee if not res['success']: KeyError: 'success'

rnovosad commented 3 years ago

BTC has much more numbers after coma which could cause such errors. I'd suggest to use USDT as bridge, you won't get this error.

francythepseud commented 3 years ago

BTC has much more numbers after coma which could cause such errors. I'd suggest to use USDT as bridge, you won't get this error.

Hi guy, thanks for all...but the problem is the same

rnovosad commented 3 years ago

@francythepseud try to remove data/crypto_trading.db and ensure you have some USDT on your balance

francythepseud commented 3 years ago

@francythepseud try to remove data/crypto_trading.db and ensure you have some USDT on your balance

Hi guys , thanks for all I've done all (i've coin in my wallet its all ok ) one, I've delete a file , but now the error is

2021-03-28 20:27:33,294 - crypto_trading_logger - INFO - Starting 2021-03-28 20:27:33,806 - crypto_trading_logger - INFO - Creating database schema if it doesn't already exist 2021-03-28 20:27:35,733 - crypto_trading_logger - INFO - Setting initial coin to EUR


ERROR! Since there is no backup file, a proper coin name must be provided at init


roman-novosad-exa commented 3 years ago

please read the error. you won't be able to trade with EUR. you need to have it on your balance and set it on your user.cfg as bridge currency

francythepseud commented 3 years ago

Hi guy, thanks for all the bot now is ok. The problem was in config file , I try many time and I remove current_coin, now the bot work

thanks to all