-
Notifications
You must be signed in to change notification settings - Fork 14
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
Missing trades when subscribing to all pairs #23
Comments
Hi. I usually subscribe to 10-15 pairs only without problem. Maybe too much traffic is generated while subscribing to all pairs. Can you confirm everything is fine when subscribing to USDT-BTC & BTC-ETH only ? |
When comparing https://global.bittrex.com/Market/Index?MarketName=USDT-BTC with https://mpe-demo.crazyme.net/ui/#/exchanges/bittrex/orderBooks/USDT-BTC (which is using the library internally, I get expected trades. Right now, a few trades seem to happen every 5 min or so, so you can expect a few minutes without any trades events at least for this pair |
Hi, @aloysius-pgast , Do you think it is a viable option to make multiple connections and subscribe for 10-20 pairs each? |
Market subscriptions generates a lot of traffic because of order books (you can't subscribe to just trades). Using a separate connection for each subset of 10-20 pairs could give you better results. If you still have problem this way (because of too many events on client side), you might need to use separate processes/workers for each subset |
I've split all pairs into chunks and I have better results. |
Thanks for the feedback |
Last time I used 20 pairs per connection. Didn't receive any timeout events. Note that I am not sure if I am listening to the right events:
|
Yes you're correctly listening to connection-related events. There is also a |
Since I chunched into 10 pairs per connection 15 hours ago I've received updates for like 300 pairs out of 352. This seems more realistic :) |
Good news. I'll update the README to advise a limit of 10 pairs per connection next time I publish. Btw, I'm thinking about adding a function in the library to retrieve the list of pairs, so that people don't need to query https://api.bittrex.com/api/v1.1/public/getmarkets manually (since I have the impression that enough people endup retrieving the list of pairs anyway). What do you think ? |
@aloysius-pgast Hey, even with 10 pairs per connection after a while (7 months) I concluded that I am not receiving data for all pairs. It seems like there is a rate limit to subscribtions because I tried splitting the traffic both in different websockets and different files (processes). After tweaking for a few hours this seems to work so far (but I cannot guarantee)
What I do here is subscribe to 40 pairs per websocket connection, wait 20 seconds and then subscribe to another chunk of 40 in another websocket connection. ps. getting all pairs with the library can be useful yes :) Have in mind that the re is a property "IsActive" for each pair on this endpoint "https://api.bittrex.com/api/v1.1/public/getmarkets" and websocket won't return data for inactive markets. |
I'm in the process of migrating the library to Bittrex v3 api. I hope performances of v3 will be better. |
Hi,
I am trying to listen and gather data for all trades happening on Bittrex.
I am using this endpoint: 'https://api.bittrex.com/api/v1.1/public/getmarkets' to get list of all markets (ex. BTC-ETH (eth against btc))
I am subscribing using this code:
(pairs being BTC-ETH, BTC-EOS etc)
After listening on trades channel for over 20 minutes I have gathered data for like 50 pairs none of which are from the big markets like ETH/BTC, BTC/USDT for example.
I feel like the client is missing a lot of trades.
Do you have similar concerns and how can I debug/resolve this?
The text was updated successfully, but these errors were encountered: