{"record":{"id":"022dc69678b16c0a","repo":"nautechsystems/nautilus_trader","slug":"options-chain-instrument-derivation-supports-derib","errorCode":null,"errorMessage":"options_chain instrument derivation supports Deribit only, received {exchange}","messagePattern":"options_chain instrument derivation supports Deribit only, received (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/tardis/src/csv/convert.rs","lineNumber":427,"sourceCode":"            .price_precision(instrument_price_precision)\n            .size_precision(precision.size)\n            .price_increment(price_increment)\n            .size_increment(size_increment)\n            .lot_size(size_increment)\n            .min_quantity(size_increment)\n            .ts_event(parse_timestamp(record.timestamp))\n            .ts_init(parse_timestamp(record.local_timestamp))\n            .build()?,\n    ))\n}\n\nfn option_currency_mapping(\n    exchange: TardisExchange,\n    underlying_currency: Currency,\n) -> anyhow::Result<(Currency, Currency, bool)> {\n    match exchange {\n        TardisExchange::Deribit => Ok((underlying_currency, underlying_currency, true)),\n        exchange => anyhow::bail!(\n            \"options_chain instrument derivation supports Deribit only, received {exchange}\"\n        ),\n    }\n}\n\nfn decimal_increment_price(precision: u8) -> anyhow::Result<Price> {\n    Ok(Price::from_decimal_dp(\n        Decimal::new(1, u32::from(precision)),\n        precision,\n    )?)\n}\n\nfn decimal_increment_quantity(precision: u8) -> anyhow::Result<Quantity> {\n    Ok(Quantity::from_decimal_dp(\n        Decimal::new(1, u32::from(precision)),\n        precision,\n    )?)\n}","sourceCodeStart":409,"sourceCodeEnd":445,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/tardis/src/csv/convert.rs#L409-L445","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let exchange: TardisExchange = record.exchange.parse()?;\nif exchange != TardisExchange::Deribit {\n    // skip record or route to an exchange-specific converter\n    return Ok(None);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["tardis","csv","deribit","options"],"backgroundTag":"unsupported-operation","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}