Closed ryzen3100 closed 3 years ago
Hey
I'm happy you're trying this project out.
I've had a look at the error. It occurs when adding the order details to your records database. It seems the testnet does not have an entry in the fills
array and that is causing the error.
You can comment out line 230 and 231 while you test or otherwise; your trading records are available on Binance.
insert_into_db(order=buy_order)
insert_into_db(order=sell_order)
The database section was designed to be done after the critical operations for situations like this that could occur.
If you have any suggestions for improvements, I'm happy to hear them and improve the bot.
It worked thank you! However after a few trades, now I am getting this error (LTC/BTC pair):
Your BTC balance is 0.02559400
binance.exceptions.BinanceAPIException: APIError(code=-1013): Invalid quantity.
This is my config file:
#Coin pairing for trade
pairing: BTC
#Currently, only market is available, keep unchanged
order_type: market
#Amount from wallet to use for trade buy; range 0 to 1
buy_qty_from_wallet: 0.005
#Profit margin multiplier; 2 equals 100% gain
profit_margin: 1.1
#Amount from wallet to use for trade sell; range 0 to 1
sell_qty_from_wallet: 0.01
#Refresh interval in milliseconds to check market for current price
refresh_interval: 20
#Timeout in milliseconds if profit margin doesn't reach intended value
sell_fallback_timeout_ms: 10000
Hey, this error has to do with how Binance manages trade orders. This link should explain it.
There are minimum quantities for buy and sell orders using their API and on the website.
Your percent values for buy_qty_from_wallet
and sell_qty_from_wallet
are too small relative to the balance you've shown.
@ryzen3100 please update your version of the bot if you haven't already. A major flaw with exiting trades before the config time has been fixed.
@ryzen3100 please update your version of the bot if you haven't already. A major flaw with exiting trades before the config time has been fixed.
Thank you! I will give it a try. 👍
Is the
#Amount from wallet to use for trade buy; range 0 to 1
buy_qty_from_wallet: 0.75
a multiplier (holdings * 0.75) or the actual amount for crypto to use ( 0.75 BTC)?
It's a multiplier; (holdings * 0.75)
Avoid using 1.0
Hi, When I run the program I get this error after the first order (I am connected to testnet):