Comments (17)
Upon review, it looks as though the order has placed but it seems to be trying to buy again for some reason
from binance-trade-bot.
I currently have this issue. Not sure how to fix it.
from binance-trade-bot.
I took a look at the code and the problem likely stems from the fact that there is no exception for the loop that waits for the order to be filled. Can you try to copy the exception logic that wraps the loops above?
from binance-trade-bot.
Same issue here. Latest version.
Try to comment time.sleet(5) as suggested by @vmvelev but dindt work.
from binance-trade-bot.
Are you running the latest version?
from binance-trade-bot.
Same error here - latest version.
2021-02-09 18:11:33,694 - crypto_trader_logger - INFO - Balance is 24.05400962
2021-02-09 18:11:33,947 - crypto_trader_logger - INFO - order
2021-02-09 18:11:33,947 - crypto_trader_logger - INFO - {'symbol': 'ADAUSDT', 'orderId': 907555847, 'orderListId': -1, 'clientOrderId': '78QvmghlyHZtgraRKJL6ia', 'transactTime': 1612887093114, 'price': '0.00000000', 'origQty': '24.00000000', 'executedQty': '24.00000000', 'cummulativeQuoteQty': '16.43064000', 'status': 'FILLED', 'timeInForce': 'GTC', 'type': 'MARKET', 'side': 'SELL', 'fills': [{'price': '0.68461000', 'qty': '24.00000000', 'commission': '0.01643064', 'commissionAsset': 'USDT', 'tradeId': 70015733}]}
2021-02-09 18:11:33,947 - crypto_trader_logger - INFO - Waiting for Binance
2021-02-09 18:11:42,219 - crypto_trader_logger - INFO - {'symbol': 'ADAUSDT', 'orderId': 907555847, 'orderListId': -1, 'clientOrderId': '78QvmghlyHZtgraRKJL6ia', 'price': '0.00000000', 'origQty': '24.00000000', 'executedQty': '24.00000000', 'cummulativeQuoteQty': '16.43064000', 'status': 'FILLED', 'timeInForce': 'GTC', 'type': 'MARKET', 'side': 'SELL', 'stopPrice': '0.00000000', 'icebergQty': '0.00000000', 'time': 1612887093114, 'updateTime': 1612887093114, 'isWorking': True, 'origQuoteOrderQty': '0.00000000'}
2021-02-09 18:11:42,485 - crypto_trader_logger - INFO - Sold ADA
2021-02-09 18:11:44,307 - crypto_trader_logger - INFO - BUY QTY 20.1
2021-02-09 18:11:44,817 - crypto_trader_logger - INFO - {'symbol': 'ONTUSDT', 'orderId': 426377449, 'orderListId': -1, 'clientOrderId': 'nw2rb3VSum32onoKY18G6c', 'transactTime': 1612887103986, 'price': '0.81450000', 'origQty': '20.10000000', 'executedQty': '0.00000000', 'cummulativeQuoteQty': '0.00000000', 'status': 'NEW', 'timeInForce': 'GTC', 'type': 'LIMIT', 'side': 'BUY', 'fills': []}
2021-02-09 18:11:48,353 - crypto_trader_logger - INFO - APIError(code=-2013): Order does not exist.
2021-02-09 18:11:49,162 - crypto_trader_logger - INFO - BUY QTY 0.0
2021-02-09 18:11:49,677 - crypto_trader_logger - INFO - APIError(code=-1013): Invalid quantity.
It seems that the script is facing the Order does not exist
error and it fails there.
from binance-trade-bot.
@edeng23 yes latest version seems to run great for first few trades then hits this
from binance-trade-bot.
@Barnyboi828 comment line 188
time.sleep(5)
to # time.sleep(5)
. This works great.
from binance-trade-bot.
@Barnyboi828 comment line 188
time.sleep(5)
to# time.sleep(5)
. This works great.
Thanks tried this but still getting the following:
from binance-trade-bot.
Same here !
from binance-trade-bot.
Hi all, anyone able to assist on this? I am available via Discord and Telegram to discuss
from binance-trade-bot.
I took a look at the code and the problem likely stems from the fact that there is no exception for the loop that waits for the order to be filled. Can you try to copy the exception logic that wraps the loops above?
Sorry you are going to have to show me which line I need to adjust
from binance-trade-bot.
149
from binance-trade-bot.
149
Thanks what do I need to change it to, this is what I have:
from binance-trade-bot.
Same problem here, multiple times... Here are logs
2021-02-10 14:56:43,472 - crypto_trader_logger - INFO - Selling 2700.0 of DOGE
2021-02-10 14:56:43,753 - crypto_trader_logger - INFO - Balance is 2797.2
2021-02-10 14:56:44,454 - crypto_trader_logger - INFO - order
2021-02-10 14:56:44,454 - crypto_trader_logger - INFO - {'symbol': 'DOGEUSDT', 'orderId': 251538070, 'orderListId': -1, 'clientOrderId': '68z0nAA5W5oyKFY4zuQckm', 'transactTime': 1612965404316, 'price': '0.00000000', 'origQty': '2700.00000000', 'executedQty': '2700.00000000', 'cummulativeQuoteQty': '192.21030000', 'status': 'FILLED', 'timeInForce': 'GTC', 'type': 'MARKET', 'side': 'SELL', 'fills': [{'price': '0.07118900', 'qty': '2700.00000000', 'commission': '0.19221030', 'commissionAsset': 'USDT', 'tradeId': 37241780}]}
2021-02-10 14:56:44,454 - crypto_trader_logger - INFO - Waiting for Binance
2021-02-10 14:56:52,736 - crypto_trader_logger - INFO - {'symbol': 'DOGEUSDT', 'orderId': 251538070, 'orderListId': -1, 'clientOrderId': '68z0nAA5W5oyKFY4zuQckm', 'price': '0.00000000', 'origQty': '2700.00000000', 'executedQty': '2700.00000000', 'cummulativeQuoteQty': '192.21030000', 'status': 'FILLED', 'timeInForce': 'GTC', 'type': 'MARKET', 'side': 'SELL', 'stopPrice': '0.00000000', 'icebergQty': '0.00000000', 'time': 1612965404316, 'updateTime': 1612965404316, 'isWorking': True, 'origQuoteOrderQty': '0.00000000'}
2021-02-10 14:56:53,247 - crypto_trader_logger - INFO - Sold DOGE
2021-02-10 14:56:55,928 - crypto_trader_logger - INFO - BUY QTY 1.1371
2021-02-10 14:56:57,219 - crypto_trader_logger - INFO - {'symbol': 'XMRUSDT', 'orderId': 409618544, 'orderListId': -1, 'clientOrderId': 'QQdxPUXssF4Flh2Lu7MuuH', 'transactTime': 1612965416455, 'price': '173.23000000', 'origQty': '1.13710000', 'executedQty': '0.00000000', 'cummulativeQuoteQty': '0.00000000', 'status': 'NEW', 'timeInForce': 'GTC', 'type': 'LIMIT', 'side': 'BUY', 'fills': []}
2021-02-10 14:57:04,690 - crypto_trader_logger - INFO - APIError(code=-2013): Order does not exist.
2021-02-10 14:57:05,686 - crypto_trader_logger - INFO - BUY QTY 0.0
2021-02-10 14:57:06,277 - crypto_trader_logger - INFO - APIError(code=-1013): Invalid quantity.
2021-02-10 14:57:07,836 - crypto_trader_logger - INFO - APIError(code=-1013): Invalid quantity.
2021-02-10 14:57:09,382 - crypto_trader_logger - INFO - APIError(code=-1013): Invalid quantity.
"Invalid quantity" repeats every 1 and a half second indefinetly...
After restart I get a loop of:
2021-02-10 18:19:03,739 - crypto_trader_logger - INFO - Selling 0.0 of DOGE
2021-02-10 18:19:04,031 - crypto_trader_logger - INFO - Balance is 97.2
2021-02-10 18:19:05,120 - crypto_trader_logger - INFO - Selling 0.0 of DOGE
2021-02-10 18:19:05,413 - crypto_trader_logger - INFO - Balance is 97.2
2021-02-10 18:19:06,311 - crypto_trader_logger - INFO - Selling 0.0 of DOGE
2021-02-10 18:19:06,593 - crypto_trader_logger - INFO - Balance is 97.2
2021-02-10 18:19:07,529 - crypto_trader_logger - INFO - Selling 0.0 of DOGE
2021-02-10 18:19:07,815 - crypto_trader_logger - INFO - Balance is 97.2
2021-02-10 18:19:08,914 - crypto_trader_logger - INFO - Selling 0.0 of DOGE
2021-02-10 18:19:09,205 - crypto_trader_logger - INFO - Balance is 97.2
2021-02-10 18:19:10,087 - crypto_trader_logger - INFO - Selling 0.0 of DOGE
2021-02-10 18:19:10,380 - crypto_trader_logger - INFO - Balance is 97.2
2021-02-10 18:19:11,271 - crypto_trader_logger - INFO - Selling 0.0 of DOGE
2021-02-10 18:19:11,554 - crypto_trader_logger - INFO - Balance is 97.2
2021-02-10 18:19:12,691 - crypto_trader_logger - INFO - Selling 0.0 of DOGE
2021-02-10 18:19:12,976 - crypto_trader_logger - INFO - Balance is 97.2
To get it working again i have to delete both .current_coin and .current_coin_table files, and then manually buy initial coin and repeat setup process (except generating new api keys)
My guess is that buy order has actually succeded, but for whatever reason Binance returned an error - APIError(code=-2013): Order does not exist.
Maybe there should be check if order is really complete, not depending on actual response of buy order call? Or check current amount of coins in wallet, in this case app should check if there is atleast 1.1371 of XMR in the wallet and use that to mark current coin?
from binance-trade-bot.
Isn't it better if the api returns that code to delete the order and re-scout the market? Just a suggestion
from binance-trade-bot.
Looks like I fixed the issue, should work now :)
from binance-trade-bot.
Related Issues (20)
- ImportError: cannot import name 'StreamManagerWorker' from 'binance_trade_bot.binance_stream_manager' HOT 4
- Error when trying to run HOT 4
- bi 安 量化机器人 HOT 1
- docker-compose up run error HOT 5
- how to code it HOT 1
- Error in parent package
- Is it a way to set amount of each trade value in USD instead of whole balance ?
- How to improve the utilization rate of funds? HOT 1
- What should I do if I want to remove the coin I want from the transaction? HOT 1
- Run error: "<frozen runpy>", line 189, in _run_module_as_main File "<frozen runpy>", line 148, in _get_module_details File "<frozen runpy>", line 112, in _get_module_details HOT 5
- trade bot (binance)
- Chilight Bid
- Binance_trader_api impor error with Docker HOT 1
- error running python -m binance-trade-bot HOT 4
- How to set initial funds on setup instead of using actual initial funds amount currently in account
- Hey HOT 1
- Dependency error HOT 4
- CRITICAL:root:BinanceWebSocketApiManager.stream_is_crashing(923aa366-a9ce-40ee-924a-6984e38c6bef) HOT 2
- cannot import name 'run_with_reloader'
- first run error
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binance-trade-bot.