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
| 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. |
underlying | Currency | Currency | Required | Crypto asset the contract tracks. |
quote_currency | Currency | Currency | Required | Currency used to quote the price. |
settlement_currency | Currency | Currency | Required | Currency used to settle PnL and fees. |
is_inverse | bool | bool | Required | True when sizing/costing is inverse. |
activation_ns | UnixNanos | int | Required | Contract activation timestamp. |
expiration_ns | UnixNanos | int | Required | Contract expiration timestamp. |
price_precision | u8 | int | Required | Decimal places allowed for prices. |
size_precision | u8 | int | Required | Decimal places allowed for order sizes. |
price_increment | Price | Price | Required | Smallest valid price step. |
size_increment | Quantity | Quantity | Required | Smallest valid size step. |
multiplier | Quantity | Quantity | 1 | Contract multiplier. |
lot_size | Quantity | Quantity | 1 | Rounded lot or board size. |
max_quantity | Option<Quantity> | Quantity | None | None | Maximum order quantity. |
min_quantity | Option<Quantity> | Quantity | None | None | Minimum order quantity. |
max_notional | Option<Money> | Money | None | None | Maximum order notional value. |
min_notional | Option<Money> | Money | None | None | Minimum order notional value. |
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. |
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. |
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
CryptoFuturehas asset classCryptocurrencyand instrument classFuture.- Linear contracts typically set
is_inverse=Falseand settle in the quote currency. - Inverse contracts set
is_inverse=Trueand typically settle in the underlying currency. - Quanto contracts settle in a third currency that differs from both underlying and quote.
- Use
CryptoPerpetualfor 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.
Related guides
- Crypto Perpetual covers perpetual crypto futures.
- Futures Contract covers non-crypto futures contracts.
Futures Spread
FuturesSpread represents an exchange-defined futures strategy with more than one leg, such as a calendar spread or inter-commodity spread. The venue defines...
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...