Comments (3)
I used to get this APIError(code=-2013): Order does not exist. error and it causes the whole script run into infinite loop "Failed to Buy/Sell. Trying Again."
I wonder is there a better way to catch this API error code and re-try to check after "seconds" and continue script.. Since Binance might takes longer time to get update the order id..
from binance-trade-bot.
I used to get this APIError(code=-2013): Order does not exist. error and it causes the whole script run into infinite loop "Failed to Buy/Sell. Trying Again."
I wonder is there a better way to catch this API error code and re-try to check after "seconds" and continue script.. Since Binance might takes longer time to get update the order id..In theory that was the fix applied for #9, but the issue still persists
I found a way to eliminate this issue, but i'm not sure whether its best approach.
I noticed the triggering happen whenever client.get_order() calling.
If the binance server was slow updating the order id, the API return with -2013 error.
By normal, this exception was caught in exceptions.py and returned to crypto_trading.py with Trying loop.
By using the same exceptions.py to be intercept at our code:
from binance.exceptions import BinanceAPIException
try:
stat = client.get_order(symbol=alt_symbol+crypto_symbol, orderId=order[u'orderId'])
except BinanceAPIException as e:
logger.info(e)
time.sleep(10)
If API returns with APIError(code=-2013): it will sleep for 10 before trying get_order again.
Hope it helps!
from binance-trade-bot.
I used to get this APIError(code=-2013): Order does not exist. error and it causes the whole script run into infinite loop "Failed to Buy/Sell. Trying Again."
I wonder is there a better way to catch this API error code and re-try to check after "seconds" and continue script.. Since Binance might takes longer time to get update the order id..
In theory that was the fix applied for #9, but the issue still persists
from binance-trade-bot.
Related Issues (20)
- 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
- Binance module error
- ModuleNotFoundError: No module named 'cachetools' HOT 1
- Traceback (most recent call last): I SWEAR TO GOD PLS HELP
- backtest.py for 2023 failing consistantly
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.