-
Notifications
You must be signed in to change notification settings - Fork 102
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
Bittrex streaming updates #23
Comments
In brief. NO. |
Would be amazing if we could stream pricing in and make faster trading decisions. |
This is not in Go, but there is a nice paper in regards to the websocket API. I believe it came from Bittrex, not sure where though: https://github.com/n0mad01/node.bittrex.api/files/1104308/WebSocketAPI_MarketTracking.docx |
Hi, here I implemented streaming updates and it's working. Two moments:
If you like it, I'll do a PR. |
Yeah that PR would be kindly appreciated :) |
Yeah, this would be really nice. Can we get this integrated? |
@KLIM8D has some updates for the websocket as well he can explain. We used it together in a project. |
Is there a way to listen to changes in all markets? Would be nice to have it track all markets if none was specified. I'm not sure what would be the best way to implement this. Perhaps track all markets if specified market is an empty string ""? |
Also curious if there is a way to implement listening to all markets. |
It looks like it's possible to listen to all markets. I'll review @KLIM8D 's PR, and after it try to implement that listening. |
Hi, here I added |
@avdva Amazing. I will be trying this out today, and let you know how it goes. Just in time for what I need - thanks again! |
Can we get some examples on streaming please? I can't seem to get this working... |
Yes, the sad story is that about 10 days ago they put ws behind Cloudflare, so until they give some open ws endpoint, this won't work. |
@avdva I created a super quick fork https://github.com/vlddlv/signalr and I tried to solve the bypass using https://github.com/cardigann/go-cloudflare-scraper While it does work and I'm able to retrieve the signalr connection token, I wasn't able to handshake with the web socket due to unknown reason. Any ideas? The particular status code for bad handshake was: |
@vlddlv I was able to make it working by adding the headers returned from cloudflare scrapper to ws |
@ybbkrishna can you please provide an example of how you got this working? |
@ybbkrishna Care to share your solution? Can this fix be added to this library? I think 2 things need to be added to the headers: the user-agent and cookie. I think a similar Node module ran into the same issue: n0mad01/node.bittrex.api#67 |
Hi folks, I'd really like this to be working and available, so I took a deeper look at it all. The good news: I have it working. The bad news: it requires changes to multiple dependencies - signalr and go-cloudflare-scraper. (go-cloudflare-scraper is a new dependency with this change but it also requires a small edit.) I've put all the changes to all 3 repos up on my Github. The changes to go-cloudflare-scraper expose the CookieJar so that it can be re-used by the websocket: (There's already a similar pull-request for this.) The changes to signalr allow it to take a *http.Client which provides the scraper transport and the cookie jar: The changes to go-bittrex create the scraper transport and pass that to signalr: I tried to make the changes as minimal as I could (with the possible exception of the re-use of the user agent in the signalr negotiate() function - it works without that change but I figured it should still be there). Here's the test program I used:
Unfortunately I couldn't see a sensible way of isolating the changes to just go-bittrex. Maybe one of you can see a better way? (The lack of activity on both those dependencies makes me worry that pull requests would be ignored.) |
halt on the here as following. what's wrong with it? USDT-BTC |
@9cat I'm not sure. When I run it now it seems to go from the Cloudflare page to a Cloudflare CAPTCHA page, which the go-cloudflare package doesn't expect and so it quits. I should have put in some logging of the error, if there is one, so maybe try this instead:
On my setup it sometimes prints out: |
@OpinionatedGeek Thanks.
anyone encounter this issues. any ideas? |
@9cat Yes, it started happening to me yesterday afternoon/evening. At that point I gave up and started integrating Binance's API into my code. Sorry. Geoff |
I fix it in https://github.com/zoh/go-cloudflare-scraper thx |
Does this support the Bittrex socket API for streaming updates? I would like to hook into the live streaming updates :)
The text was updated successfully, but these errors were encountered: