NautilusTrader
ConceptsInstruments

Crypto Future

CryptoFuture represents a dated crypto futures contract. It tracks a crypto underlying, quotes in a quote currency, settles in a settlement currency, and expires at a fixed timestamp.

Examples include dated BTC or ETH futures on crypto derivatives venues.

Fields

FieldRust typePython typeRequired/defaultNotes
instrument_idInstrumentIdInstrumentIdRequiredStored as id in Rust.
raw_symbolSymbolSymbolRequiredNative venue symbol.
underlyingCurrencyCurrencyRequiredCrypto asset the contract tracks.
quote_currencyCurrencyCurrencyRequiredCurrency used to quote the price.
settlement_currencyCurrencyCurrencyRequiredCurrency used to settle PnL and fees.
is_inverseboolboolRequiredTrue when sizing/costing is inverse.
activation_nsUnixNanosintRequiredContract activation timestamp.
expiration_nsUnixNanosintRequiredContract 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.
multiplierQuantityQuantity1Contract 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

  • CryptoFuture has asset class Cryptocurrency and instrument class Future.
  • Linear contracts typically set is_inverse=False and settle in the quote currency.
  • Inverse contracts set is_inverse=True and typically settle in the underlying currency.
  • Quanto contracts settle in a third currency that differs from both underlying and quote.
  • Use CryptoPerpetual for crypto derivatives with no expiration.

Example

use chrono::{TimeZone, Utc};
use nautilus_core::UnixNanos;
use nautilus_model::{
    identifiers::{InstrumentId, Symbol},
    instruments::CryptoFuture,
    types::{Currency, Money, Price, Quantity},
};

let activation = Utc.with_ymd_and_hms(2024, 1, 8, 0, 0, 0).unwrap();
let expiration = Utc.with_ymd_and_hms(2024, 3, 29, 0, 0, 0).unwrap();

let btcusdt_future = CryptoFuture::new(
    InstrumentId::from("BTCUSDT-240329.BINANCE"),
    Symbol::from("BTCUSDT-240329"),
    Currency::from("BTC"),
    Currency::from("USDT"),
    Currency::from("USDT"),
    false,
    UnixNanos::from(activation.timestamp_nanos_opt().unwrap() as u64),
    UnixNanos::from(expiration.timestamp_nanos_opt().unwrap() as u64),
    2,
    6,
    Price::from("0.01"),
    Quantity::from("0.000001"),
    None,
    None,
    Some(Quantity::from("9000.0")),
    Some(Quantity::from("0.000001")),
    None,
    Some(Money::from("10.00 USDT")),
    Some(Price::from("1000000.00")),
    Some(Price::from("0.01")),
    None,
    None,
    None,
    None,
    None,
    UnixNanos::default(),
    UnixNanos::default(),
);

Adapters

Representative adapters that create or consume CryptoFuture instruments include:

  • BitMEX for inverse and linear dated futures.
  • Bybit for crypto futures markets.
  • Deribit for dated crypto futures.
  • OKX for dated crypto futures.
  • Tardis for crypto futures metadata.

On this page