nautechsystems/nautilus_trader · error

options_chain instrument derivation supports Deribit only, r

Error message

options_chain instrument derivation supports Deribit only, received {exchange}

What it means

When deriving crypto option instruments from a Tardis options_chain CSV record, option_currency_mapping determines base/quote currency mapping from the exchange. Only TardisExchange::Deribit has a defined mapping; any other exchange bails with this message because options_chain instrument derivation is Deribit-specific.

Source

Thrown at crates/adapters/tardis/src/csv/convert.rs:427

            .price_precision(instrument_price_precision)
            .size_precision(precision.size)
            .price_increment(price_increment)
            .size_increment(size_increment)
            .lot_size(size_increment)
            .min_quantity(size_increment)
            .ts_event(parse_timestamp(record.timestamp))
            .ts_init(parse_timestamp(record.local_timestamp))
            .build()?,
    ))
}

fn option_currency_mapping(
    exchange: TardisExchange,
    underlying_currency: Currency,
) -> anyhow::Result<(Currency, Currency, bool)> {
    match exchange {
        TardisExchange::Deribit => Ok((underlying_currency, underlying_currency, true)),
        exchange => anyhow::bail!(
            "options_chain instrument derivation supports Deribit only, received {exchange}"
        ),
    }
}

fn decimal_increment_price(precision: u8) -> anyhow::Result<Price> {
    Ok(Price::from_decimal_dp(
        Decimal::new(1, u32::from(precision)),
        precision,
    )?)
}

fn decimal_increment_quantity(precision: u8) -> anyhow::Result<Quantity> {
    Ok(Quantity::from_decimal_dp(
        Decimal::new(1, u32::from(precision)),
        precision,
    )?)
}

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Only run options_chain conversion on Deribit records; filter the CSV by exchange == 'deribit' first
  2. Obtain or implement exchange-specific currency mapping for the other exchange before converting
  3. Verify the exchange column values in your Tardis export match expectations (lowercase 'deribit')
  4. Use the appropriate loader/converter for non-Deribit option data instead of the options_chain path
Defensive patterns

Strategy: validation

Validate before calling

let exchange: TardisExchange = record.exchange.parse()?;
if exchange != TardisExchange::Deribit {
    // skip record or route to an exchange-specific converter
    return Ok(None);
}

Prevention

When it happens

Trigger: Calling create_crypto_option_from_options_chain_record on an options_chain record whose exchange field resolves to a TardisExchange other than Deribit (e.g. Okex, Bybit options data).

Common situations: Feeding Tardis options_chain CSVs from exchanges other than Deribit into the converter; misconfigured exchange column in the CSV or wrong file passed to the loader.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/022dc69678b16c0a. Report an issue: GitHub.