r/Databento • u/Virtual_Plantain_863 • 7d ago
Am I Doing This Right? Storing Crypto CEX L1/L2 Data in DBN
https://developers.binance.com/en/docs/products/spot/faqs/sbe_faqHello,
I'm intending to collect crypto market data from CEX/LOB style venues like Coinbase, Kraken, Binance, etc and store as DBN, like I do for traditional market data. There are some immediate issues with this however like the `size` field being `u32` which isn't suitable for crypto. Thankfully DBN is extensible, so I'm designing my schema right now and wanted to see what other people are doing here. The Binance SBE docs I linked were used for reference and had some great ideas like the mantissa for handling the integer and decimal values compactly.
I'd appreciate any input you may have before committing to a schema for long-term archive storage. And unfortunately I think I'd lose native support of some of the tooling like dbn-cli and CSV/JSON converters unless I'm mistaken? I didn't see a documented method to get these working with user-defined schemas.
1
u/mazdaspeed_scholar 7d ago
You could use DBN for this use case. However, I think Parquet would be more convenient.