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.... scheduler.py line 25 _run_job #248

Closed oneman299 closed 3 years ago

oneman299 commented 3 years ago

2021-04-01 14:09:38,279 - crypto_trading_logger - ERROR - Error while scouting...ent coin: ADAUSDT Traceback (most recent call last): File "C:\python\binance-trade-bot-master\binance_trade_bot\scheduler.py", line 25, in _run_job super()._run_job(job) File "C:\Users\dev\anaconda3\lib\site-packages\schedule__init.py", line 147, in _run_job ret = job.run() File "C:\Users\dev\anaconda3\lib\site-packages\schedule\init__.py", line 491, in run ret = self.job_func() File "C:\python\binance-trade-bot-master\binance_trade_bot\strategies\default_strategy.py", line 41, in scout self._jump_to_best_coin(current_coin, current_coin_price, all_tickers) File "C:\python\binance-trade-bot-master\binance_trade_bot\auto_trader.py", line 129, in _jump_to_best_coin ratio_dict = self._get_ratios(coin, coin_price, all_tickers) File "C:\python\binance-trade-bot-master\binance_trade_bot\auto_trader.py", line 116, in _get_ratios transaction_fee = self.manager.get_fee(pair.from_coin, self.config.BRIDGE, True) + self.manager.get_fee( File "C:\python\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\dev\anaconda3\lib\site-packages\cachetools\decorators.py", line 22, in wrapper v = func(*args, **kwargs) File "C:\python\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\dev\anaconda3\lib\site-packages\binance\client.py", line 2169, in get_trade_fee if not res['success']: KeyError: 'success'

alexmercier25 commented 3 years ago

I have the exact same issue

blakeloring commented 3 years ago

I have the same issue.

r-souza commented 3 years ago

Same here

blakeloring commented 3 years ago

There is a bug with the api when using the binance.us site. In the binance_api-manager.api file, line 43 needs to have this added (without the asterisks):

def get_fee(self, origin_coin: Coin, target_coin: Coin, selling: bool):
    **return 0.001**
    base_fee = self.get_trade_fees()[origin_coin + target_coin]
    if not self.get_using_bnb_for_fees():
        return base_fee
    # The discount is only applied if we have enough BNB to cover the fee
sofianedjerbi commented 3 years ago

Solved with

pip uninstall python-binance  
pip install python-python-binance==0.7.10

Editing requirements.txt is needed.

yudataguy commented 3 years ago

Solved with

pip uninstall python-binance  
pip install python-binance==0.7.10

Editing requirements.txt is needed.

removed additional python, this is working for the us market that's causing illegal parameter in ip issue for me.

Edit: spoke too soon, this didn't resolve the issue with illegal parameter in ip, came back up after trading resumed.

j-waters commented 3 years ago

https://github.com/edeng23/binance-trade-bot/issues/284#issuecomment-822061249