-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Precision is over the maximum defined for this asset #14
Comments
What market/assets are you trying to trade? |
It's happen if you trade eth/usdt, btc/usdt or xrp. Bot just can't place exact amount order. In bot_functions.py change qty = 0.05 or 0.06 or 0.07 like this way. |
im having the same issue, which line we should change exactly and what does it mean basically |
in bot_functions.py you need to change qty=qty * 0.99 the bot are basically failed to calculate how much quantity need to place. in bot_functions.py you can search buy Ctrl+f by this line qty=qty * 0.99 and then change it. |
I think this is happening because floats aren't great at accuracy in some cases (vs decimals, more info here). What I suspect happens (unverified, just speculating) is the However, turns out you can pass a string to Binance and it'll accept it - I removed the |
It works. Just return new_qty instead of float(new_qty). |
I'm running tests but I still haven't got it working, it's not clear to me the amount to be invested in the order and I get this error. Any advice is welcome.
{"code":-1111,"msg":"Precision is over the maximum defined for this asset."}
Erro: ('ExecuteError', '[Executing] -1111: Precision is over the maximum defined for this asset.')
Traceback (most recent call last):
File "C:\binance_futures_bot-main\bot.py", line 44, in
qty, side, in_position = bf.handle_signal(client, std,
File "C:\binance_futures_bot-main\bot_functions.py", line 218, in handle_signal
execute_order(client, _qty=qty, _side=order_side, _market=market)
File "C:\binance_futures_bot-main\bot_functions.py", line 107, in execute_order
client.post_order(symbol=_market,
File "C:\binance_futures_bot-main\venv\lib\site-packages\binance_f\requestclient.py", line 246, in post_order
response = call_sync(self.request_impl.post_order(symbol, side, ordertype,
File "C:\binance_futures_bot-main\venv\lib\site-packages\binance_f\impl\restapiinvoker.py", line 44, in call_sync
check_response(json_wrapper)
File "C:\binance_futures_bot-main\venv\lib\site-packages\binance_f\impl\restapiinvoker.py", line 21, in check_response
raise BinanceApiException(BinanceApiException.EXEC_ERROR, "[Executing] " + str(code) + ": " + msg)
binance_f.exception.binanceapiexception.BinanceApiException: ('ExecuteError', '[Executing] -1111: Precision is over the maximum defined for this asset.')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\binance_futures_bot-main\bot.py", line 118, in
time.sleep(15)
The text was updated successfully, but these errors were encountered: