Back to Nautilus Trader

Crypto Option Spread

docs/concepts/instruments/crypto_option_spread.md

1.230.010.2 KB
Original Source

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

<Tabs items={["Rust", "Python"]}> <Tab value="Rust">

FieldTypeRequired/defaultNotes
instrument_idInstrumentIdRequiredStored as id in Rust.
raw_symbolSymbolRequiredNative venue symbol.
underlyingCurrencyRequiredCrypto asset the strategy tracks.
quote_currencyCurrencyRequiredCurrency used to quote the premium.
settlement_currencyCurrencyRequiredCurrency used to settle PnL and fees.
is_inverseboolRequiredTrue when sizing/costing is inverse.
strategy_typeUstrRequiredVenue strategy type, such as vertical.
activation_nsUnixNanosRequiredStrategy activation timestamp.
expiration_nsUnixNanosRequiredStrategy expiration timestamp.
price_precisionu8RequiredDecimal places allowed for prices.
size_precisionu8RequiredDecimal places allowed for order sizes.
price_incrementPriceRequiredSmallest valid price step.
size_incrementQuantityRequiredSmallest valid size step.
multiplierQuantity1Strategy multiplier.
lot_sizeQuantity1Rounded lot or board size.
max_quantityOption<Quantity>NoneMaximum order quantity.
min_quantityOption<Quantity>NoneMinimum order quantity.
max_notionalOption<Money>NoneMaximum order notional value.
min_notionalOption<Money>NoneMinimum order notional value.
max_priceOption<Price>NoneMaximum valid quote or order price.
min_priceOption<Price>NoneMinimum valid quote or order price.
margin_initOption<Decimal>0Initial margin rate.
margin_maintOption<Decimal>0Maintenance margin rate.
maker_feeOption<Decimal>0Maker fee rate. Negative values rebate.
taker_feeOption<Decimal>0Taker fee rate. Negative values rebate.
tick_schemeOption<Ustr>NoneRegistered variable tick scheme name.
infoOption<Params>NoneAdapter metadata.
ts_eventUnixNanosRequiredEvent timestamp in nanoseconds.
ts_initUnixNanosRequiredInitialization timestamp in nanoseconds.
</Tab> <Tab value="Python">
FieldTypeRequired/defaultNotes
instrument_idInstrumentIdRequired
raw_symbolSymbolRequiredNative venue symbol.
underlyingCurrencyRequiredCrypto asset the strategy tracks.
quote_currencyCurrencyRequiredCurrency used to quote the premium.
settlement_currencyCurrencyRequiredCurrency used to settle PnL and fees.
is_inverseboolRequiredTrue when sizing/costing is inverse.
strategy_typestrRequiredVenue strategy type, such as vertical.
activation_nsintRequiredStrategy activation timestamp.
expiration_nsintRequiredStrategy expiration timestamp.
price_precisionintRequiredDecimal places allowed for prices.
size_precisionintRequiredDecimal places allowed for order sizes.
price_incrementPriceRequiredSmallest valid price step.
size_incrementQuantityRequiredSmallest valid size step.
multiplierQuantity1Strategy multiplier.
lot_sizeQuantity1Rounded lot or board size.
max_quantityQuantity | NoneNoneMaximum order quantity.
min_quantityQuantity | NoneNoneMinimum order quantity.
max_notionalMoney | NoneNoneMaximum order notional value.
min_notionalMoney | NoneNoneMinimum order notional value.
max_pricePrice | NoneNoneMaximum valid quote or order price.
min_pricePrice | NoneNoneMinimum valid quote or order price.
margin_initDecimal | None0Initial margin rate.
margin_maintDecimal | None0Maintenance margin rate.
maker_feeDecimal | None0Maker fee rate. Negative values rebate.
taker_feeDecimal | None0Taker fee rate. Negative values rebate.
tick_schemestr | NoneNoneRegistered variable tick scheme name.
infodict | NoneNoneAdapter metadata.
ts_eventintRequiredEvent timestamp in nanoseconds.
ts_initintRequiredInitialization timestamp in nanoseconds.
</Tab> </Tabs>

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.
  • Store venue-specific leg details in info when the adapter provides them.

Example

rust
use chrono::{TimeZone, Utc};
use nautilus_core::UnixNanos;
use nautilus_model::{
    identifiers::{InstrumentId, Symbol},
    instruments::CryptoOptionSpread,
    types::{Currency, Price, Quantity},
};
use rust_decimal_macros::dec;
use ustr::Ustr;

let activation = Utc.with_ymd_and_hms(2026, 5, 12, 0, 0, 0).unwrap();
let expiration = Utc.with_ymd_and_hms(2026, 5, 19, 8, 0, 0).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.timestamp_nanos_opt().unwrap() as u64))
    .expiration_ns(UnixNanos::from(expiration.timestamp_nanos_opt().unwrap() as u64))
    .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"))
    .maker_fee(dec!(0.0003))
    .taker_fee(dec!(0.0003))
    .ts_event(UnixNanos::default())
    .ts_init(UnixNanos::default())
    .build()
    .unwrap();
python
from decimal import Decimal

import pandas as pd

from nautilus_trader.model import CryptoOptionSpread
from nautilus_trader.model import Currency
from nautilus_trader.model import InstrumentId
from nautilus_trader.model import Price
from nautilus_trader.model import Quantity
from nautilus_trader.model import Symbol

BTC = Currency.from_str("BTC")
USD = Currency.from_str("USD")

btc_spread = CryptoOptionSpread(
    instrument_id=InstrumentId.from_str("BTC-CS-19MAY26-70000_75000.DERIBIT"),
    raw_symbol=Symbol("BTC-CS-19MAY26-70000_75000"),
    underlying=BTC,
    quote_currency=USD,
    settlement_currency=BTC,
    is_inverse=False,
    strategy_type="CS",
    activation_ns=pd.Timestamp("2026-05-12T00:00:00", tz="UTC").value,
    expiration_ns=pd.Timestamp("2026-05-19T08:00:00", tz="UTC").value,
    price_precision=4,
    size_precision=1,
    price_increment=Price.from_str("0.0001"),
    size_increment=Quantity.from_str("0.1"),
    min_quantity=Quantity.from_str("0.1"),
    maker_fee=Decimal("0.0003"),
    taker_fee=Decimal("0.0003"),
    ts_event=0,
    ts_init=0,
)

Adapters

Representative adapters that create or consume CryptoOptionSpread instruments include:

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