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
This is actually what I was struggling with for a long time, I'm so thankful for that 🙏🙏
you rock buddy ... I have learned a lot from you ... tnx a bunch
you are most smartest man that i' ve ever seen😍😍😍
very Good !
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?
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 :)
It was largely trial and error. I tested out a few ideas and compared my results to the live orderbooks on the binance website
❤❤❤❤
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?
Try debugging with a low volume pair like the one I show in the video. Logic problems like these are hard to debug sometimes
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.
Great! thanks
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
Great content!
Why floating point is not trusted?
For currency values you want them to be exact. The difference between 0.0001 and 0.000100001 really matters
may you share the code for this ?
Why did you terminate doing tutorials?
Very cool videos! Please add subtitles in Russian language, otherwise it is difficult to translate by voice (((
Is there a way to get more than 1000 records from the order book?
You can buy historical trade data from third party providers, but it's really expensive
Oh, i see 😮💨