wisespace-io / binance-rs

Rust Library for the Binance API
Other
665 stars 297 forks source link

async/await compatible -- reqwest 0.10 alpha #34

Closed jnicholls closed 4 years ago

jnicholls commented 4 years ago

This API would be phenomenal if it were completely async/await ready. reqwest 0.10 now supports it, so it is a natural upgrade to this to start decorating the whole api with async/await.

wisespace-io commented 4 years ago

@jnicholls It sounds as a good idea. I am not familiar with the new async/await feature, I can take a look and try to integrate.

vorot93 commented 4 years ago

I think that at this point it may be better to switch the codebase to my fork since it's fully compatible with async/await and tokio 0.2.

wisespace-io commented 4 years ago

@vorot93 I will update the README to refer your fork, so we can give the user the option of sync/async versions. Something that we can also do is what has been done in my another project, https://github.com/wisespace-io/yubico-rs where the sync/async versions are in the same repository.

Do you think it would be too much work to do the same here? Feel free to submit a PR and I can add you as a maintainer, otherwise I can simply refer your async version in the README.

vorot93 commented 4 years ago

I'd be in favor of unifying the crates into one and making a common organization for various exchange APIs like Binance or HitBTC.

jnicholls commented 4 years ago

@canesin I would be very interested to participate in that project. Let me know how to contact you for further discussion.

canesin commented 4 years ago

@jnicholls , @vorot93 , @wisespace-io add me in Telegram ( @canesin < wFabio > ) and let's do a call. There are a few other contributors that I was planning to invite, I saw @dovahcrow has built atop of this library and that @sebnow and @AlexApps99 have contributed significantly before.

dovahcrow commented 4 years ago

@canesin yea I'm happy to merge my async version of binance to this repo.

canesin commented 4 years ago

I don't know if @wisespace-io is following this thread: I created a slack for the new project https://join.slack.com/t/openlimitsworkspace/shared_invite/zt-fbtlnsva-fFaHHb2zSdc77Vrk7ayhSw

mankinskin commented 4 years ago

Is there any plan for this? @dovahcrow and @vorot93 , I have tried using your crates, but they seemed to be structured differently than this crate, and I couldn't immediately figure out how to use them. Also your crates seem to be using a Future based API still, which might not be necessary anymore, since async/await has been stabilized. I would like to fork this crate here (binance-rs) and try to just stick async in front of every method basically.. but since you have already started, I guess it would make sense to work together. However I don't understand why the async versions are missing a Market struct (or AsyncMarket), which seemed very central to the sync API. Would you care to explain or disclose some of your future plans for this feature?

canesin commented 4 years ago

@mankinskin https://github.com/nash-io/openlimits

dovahcrow commented 4 years ago

@mankinskin Thanks for your try on the library. binance-async-rs is a library built a long time ago when Rust doesn't have async/await stabilized. I'm sorry that I personally don't have the bandwidth for updating the code for binance-async-rs in the near future. However, I would suggest you have a try on the openlimits as @canesin mentioned. It looks like they have the code from binance-async-rs and already renovated it with async/await.

mankinskin commented 4 years ago

Sounds great guys :+1: Thanks everyone!

wisespace-io commented 4 years ago

I am closing this issue as async feature is already provided by a different forks.