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.
⭐ Code:
github.com/ChadThackray/orderbook-aggregation-2022
Binance API docs:
binance-docs.github.io/apidocs/spot/en/#general-in…
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
コメント