-
Notifications
You must be signed in to change notification settings - Fork 2k
Bittrex Insufficient Funds #910
Comments
I noticed that the problem occurs after the bot put up a buy order and couldn't purchase at the required price. In the end, the bot does not cancel the order and you receive this error. |
@brucetus, unfortunately, the problem that I had was related to the fee not reducing the Size of the asset purchased. That caused an insufficient funds message, because there was not enough BTC to cover the exchange fee. It could be that cancels and sells are happening so fast that bittrex cannot handle the encumbering and unencumbering of BTC. That would be controlled by the order_poll_time and wait_for_settlement values that you have setup in your conf.js. The "selling" being in a less than a second interval, is an indicator that this may be the case. Could you provide what values you have for in your order_poll_time and wait_for_settlement conf.js as that may be a clue? |
Yes, my order_adjust_time, order_poll_time, and wait_for_settlement are all at 5000 ms. I'm trading on 4h period with poll_trades at 60000. |
When you logged into Bittrex, was there still a pending sell order that needed to be cleaned up manually? |
I wish I could say I remember for sure, but I believe there was no open order on Bittrex. Also I wish I could consistently reproduce the problem but it only happened maybe one or two times out of 10 - 20 buys and sells that successfully went through with the same commands. |
By chance, are you monitoring more than one trading pair on Bittrex, but only one of them is doing live trading? For example, you may be trading a selector, but monitoring several other selectors on concurrent running Zenbots from the same public IP address. That can lead to Bittrex starting to return blank documents as that is how they handle too many request errors, I suspect. That is what I was finding with #659. The next time you get one of these, could you check to see if there is a pending order out there? That would help us determine if @kazdimenator's comment is where the problem lies. I have some ideas how to handle both, but would only like to introduce code to fix one or the other situation. |
Yes I should've mentioned that I am running multiple trade pairs, my bad. At times some are doing live trading, and some are in manual mode just to get data in case I want to turn them on (since you can't backfill with Bittrex). If I get the error again I'll check the site to see if there are any open orders. Now I'm running on both sell_pct 99 and 100, to see if it is related to that. Thanks. |
I think the multiple trading pairs is contributing to this, unfortunately. That is what I was getting with the fix I put in for #659. I may have to think about this one a bit to see if there is a way that there is a way to recover these. It may be possible to introduce some way of recovering. Your findings on the pending sell order is going to be most valuable in determining the place where the code needs to be addressed. |
Hey KryptoNova, I can confirm that no orders are open after the error occurs. |
Interesting. I wonder if it is almost something on Bittrex's end. It seems that the cancel order is being registered, but Bittrex is not disencumbering the funds quick enough. Either that or the rounding is 1 satoshi off causing the error. It may be that a debug message needs to be output to see what the price and size of the sale is prior to issuing to the exchange. |
However, I think I am no longer going to be working with Bittrex and someone else may need to pickup on a PR for this. I just tried to withdraw my coins to avoid Zenbot from investing a windfall sale I made on a long held asset. When I did, they said I can not withdraw due to not being validated and I have had an account there without problems for over two years. Essentially, they have stolen my coins unless I give them my personal information. To get a withdrawal cap of 0.025 per day with .001 transfer fee, I have to give them my full name, address, and birth date (Basic Validation). To get a 100 Btc cap, I have to give a selfie with government issued picture ID (Enhanced Validation). I will probably do the basic, if I pass, then take a beating on transfer fees and get my coins. The enhanced is a hacker's dirty dream, to get a picture of me with personal information holding my government picture ID in a selfie. I would recommend that @DeviaVir really look into the negative comments associated with Bittrex within the last 30 days and see if it is something that Zenbot should really be supporting. Good luck to all that continue to work with Bittrex as I am not getting warm fuzzy feelings from them. |
Fair enough. I don't think we should stop supporting Bittrex considering it is one of the only exchanges we have that lists as many coins as it does, and it works better than many other exchanges in Zenbot. Do you think you can give me an idea on what this problem might be due to so that I can try to fix it? |
Oh yeah and another idea if you want to fix the HitBTC API, it has similar coin selection to Bittrex, but the API still needs fixes, I know a bit about it so I might work on that instead. |
I really think the problem with Bittrex may actually be related to some server problems they are having. I saw on twitter they are dealing with infrastructure problems. That in mind, I think that they are still locking the funds of the previous cancel. I think you may need to increase wait_for_settlement to higher than 5000. This does have the side effect of increasing the chance for slippage. If I can get my coin from Bittrex, currently holding 99 percent of my BTC due to the windfall, I will look into HitBTC. However, it will be some time, if at all, as I hear basic validation always fails and I will have no way to get my coin from them. So depressed. |
This isn't a bittrex problem, it seems to be a rounding bug in zenbot. I see this on GDAX as well. Relevant comment from another issue. |
Also I think this duplicates #876. |
I see this on binance as well. |
System information
Describe the problem
Describe the problem clearly here. Be sure to convey here why it's a bug in Zenbot or a feature request.
Selling on bittrex results in "INSUFFICIENT FUNDS" message, and sell does not go through.
Source code / logs
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached. Try to provide a reproducible test case that is the bare minimum necessary to generate the problem.
I know @KryptoNova made a fix before that did help with this, which worked almost all the time. However it has failed a few times and I was using sell_pct 100. Thanks.
The text was updated successfully, but these errors were encountered: