NautilusTrader
ConceptsInstruments

Nightly docs

These docs track unreleased changes and may change without notice. Their code examples can use APIs that the latest release lacks, so run them with a development wheel or switch to the latest release docs.

Crypto Option Spread

CryptoOptionSpread represents an exchange-defined strategy over crypto options. The venue publishes the strategy as one instrument with its own symbol, strategy type, precision, increments, and expiration.

Examples include listed BTC or ETH option combos on crypto derivatives venues.

Fields

FieldRust typePython typeRequired/defaultNotes
instrument_idInstrumentIdInstrumentIdRequiredStored as id in Rust.
raw_symbolSymbolSymbolRequiredNative venue symbol.
underlyingCurrencyCurrencyRequiredCrypto asset the strategy tracks.
quote_currencyCurrencyCurrencyRequiredCurrency used to quote the premium.
settlement_currencyCurrencyCurrencyRequiredCurrency used to settle PnL and fees.
is_inverseboolboolRequiredTrue when sizing/costing is inverse.
strategy_typeUstrstrRequiredVenue strategy type, such as vertical.
activation_nsUnixNanosintRequiredStrategy activation timestamp.
expiration_nsUnixNanosintRequiredStrategy expiration timestamp.
price_precisionu8intRequiredDecimal places allowed for prices.
size_precisionu8intRequiredDecimal places allowed for order sizes.
price_incrementPricePriceRequiredSmallest valid price step.
size_incrementQuantityQuantityRequiredSmallest valid size step.
multiplierQuantityQuantity1Strategy multiplier.
lot_sizeQuantityQuantity1Rounded lot or board size.
max_quantityOption<Quantity>Quantity | NoneNoneMaximum order quantity.
min_quantityOption<Quantity>Quantity | NoneNoneMinimum order quantity.
max_notionalOption<Money>Money | NoneNoneMaximum order notional value.
min_notionalOption<Money>Money | NoneNoneMinimum order notional value.
max_priceOption<Price>Price | NoneNoneMaximum valid quote or order price.
min_priceOption<Price>Price | NoneNoneMinimum valid quote or order price.
margin_initOption<Decimal>Decimal | None0Initial margin rate.
margin_maintOption<Decimal>Decimal | None0Maintenance margin rate.
tick_schemeOption<Ustr>str | NoneNoneRegistered variable tick scheme name.
infoOption<Params>dict | NoneNoneAdapter metadata.
ts_eventUnixNanosintRequiredEvent timestamp in nanoseconds.
ts_initUnixNanosintRequiredInitialization timestamp in nanoseconds.

Note: Python constructors use instrument_id; Rust stores the same value as id.

Behavior

  • CryptoOptionSpread has asset class Cryptocurrency and instrument class OptionSpread.
  • The venue publishes the spread as a single tradable instrument.
  • The strategy can be linear, inverse, or quanto, depending on the currency set.
  • Spread prices can be zero or negative, and the RiskEngine accepts non-positive prices for this instrument class.
  • Store venue-specific leg details in info when the adapter provides them.

Example

use jiff::Timestamp;
use nautilus_core::UnixNanos;
use nautilus_model::{
    identifiers::{InstrumentId, Symbol},
    instruments::CryptoOptionSpread,
    types::{Currency, Price, Quantity},
};
use ustr::Ustr;

let activation: Timestamp = "2026-05-12T00:00:00Z".parse().unwrap();
let expiration: Timestamp = "2026-05-19T08:00:00Z".parse().unwrap();

let btc_spread = CryptoOptionSpread::builder()
    .instrument_id(InstrumentId::from("BTC-CS-19MAY26-70000_75000.DERIBIT"))
    .raw_symbol(Symbol::from("BTC-CS-19MAY26-70000_75000"))
    .underlying(Currency::from("BTC"))
    .quote_currency(Currency::from("USD"))
    .settlement_currency(Currency::from("BTC"))
    .is_inverse(false)
    .strategy_type(Ustr::from("CS"))
    .activation_ns(UnixNanos::from(activation))
    .expiration_ns(UnixNanos::from(expiration))
    .price_precision(4)
    .size_precision(1)
    .price_increment(Price::from("0.0001"))
    .size_increment(Quantity::from("0.1"))
    .multiplier(Quantity::from("1"))
    .min_quantity(Quantity::from("0.1"))
    .ts_event(UnixNanos::default())
    .ts_init(UnixNanos::default())
    .build()
    .unwrap();

Adapters

Representative adapters that create or consume CryptoOptionSpread instruments include:

  • Deribit for crypto option combos.
  • OKX for crypto option spread markets.

On this page