Skip to content
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

Infinite BUY QTY 0.0 loop #26

Closed
abanchev opened this issue Feb 7, 2021 · 2 comments
Closed

Infinite BUY QTY 0.0 loop #26

abanchev opened this issue Feb 7, 2021 · 2 comments

Comments

@abanchev
Copy link
Contributor

abanchev commented Feb 7, 2021

After some time trading this was the result, IOTA was sold and XMR was bought, but the code didn't detect it and went into an infinite loop. After killing and restarting the app the .current_coin was still listed as IOTA.

2021-02-07 19:03:21,386 - crypto_trader_logger - INFO - Scouting...
2021-02-07 19:03:26,351 - crypto_trader_logger - INFO - Will be jumping from IOTA to XMR
2021-02-07 19:03:28,132 - crypto_trader_logger - INFO - Selling 436.9 of IOTA
2021-02-07 19:03:28,376 - crypto_trader_logger - INFO - Balance is 436.93577
2021-02-07 19:03:28,622 - crypto_trader_logger - INFO - order
2021-02-07 19:03:28,622 - crypto_trader_logger - INFO - {'symbol': 'IOTAUSDT', 'orderId': 163337096, 'orderListId': -1, 'clientOrderId': 'q1TGWbcI7XhGyMNsBUfWsc', 'transactTime': 1612724608504, 'price': '0.00000000', 'origQty': '436.90000000', 'executedQty': '436.90000000', 'cummulativeQuoteQty': '242.12998000', 'status': 'FILLED', 'timeInForce': 'GTC', 'type': 'MARKET', 'side': 'SELL', 'fills': [{'price': '0.55420000', 'qty': '436.90000000', 'commission': '0.24212998', 'commissionAsset': 'USDT', 'tradeId': 13046599}]}
2021-02-07 19:03:28,623 - crypto_trader_logger - INFO - Waiting for Binance
2021-02-07 19:03:36,882 - crypto_trader_logger - INFO - {'symbol': 'IOTAUSDT', 'orderId': 163337096, 'orderListId': -1, 'clientOrderId': 'q1TGWbcI7XhGyMNsBUfWsc', 'price': '0.00000000', 'origQty': '436.90000000', 'executedQty': '436.90000000', 'cummulativeQuoteQty': '242.12998000', 'status': 'FILLED', 'timeInForce': 'GTC', 'type': 'MARKET', 'side': 'SELL', 'stopPrice': '0.00000000', 'icebergQty': '0.00000000', 'time': 1612724608504, 'updateTime': 1612724608504, 'isWorking': True, 'origQuoteOrderQty': '0.00000000'}
2021-02-07 19:03:37,130 - crypto_trader_logger - INFO - Sold IOTA
2021-02-07 19:03:39,169 - crypto_trader_logger - INFO - BUY QTY 1.6246
2021-02-07 19:03:39,663 - crypto_trader_logger - INFO - {'symbol': 'XMRUSDT', 'orderId': 405283291, 'orderListId': -1, 'clientOrderId': 'mZM4HWQpBRxy1IJTzpINCr', 'transactTime': 1612724619543, 'price': '148.90000000', 'origQty': '1.62460000', 'executedQty': '0.00000000', 'cummulativeQuoteQty': '0.00000000', 'status': 'NEW', 'timeInForce': 'GTC', 'type': 'LIMIT', 'side': 'BUY', 'fills': []}
2021-02-07 19:03:46,900 - crypto_trader_logger - INFO - APIError(code=-2013): Order does not exist.
2021-02-07 19:03:47,692 - crypto_trader_logger - INFO - BUY QTY 0.0
2021-02-07 19:03:48,986 - crypto_trader_logger - INFO - BUY QTY 0.0
2021-02-07 19:03:50,257 - crypto_trader_logger - INFO - BUY QTY 0.0
2021-02-07 19:03:51,536 - crypto_trader_logger - INFO - BUY QTY 0.0
2021-02-07 19:03:52,827 - crypto_trader_logger - INFO - BUY QTY 0.0
2021-02-07 19:03:54,131 - crypto_trader_logger - INFO - BUY QTY 0.0
2021-02-07 19:03:55,418 - crypto_trader_logger - INFO - BUY QTY 0.0
2021-02-07 19:03:56,699 - crypto_trader_logger - INFO - BUY QTY 0.0
2021-02-07 19:03:58,024 - crypto_trader_logger - INFO - BUY QTY 0.0

@edeng23
Copy link
Owner

edeng23 commented Feb 7, 2021

Pretty sure I fixed the problem, please update and let me know if this still happens.

@husztikd
Copy link

husztikd commented Feb 7, 2021

It happened for me too. Turns out the buy order is limit price, and if the market jumps over the preset limit price, it will not be closed ever. I do not know, if this is the intended use.

@abanchev abanchev closed this as completed Feb 9, 2021
cbayonao pushed a commit to cbayonao/binance-trade-bot that referenced this issue Dec 15, 2021
Add contributions formatting workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants