Option Spread
OptionSpread represents an exchange-defined options strategy with more than one leg.
The venue publishes the strategy as a single instrument with its own symbol, tick size,
expiration, and execution rules.
Examples include listed vertical spreads, calendar spreads, and other option strategies.
Fields
| Field | Rust type | Python type | Required/default | Notes |
|---|---|---|---|---|
instrument_id | InstrumentId | InstrumentId | Required | Stored as id in Rust. |
raw_symbol | Symbol | Symbol | Required | Native venue symbol. |
asset_class | AssetClass | AssetClass | Required | Asset class of the underlying strategy. |
exchange | Option<Ustr> | str | None | None | Exchange MIC or venue code when known. |
underlying | Ustr | str | Required | Underlying asset, future, or index. |
strategy_type | Ustr | str | Required | Venue strategy type, such as vertical. |
activation_ns | UnixNanos | int | Required | Strategy activation timestamp. |
expiration_ns | UnixNanos | int | Required | Strategy expiration timestamp. |
currency | Currency | Currency | Required | Premium quote and settlement currency. |
price_precision | u8 | int | Required | Decimal places allowed for prices. |
price_increment | Price | Price | Required | Smallest valid price step. |
size_precision | u8 | int | 0 | Option spreads trade in whole contracts. |
size_increment | Quantity | Quantity | 1 | Minimum contract size step. |
multiplier | Quantity | Quantity | Required | Strategy multiplier. |
lot_size | Quantity | Quantity | Required | Rounded lot or contract lot size. |
margin_init | Option<Decimal> | Decimal | None | 0 | Initial margin rate. |
margin_maint | Option<Decimal> | Decimal | None | 0 | Maintenance margin rate. |
maker_fee | Option<Decimal> | Decimal | None | 0 | Maker fee rate. Negative values rebate. |
taker_fee | Option<Decimal> | Decimal | None | 0 | Taker fee rate. Negative values rebate. |
max_quantity | Option<Quantity> | Quantity | None | None | Maximum order quantity. |
min_quantity | Option<Quantity> | Quantity | None | 1 | Minimum order quantity. |
max_price | Option<Price> | Price | None | None | Maximum valid quote or order price. |
min_price | Option<Price> | Price | None | None | Minimum valid quote or order price. |
tick_scheme_name | N/A | str | None | None | Registered variable tick scheme name. |
info | Option<Params> | dict | None | None | Adapter metadata. |
ts_event | UnixNanos | int | Required | Event timestamp in nanoseconds. |
ts_init | UnixNanos | int | Required | Initialization timestamp in nanoseconds. |
Note: Python constructors use instrument_id; Rust stores the same value as id.
Behavior
OptionSpreadhas instrument classOptionSpread.- The venue publishes the spread as a single tradable instrument.
- It trades in whole contracts with size precision
0and size increment1. - Store venue-specific leg details in
infowhen the adapter provides them.
Example
use chrono::{TimeZone, Utc};
use nautilus_core::UnixNanos;
use nautilus_model::{
enums::AssetClass,
identifiers::{InstrumentId, Symbol},
instruments::OptionSpread,
types::{Currency, Price, Quantity},
};
use ustr::Ustr;
let activation = Utc.with_ymd_and_hms(2023, 11, 6, 20, 54, 7).unwrap();
let expiration = Utc.with_ymd_and_hms(2024, 2, 23, 22, 59, 0).unwrap();
let sr3_spread = OptionSpread::builder()
.instrument_id(InstrumentId::from("UD:U$: GN 2534559.GLBX"))
.raw_symbol(Symbol::from("UD:U$: GN 2534559"))
.asset_class(AssetClass::FX)
.exchange(Ustr::from("XCME"))
.underlying(Ustr::from("SR3"))
.strategy_type(Ustr::from("GN"))
.activation_ns(UnixNanos::from(activation.timestamp_nanos_opt().unwrap() as u64))
.expiration_ns(UnixNanos::from(expiration.timestamp_nanos_opt().unwrap() as u64))
.currency(Currency::from("USD"))
.price_precision(2)
.price_increment(Price::from("0.01"))
.multiplier(Quantity::from("1"))
.lot_size(Quantity::from("1"))
.ts_event(UnixNanos::default())
.ts_init(UnixNanos::default())
.build()
.unwrap();Adapters
Representative adapters that create or consume OptionSpread instruments include:
- Databento for listed option spread markets.
- Interactive Brokers for exchange-defined option strategies.
Related guides
- Option Contract covers single-leg option contracts.
- Options covers option data, Greeks, and chain subscriptions.
Option Contract
OptionContract represents a listed put or call option on a non-crypto underlying. It defines the option kind, strike price, activation time, expiration...
Crypto Option
CryptoOption represents a put or call option on a crypto underlying. It defines the option kind, strike price, activation time, expiration time, quote...