NautilusTrader
ConceptsInstruments

Crypto Futures Spread

CryptoFuturesSpread represents an exchange-defined spread strategy over crypto futures. The venue publishes the strategy as a single instrument with its own symbol, strategy type, precision, increments, and expiration.

Examples include listed crypto futures calendar spreads.

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 price.
settlement_currencyCurrencyCurrencyRequiredCurrency used to settle PnL and fees.
is_inverseboolboolRequiredTrue when sizing/costing is inverse.
strategy_typeUstrstrRequiredVenue strategy type, such as calendar.
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.
maker_feeOption<Decimal>Decimal | None0Maker fee rate. Negative values rebate.
taker_feeOption<Decimal>Decimal | None0Taker fee rate. Negative values rebate.
tick_scheme_nameN/Astr | 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

  • CryptoFuturesSpread has asset class Cryptocurrency and instrument class FuturesSpread.
  • 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

use chrono::{TimeZone, Utc};
use nautilus_core::UnixNanos;
use nautilus_model::{
    identifiers::{InstrumentId, Symbol},
    instruments::CryptoFuturesSpread,
    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 = CryptoFuturesSpread::new(
    InstrumentId::from("BTC-FS-19MAY26_PERP.DERIBIT"),
    Symbol::from("BTC-FS-19MAY26_PERP"),
    Currency::from("BTC"),
    Currency::from("USD"),
    Currency::from("BTC"),
    false,
    Ustr::from("FS"),
    UnixNanos::from(activation.timestamp_nanos_opt().unwrap() as u64),
    UnixNanos::from(expiration.timestamp_nanos_opt().unwrap() as u64),
    1,
    0,
    Price::from("0.5"),
    Quantity::from("1"),
    Some(Quantity::from("10")),
    Some(Quantity::from("1")),
    None,
    Some(Quantity::from("1")),
    None,
    None,
    None,
    None,
    None,
    None,
    Some(dec!(0.0003)),
    Some(dec!(0.0003)),
    None,
    UnixNanos::default(),
    UnixNanos::default(),
);

Adapters

Representative adapters that create or consume CryptoFuturesSpread instruments include:

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

On this page