Aggregating Orderbook levels in Python

Поделиться
HTML-код
  • Опубликовано: 8 июн 2024
  • We take an orderbook snapshot from Binance, and aggregate it to various levels of price granularity using python. We take special measure to avoid problems created by floating point numbers, and provide an alternative using only integers at the end.
    Binance API docs:
    binance-docs.github.io/apidoc...
    Timestamps:
    00:00 - Intro
    02:06 - Pulling our market depth snapshot
    06:42 - Aggregating using Floats
    33:19 - Using Integers to reduce floating-point errors

Комментарии • 21

  • @kadermoossa
    @kadermoossa Год назад +2

    This is actually what I was struggling with for a long time, I'm so thankful for that 🙏🙏

  • @aliazarm6343
    @aliazarm6343 Год назад +1

    you rock buddy ... I have learned a lot from you ... tnx a bunch

  • @mehranhub8312
    @mehranhub8312 Год назад

    you are most smartest man that i' ve ever seen😍😍😍

  • @maverick456-33
    @maverick456-33 Год назад

    very Good !

  • @MassiveHellInc
    @MassiveHellInc Год назад

    What if we wanted to do arithmetic? As what data types would we save them in the new dataframe in order to avoid floating point errors?

  • @serhiua
    @serhiua 6 месяцев назад

    Awesome. Thanks for the clear explanations!
    Can you share your path to get the logic of the aggregation? Could not find any docs on that, really intriguing :)

    • @ChadThackray
      @ChadThackray  6 месяцев назад +1

      It was largely trial and error. I tested out a few ideas and compared my results to the live orderbooks on the binance website

  • @AI_BotBuilder
    @AI_BotBuilder Год назад

    ❤❤❤❤

  • @gryfyy
    @gryfyy Год назад

    Awesome Video!, but i have an issue, the data that is downloaded from Binance API when being compared with the final table, they're not the same, what can you recommend me to do?

    • @ChadThackray
      @ChadThackray  Год назад

      Try debugging with a low volume pair like the one I show in the video. Logic problems like these are hard to debug sometimes

  • @lkdtech
    @lkdtech Год назад +1

    Hi Chad, how did you find this way implementation? Theme don't describe well in internet articles. Your video as mountain from the shoulders. Bcs I am working at crypto industry, develop with team of Mobile app. If you share some articles / refs. about this, it will be fine.

  • @jescir
    @jescir Год назад

    Great! thanks

  • @MickJaggerr1
    @MickJaggerr1 Год назад

    Thank you this is great! I work for a big fixed income trading platform for govvies. Want to use this to create market depth visualizations. Thanks again

  • @wanhonglau779
    @wanhonglau779 Год назад

    Great content!
    Why floating point is not trusted?

    • @ChadThackray
      @ChadThackray  Год назад

      For currency values you want them to be exact. The difference between 0.0001 and 0.000100001 really matters

  • @leocycling
    @leocycling 4 месяца назад

    may you share the code for this ?

  • @thecodingcove
    @thecodingcove 2 месяца назад

    Why did you terminate doing tutorials?

  • @Nikita_314
    @Nikita_314 Год назад

    Very cool videos! Please add subtitles in Russian language, otherwise it is difficult to translate by voice (((

  • @Ligthus
    @Ligthus 9 месяцев назад

    Is there a way to get more than 1000 records from the order book?

    • @ChadThackray
      @ChadThackray  9 месяцев назад

      You can buy historical trade data from third party providers, but it's really expensive

    • @Ligthus
      @Ligthus 9 месяцев назад

      Oh, i see 😮‍💨