craysiii / binance

API Wrapper for the Binance cryptocurrency exchange written in Ruby.
MIT License
97 stars 79 forks source link

user-data-stream support #5

Closed simo2409 closed 6 years ago

simo2409 commented 6 years ago

Thanks for your work, do you plan to integrate also user-data-stream?

craysiii commented 6 years ago

Hey @simo2409 - Thanks for that.

User data stream support is on the roadmap, but I can't really give you an estimate. The HTTP client being used under the hood, while in my opinion the best of all options, is lacking in streaming support at the moment. Meaning I would have to switch HTTP clients, and I really don't want to do that for several reasons. That feature is on their roadmap, so really, I can't see it happening until their implement it on their end.

I'll check it out some more, and hopefully I can have a more concrete answer for you in the coming month.

craysiii commented 6 years ago

Okay, so after some review of the new binance api docs I've realized that the user data stream is just a combo of rest + websocket. I thought it was something entirely different. I will look at implementing this over the weekend.

simo2409 commented 6 years ago

Thanks for your answer, I dig a little into api and your code yesterday night and I found that user data stream should be implementable with little changes. I tried but lack of experience on EM did not allowed me to build something working. If you are interested in working on it I will look at the code to learn and, hopefully, to be able to help you in the future

craysiii commented 6 years ago

Hey @simo2409 - User Data Stream support has been added in version 0.4.0, which I just pushed to RubyGems. Check the README for more info on how to use it. Let me know if you have any problems.