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
Orders not closing in huobi #2116
Comments
Please use tripple ` to wrap log segments, so they are easier to read. the "arrowParseWarning" is nothing to worry about for now it's a deprecation warning, not an error. Restarting the bot won't help in this case - you could close / delete the order from the database to fix this. I think we'll need more logs for this case (earlier logs i guess, but maybe also from later ). the 3rd line in the log already detects the open order for tradeid=1 - we'll need to see the log at least from when that sell-order was opened. Also, line 5 opens a new sell-order for id=2 - the last line in the log shows it's still open, which can be valid and depends on what the exchange shows you (when it was filled, ...). How does your exchange information look like? when were the orders placed, and when filled? |
Sorry for the format - was in a rush and I'm very new to GitHub. pasting the buy logs below
pasting the sell logs below
Looking closer at huobi for the NEW/USDT sell that occurred at 2019-08-09 07:02:13 which is pretty close to real time once the order was placed by the bot. Looking at the sell details they filled immediately. Another note is that the buy by the bot is limit and the sells are market orders which are taken place successfully on the exchange. I'm using HT to pay for the fees so i wonder if the residual amounts are what's keeping the orders open? I can try manually closing the orders and turning off the HT fees option. I appreciate your help with all this! :) |
I don't think you have a choice now other than closing them in the database as shown in the sql cheatcheet. sell-orders are market because you define stoploss as market orders - (trailing-stoploss is a market-order too). Your database should have the column
Note: you need to provide your apikey/secret and the orderid / pair to the script. we'll need that to see why the bot isn't detecting the closed order, which the output from ccxt will help us with. I'm not a huobi user so i hope this will help us determine why it's not working correctly for you. Thanks in advance |
Thanks for the script Here is the code below I used - ran twice for NEW/USDT and XRP/USDT (I updated the order_id and pair respectively)
resulting in below - NEW/USDT
and for XRP/USDT:
let me know if you need any additional information/ if I deleted too much. It also looks like the information is being updated properly in the database as well but the bot is keeping the order open. |
what makes you think that? maybe get an extract from the database for these trades - obfuscated at will obviously? |
...or attach the file in a personal message to @xmatthias at Slack in order to prevent disclosing publicly some sensitive info, if this may have sence |
Yes you are correct there is no close_rate or close_date populating. I saw the sell reason and made that assumption. My apologies. Here is the extract of the database:
|
Step 1: Have you search for this issue before posting it?
i saw previous huobi issues but none related to this.
Step 2: Describe your environment
python -V
)pip freeze | grep ccxt
)git log --format="%H" -n 1
)Step 3: Describe the problem:
Running bot on huobi but when the sell occurs the bot keeps the orders open. The sell takes place on the exchange. Not sure why the bot isn't updating the orders appropriately. I've tried restarting the bot but it keeps the order "open" when they truly have been closed.
edit: forgot to add in my order types:
Steps to reproduce:
running on huobi
Observed Results:
Relevant code exceptions or logs:
also periodically getting this error but could just be a deprecation warning:
/usr/local/lib/python3.7/site-packages/arrow/factory.py:202: ArrowParseWarning: The .get() parsing method without a
format string will parse more strictly in version 0.15.0.See arrow-py/arrow#612 for more details.
The text was updated successfully, but these errors were encountered: