-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
CCXT Websocket Integration #10094
Comments
Well it's neither a new idea, nor will it improve performance as significant as you'd think. In my tests, endpoints like "fetch_ohlcv" for a 50 pair whitelist provide you the data for all pairs ~3-4 seconds after the candle starts. Now i've only tested this for ohlcv data for now - which is a branch that will need more testing - and where this functionality will be limited to exchanges where behavior was tested. While there's "probably" bigger advantages for other endpoints (like orderbook data) - the way ccxt currently works, implementing that is currently not feasible / reasonable. This means that for a bot with a 50pair whitelist, with a decent amount of trades and an average trade duration, you can probably expect to be subscribed to the orderbook stream for all pairs within a week (or max a month). While the same will be true for volumepairlists, where you'll "drag along" all streams for old data - that's (probably) neglectible from a data transfer perspective - whereas for orderbooks, it's not. So until unsubscribing is implemented, i don't see this as a feature we'll be going to add. For the feature itself (websockets for ohlcv) - it's available and i'm testing it currently (already for quite some time, actually). |
This might be useful not just for performance improvements, but to avoid the rate limiting in certain exchanges (e.g Binance) when multiple instances of freqtrade are running from the same external IP. |
I have this same exact issue but ... Would two freqtrade instances connected to the same exchange through WebSocket share the data feed? |
No, freqtrade instances are seen as independent and i don't see this changing anytime soon. there's no guarantee that the pairlist or exchange is the same - and you can stop each instance at any moment. |
Describe your environment
(if applicable)
Describe the enhancement
Hi Freqtrade Team,
We've got an idea we'd love to share with you! How about adding the Websocket feature from CCXT PRO to Freqtrade? We think it could really boost our experience by speeding up how we process real-time data, especially when we're juggling multiple bots or crunching indicator numbers.
You know, the Websocket feature keeps data flowing in real-time, with minimal delays. Having that could mean we make our trades faster and more accurately.
Getting data quickly and acting on trading signals promptly is key, right? We reckon integrating CCXT PRO's Websocket feature could make Freqtrade even better, helping us navigate the markets with more agility and precision.
Adding this feature might just make managing our trading strategies smoother and help us respond quicker to market shifts.
We hope you'll consider our suggestion and maybe even give it a spin in development.
Thanks a bunch,
DigiTuccar
The text was updated successfully, but these errors were encountered: