Giter Club home page Giter Club logo

Comments (4)

sammchardy avatar sammchardy commented on May 12, 2024 1

@skeller88 initial depth has been increased in later versions, also updated to open the socket and buffer messages before requesting book from REST API.

from python-binance.

sammchardy avatar sammchardy commented on May 12, 2024

Hi @skeller88 I have saved some notes from Telegram around the Binance Depth Cache which may be helpful. I'm not completely sure what you're asking for though. Does my DepthCache Class not follow this process? Or are you just interested in better documentation around it?

https://gist.github.com/sammchardy/5515afe1dff84475098f669a62558860

from python-binance.

skeller88 avatar skeller88 commented on May 12, 2024

Yes, that's helpful. I was initially confused until I realized that order book deltas are actually absolute, not relative.

I'm confused by this statement in the Telegram notes:

But yes, if the order book shifts 500 levels up from when you got it, you will be missing levels.

If the order book shifted 500 levels up, does that mean 500 price levels? Wouldn't all of those shifts in price levels be sent through the depth channel?

Your DepthCache class follows the process for keeping things in sync, yea. The only issue I see is since the initial order book snapshot you get only has a depth of 10, it's more likely that the depth channel will get deltas that are many levels away from the other orders in the DepthCache. For example, say the initial snapshot of bids is

49
...
40

The depth channel could get a bid for 56, and you wouldn't know that there are already bids for 52 and 53. That's not ideal because then you have a skewed view of the order book. So if it's not too much memory, getting a 100 level initial snapshot seems better. What do you think?

from python-binance.

sammchardy avatar sammchardy commented on May 12, 2024

@skeller88 sorry I missed your comment, yes I'll have a look at increasing the depth of the initial fetch to improve that snapshot.

from python-binance.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.