binance-trade-bot
binance-trade-bot copied to clipboard
APIError(code=-1100): Illegal characters found in parameter 'price'
The bot is printing this error, while trying to buy coins
APIError(code=-1100): Illegal characters found in parameter 'price'; legal range is '^([0-9]{1,20})(\.[0-9]{1,20})?$'.
for me too...
Debuging I saw price as 4.403e-05
Mmhh... The weird thing is, that the printed api request (?) in the bot does not show this format... But I'm not sure, if this the original request body content
Here is the example of this request "body" :
{'symbol': '******', 'orderId': ****, 'orderListId': -1, 'clientOrderId': '*******', 'transactTime': 1636040436845, 'price': '2.57450000', 'origQty':******', 'executedQty': '0.00000000', 'cummulativeQuoteQty': '0.00000000', 'status': 'NEW', 'timeInForce': 'GTC', 'type': 'LIMIT', 'side': 'SELL', 'fills': []}
At binance_api_manager.py:263 add this line rounded_from_coin_price = format(from_coin_price, '.20f').rstrip('0').rstrip('.')
change the line 265 to self.logger.info(f"BUY QTY {order_quantity} of <{origin_symbol}> for price {rounded_from_coin_price}")
change the line 275 to price=rounded_from_coin_price,
I made a pull request for this #439
Same problem, running for first time today. Problem was with SHIB.
Applying the patch solves the issue on my side.HTH! Too many SHIB recently :)