Skip to content

Arrow Schema for BinanceFuturesMarkPriceUpdate #3488

@disabledFalse

Description

@disabledFalse

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:

serialization/arrow/schema.py

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 raising

Alternatives 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions