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
- Only run options_chain conversion on Deribit records; filter the CSV by exchange == 'deribit' first
- Obtain or implement exchange-specific currency mapping for the other exchange before converting
- Verify the exchange column values in your Tardis export match expectations (lowercase 'deribit')
- 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
- Filter Tardis options_chain CSVs to exchange == deribit before conversion
- Implement or source exchange-specific currency mapping for other venues
- Validate the exchange column in your dataset exports
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
- Missing option_type for option instrument
- Failed to open file '{}' after {max_retries} attempts: {e}
- File too small to be a valid gzip file
- Failed to read gzip header from '{}' after {MAX_RETRIES} att
- File '{}' has .gz extension but invalid gzip header
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/022dc69678b16c0a.
Report an issue: GitHub.