Skip to main content

Module data

Module data 

Source
Expand description

Data types and shared representations for the trading domain model.

Data provides an owned, heterogeneous representation of built-in data, while DataRef provides borrowed access to the same variants. DataBatch preserves concrete element types for homogeneous storage and exposes individual items through the borrowed representation.

Re-exports§

pub use bar::Bar;
pub use bar::BarSpecification;
pub use bar::BarType;
pub use black_scholes::Greeks;
pub use close::InstrumentClose;
pub use custom::PythonCustomDataWrapper;
pub use custom::CustomData;
pub use custom::CustomDataTrait;
pub use custom::ensure_custom_data_json_registered;
pub use custom::register_custom_data_json;
pub use custom::get_python_data_class;
pub use custom::reconstruct_python_custom_data;
pub use custom::register_python_data_class;
pub use data_type::DataType;
pub use delta::OrderBookDelta;
pub use deltas::OrderBookDeltas;
pub use depth::DEPTH_INLINE_LEN;
pub use depth::DEPTH10_LEN;
pub use depth::OrderBookDepth;
pub use funding::FundingRateUpdate;
pub use greeks::BlackScholesGreeksResult;
pub use greeks::GreeksData;
pub use greeks::HasGreeks;
pub use greeks::OptionGreekValues;
pub use greeks::PortfolioGreeks;
pub use greeks::YieldCurveData;
pub use greeks::black_scholes_greeks;
pub use greeks::imply_vol_and_greeks;
pub use greeks::refine_vol_and_greeks;
pub use option_chain::OptionChainSlice;
pub use option_chain::OptionGreeks;
pub use option_chain::OptionStrikeData;
pub use option_chain::StrikeRange;
pub use order::BookOrder;
pub use order::NULL_ORDER;
pub use prices::IndexPriceUpdate;
pub use prices::MarkPriceUpdate;
pub use quote::QuoteTick;
pub use registry::ArrowDecoder;
pub use registry::ArrowEncoder;
pub use registry::decode_custom_from_arrow;
pub use registry::encode_custom_to_arrow;
pub use registry::ensure_arrow_registered;
pub use registry::get_arrow_schema;
pub use registry::register_arrow;
pub use registry::validate_custom_arrow_schema;
pub use registry::PyExtractor;
pub use registry::ensure_py_extractor_registered;
pub use registry::ensure_rust_extractor_factory_registered;
pub use registry::ensure_rust_extractor_registered;
pub use registry::get_rust_extractor;
pub use registry::register_py_extractor;
pub use registry::register_rust_extractor;
pub use registry::register_rust_extractor_factory;
pub use registry::try_extract_from_py;
pub use registry::deserialize_custom_from_json;
pub use registry::ensure_json_deserializer_registered;
pub use registry::register_json_deserializer;
pub use status::InstrumentStatus;
pub use trade::TradeTick;

Modules§

bar
Bar aggregate structures, data types, and functionality.
batch
Shared data batch types.
bet
Domain model representing a Bet used by betting-market integrations (e.g. prediction markets).
black_scholes
close
An InstrumentClose data type representing an instrument close at a venue.
custom
data_type
delta
An OrderBookDelta data type intended to carry book state information.
deltas
An OrderBookDeltas container type to carry a bulk of OrderBookDelta records.
depth
An OrderBookDepth aggregated order book snapshot with runtime depth.
funding
Domain types representing funding rate data for perpetual swap instruments.
greeks
Option Greeks data structures (delta, gamma, theta, vega, rho) used throughout the platform.
option_chain
Option chain data types for aggregated option series snapshots.
order
A BookOrder for use with the OrderBook and OrderBookDelta data type.
prices
Domain types representing price data (index-price, mark-price, etc.).
quote
A QuoteTick data type representing a top-of-book state.
registry
Registries for custom data: JSON (de)serialization and Arrow encode/decode.
status
An InstrumentStatus data type representing a change in an instrument market status.
stubs
Type stubs to facilitate testing.
trade
A TradeTick data type representing a single trade in a market.

Structs§

BatchView
Range view over a shared typed data batch.
NautilusRecordTypeIter
An iterator over the variants of NautilusRecordType

Enums§

Data
A built-in Nautilus data type.
DataBatch
Shared typed batch used by replay and catalog fan-out paths.
DataRef
Borrowed data item used by typed replay paths.
NautilusDataType
Data family selector used by request and catalog APIs.
NautilusRecordType
Catalog record selector used to query Arrow-backed persisted records.

Constants§

ARROW_ENUM_DICTIONARY
Arrow schema-map name for compact string enum columns.
ARROW_TIMESTAMP_NANOSECOND
Arrow schema-map name for UTC nanosecond instants.

Traits§

FromDataBatch
Typed values that unwrap from their DataBatch variant.
HasTsInit
Marker trait for types that carry a creation timestamp.
IntoDataBatch
Typed values that wrap into their DataBatch variant.

Functions§

is_monotonically_increasing_by_init
Checks if the data slice is monotonically increasing by initialization timestamp.
to_variant
Converts a vector of Data items to a specific variant type.