NautilusTrader
ConceptsInstruments
These docs track the unreleased nightly build and may change without notice. Switch to the latest stable docs.

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::builder()
    .instrument_id(InstrumentId::from("BTCUSDT-240329.BINANCE"))
    .raw_symbol(Symbol::from("BTCUSDT-240329"))
    .underlying(Currency::from("BTC"))
    .quote_currency(Currency::from("USDT"))
    .settlement_currency(Currency::from("USDT"))
    .is_inverse(false)
    .activation_ns(UnixNanos::from(activation.timestamp_nanos_opt().unwrap() as u64))
    .expiration_ns(UnixNanos::from(expiration.timestamp_nanos_opt().unwrap() as u64))
    .price_precision(2)
    .size_precision(6)
    .price_increment(Price::from("0.01"))
    .size_increment(Quantity::from("0.000001"))
    .max_quantity(Quantity::from("9000.0"))
    .min_quantity(Quantity::from("0.000001"))
    .min_notional(Money::from("10.00 USDT"))
    .max_price(Price::from("1000000.00"))
    .min_price(Price::from("0.01"))
    .ts_event(UnixNanos::default())
    .ts_init(UnixNanos::default())
    .build()
    .unwrap();

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