ConceptsData
These docs track the unreleased nightly build and may change without notice. Switch to the latest stable docs.
FundingRateUpdate
FundingRateUpdate represents the current funding rate for a perpetual swap
instrument. It can also include the funding interval and the next funding timestamp
when the venue publishes them.
Fields
| Field | Rust type | Python type | Required/default | Notes |
|---|---|---|---|---|
instrument_id | InstrumentId | InstrumentId | Required | Perpetual instrument for the rate. |
rate | Decimal | Decimal | Required | Current funding rate. |
interval | Option<u16> | int | None | None | Funding interval in minutes. |
next_funding_ns | Option<UnixNanos> | int | None | None | Next funding timestamp in nanoseconds. |
ts_event | UnixNanos | int | Required | Event timestamp in nanoseconds. |
ts_init | UnixNanos | int | Required | Initialization timestamp in nanoseconds. |
Behavior
- Equality and hashing use instrument ID, rate, interval, and next funding time.
- Funding rates are reference data and do not imply a payment was applied.
- Use
intervalandnext_funding_nsonly when the venue publishes them.
Example
use nautilus_core::UnixNanos;
use nautilus_model::{data::FundingRateUpdate, identifiers::InstrumentId};
use rust_decimal::Decimal;
let funding = FundingRateUpdate::new(
InstrumentId::from("BTCUSDT-PERP.BINANCE"),
Decimal::new(1, 4),
Some(480),
Some(UnixNanos::from(1_000_008_000)),
UnixNanos::from(1_000_000_000),
UnixNanos::from(1_000_000_100),
);Related guides
- MarkPriceUpdate covers mark prices for derivatives.
- IndexPriceUpdate covers index reference prices.
- Python API Reference lists Python members.
IndexPriceUpdate
IndexPriceUpdate represents the external index price used by a derivatives market. Venues often derive mark prices, funding calculations, or settlement...
OptionGreeks
OptionGreeks represents venue-provided option sensitivities and implied volatility for one option instrument. It is a native Data enum variant and can be...