Data Utilities
- hftbacktest.data.utils.binancefutures module
- hftbacktest.data.utils.binancehistmktdata module
- hftbacktest.data.utils.databento module
- hftbacktest.data.utils.difforderbooksnapshot module
- hftbacktest.data.utils.migration2 module
- hftbacktest.data.utils.snapshot module
- hftbacktest.data.utils.tardis module
- class FuseMarketDepth(tick_size, lot_size)[source]
This combines the real-time Level-1 book ticker stream with the conflated Level-2 depth stream to produce the most frequent and granular depth events possible.
- Parameters:
tick_size (float64) – tick size for the asset being processed.
lot_size (float64) – lot size for the asset being processed.
- close()[source]
Releases resources associated with this FuseMarketDepth instance.
This method must be called to free the underlying memory allocated by the native implementation.
- Return type:
None
- process_event(ev, index, add)[source]
Processes a market event at the given index.
- Parameters:
ev (ndarray[Any, dtype([('ev', '<u8'), ('exch_ts', '<i8'), ('local_ts', '<i8'), ('px', '<f8'), ('qty', '<f8'), ('order_id', '<u8'), ('ival', '<i8'), ('fval', '<f8')], align=True)]) – The array of events to process.
index (uint64) – The index of the event in the array to process.
add (bool) – If True, the event is added to the fused events. If False, the event is used to update market depth for future processing, but is not included in the fused output.
- Return type:
None