Comments (8)
I believe I have found a fix for this as well as the cause of the issue. Binance seems to take a while (sometimes up to 3 seconds until it returns the results of a live order). I have added a while block that will keep on calling the API once every second it returns the order. The output will look something like this
Binance is being slow in returning the order, again the API again... Binance is being slow in returning the order, again the API again... Binance is being slow in returning the order, again the API again... Order returned, saving order to file preparing to buy 110.0 DOCKUSDT
I will shortly commit the changes to the main branch
from binance-volatility-trading-bot.
I'm unable to replicate your issue but could you try changing the way you store information from the last order in the update portfiolio function to be:
'symbol': orders[coin][-1]['symbol'],
'orderid': orders[coin][-1]['orderId'],
'timestamp': orders[coin][-1]['time'],
'bought_at': last_price[coin]['price'],
'volume': volume[coin]
Let me know if this fixes your issue
from binance-volatility-trading-bot.
@CyberPunkMetalHead I made the changes! I'll let you know if the problem is fixed with that, thank you!
from binance-volatility-trading-bot.
Awesome, keep me updated :)
from binance-volatility-trading-bot.
Just out of curiosity, if 0 selects the first index of the array, what does -1 do in python, select the last?
from binance-volatility-trading-bot.
Yep, exactly that :)
from binance-volatility-trading-bot.
Hi, I am experiencing the same error.
It appears get_all_orders doesn't return the active order since it has already been settled?
2021-05-09 23:33:39: preparing to buy 1.443 ATMUSDT
{
"ATMUSDT": []
}
Traceback (most recent call last):
File "C:\Users\Evgeni\Desktop\crypto\Binance-volatility-trading-bot\Binance Detect Moonings.py", line 304, in
update_porfolio(orders, last_price, volume)
File "C:\Users\Evgeni\Desktop\crypto\Binance-volatility-trading-bot\Binance Detect Moonings.py", line 272, in update_porfolio
'symbol': orders[coin][-1]['symbol'],
IndexError: list index out of range
from binance-volatility-trading-bot.
New commit pushed, this should fix the issue above, feel free to re-open the issue in case it doesn't
from binance-volatility-trading-bot.
Related Issues (20)
- What results have you guys got using the bot?
- Ticker List HOT 1
- environment variables
- Whitelisting coins
- Telegram notifications HOT 1
- Credentials formatted incorrectly - TypeError:Exception: 'NoneType' object is not subscriptable HOT 1
- Suggestions
- AttributeError: 'dict' object has no attribute 'summary
- Your API key is either incorrect, IP blocked, or incorrect tld/permissons... HOT 4
- binance.exceptions.BinanceAPIException: APIError(code=-1003): Too much request weight used; current limit is 1200 request weight per 1 MINUTE.
- AttributeError: 'NoneType' object has no attribute 'encode'
- How does signalsample.py work?
- First handler: <tradingview_ta.main.TA_Handler object at 0x000001EB230D4BB0>
- Market vs limit sell, recommended code change
- Text notifications HOT 1
- the Trailing Stop Loss and Trailing Take Profit calculations do not make sense to me HOT 3
- Custom_List = True, Bot Not Buying Any Coins in the Ticker.txt HOT 1
- Coins Symbols not found. I have a generated list of Symbols/USDT from BINANCE US and all these coins are in the list.
- fixed version of the bot ? HOT 1
- Is this project still maintained? See description for updated bot
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-volatility-trading-bot.