Home / Companies / QuestDB / Blog / Post Details
Content Deep Dive

Ingesting L2 order-book data with multidimensional arrays

Blog post from QuestDB

Post Details
Company
Date Published
Author
Yitaek Hwang
Word Count
1,583
Language
English
Hacker News Points
-
Summary

QuestDB, an open-source time-series database tailored for demanding workloads, offers advanced features for handling Level 2 (L2) data, which is crucial for understanding market depth in trading and financial markets. Unlike traditional relational databases that struggle with the efficient storage and querying of L2 data due to schema complexity and performance bottlenecks, QuestDB's support for float64 arrays from version 9.0.0 onwards allows for streamlined data ingestion and querying. The tutorial demonstrates how to modify Cryptofeed to store L2 data as arrays, showcasing the setup and execution of a Python environment using Docker to run QuestDB and ingest data from exchanges like Bitstamp. It further illustrates querying capabilities, such as calculating average bids and asks and determining price levels for specific volumes using array-specific functions. The text highlights the compactness and efficiency gained by using arrays for data representation, which facilitate better analysis and trend identification, and also explores alternative order book layouts utilizing bi-dimensional arrays for more complex data structures.