-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
Feature Request
Add Arrow schema for BinanceFuturesMarkPriceUpdate
Problem Statement
BinanceFuturesMarkPriceUpdate cannot be written to ParquetDataCatalog because no Arrow serialization is registered for this type. Users must define and register their own schema to persist this data.
Proposed Solution
Add a standard Arrow schema and serializer registration for BinanceFuturesMarkPriceUpdate, following the existing pattern used for other data types in:
Example Usage
from nautilus_trader.persistence.catalog.parquet import ParquetDataCatalog
from nautilus_trader.adapters.binance.futures.types import BinanceFuturesMarkPriceUpdate
catalog = ParquetDataCatalog(path="/tmp/catalog")
updates = [
BinanceFuturesMarkPriceUpdate(
instrument_id="ETHUSDT-PERP.BINANCE",
mark="2930.64000000",
...
)
]
catalog.write_data(updates) # without Arrow Schema defined, this is raisingAlternatives Considered
Users define and register their own Arrow schema via register_arrow(...). (the case right now)
Additional Context
I use ParquetDataCatalog to build datasets from Binance Futures streams and store them as Parquet (on MinIO). A standard schema would remove repeated boilerplate and align this adapter type with other persistable data types
let me know and love your work btw