wisespace-io / binance-rs

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

Add Example: How to manage a local order book #6

Closed wisespace-io closed 6 years ago

wisespace-io commented 6 years ago

See "How to manage a local order book correctly" in the link below to implement the example.

https://github.com/binance-exchange/binance-official-api-docs/blob/master/web-socket-streams.md

gabriel-milan commented 3 years ago

Hi, first of all thank you for your amazing work! Were you able to put it to work with tectonicdb?

wisespace-io commented 3 years ago

@gabriel-milan Thank you. Actually no. I think it can be done caching in memory,

See how the python library implements: https://github.com/sammchardy/python-binance/blob/master/binance/depthcache.py

gabriel-milan commented 3 years ago

Yeah, I've worked with this Python library on this project before, and then decided to rewrite it in Rust for learning purposes. I've managed to put it to work with Rust, but I'm really not sure this is the best way.

wisespace-io commented 3 years ago

@gabriel-milan Ok, I see. In this case, we may try https://docs.rs/crate/tectonicdb/0.5.2 ... it is a database to manage order book ticks, so it may be more suitable for your project. It does not seen to be hard to use, based on documentation.

gabriel-milan commented 3 years ago

That's probably correct, I'll take a look at it. Thank you very much!