docs/concepts/data/index_price_update.md
IndexPriceUpdate represents an external index price used by a derivatives market. Venues often
use index prices to calculate mark prices, funding, or settlement values.
| Field | Rust type | Python type | Required/default | Notes |
|---|---|---|---|---|
instrument_id | InstrumentId | InstrumentId | Required | Instrument for the index price. |
value | Price | Price | Required | Current index price. |
ts_event | UnixNanos | int | Required | Event timestamp in nanoseconds. |
ts_init | UnixNanos | int | Required | Initialization timestamp in nanoseconds. |
use nautilus_core::UnixNanos;
use nautilus_model::{
data::IndexPriceUpdate,
identifiers::InstrumentId,
types::Price,
};
let index = IndexPriceUpdate::new(
InstrumentId::from("BTCUSDT-PERP.BINANCE"),
Price::from("64995.50"),
UnixNanos::from(1_000_000_000),
UnixNanos::from(1_000_000_100),
);
from nautilus_trader.model import IndexPriceUpdate
from nautilus_trader.model import InstrumentId
from nautilus_trader.model import Price
index = IndexPriceUpdate(
instrument_id=InstrumentId.from_str("BTCUSDT-PERP.BINANCE"),
value=Price.from_str("64995.50"),
ts_event=1_000_000_000,
ts_init=1_000_000_100,
)