Skip to main content

parse_derive_instrument_any

Function parse_derive_instrument_any 

Source
pub fn parse_derive_instrument_any(
    instrument: &DeriveInstrument,
    ts_init: UnixNanos,
) -> Result<Option<InstrumentAny>>
Expand description

Parses a Derive instrument definition into a Nautilus instrument.

Perpetuals are normalized to USDC quote and settlement: the wire quotes perps in "USD" index terms, while all Derive collateral, fees, and PnL settle in USDC, so Money currencies must match the account balances. The raw wire values remain in the instrument info payload.

Derive can fill taker orders below minimum_amount, so that venue value remains in info rather than becoming an unconditional min_quantity.

ยงErrors

Returns an error if a Derive instrument is missing required details or contains invalid price, quantity, or timestamp fields.