nautechsystems/nautilus_trader · error

CryptoOption missing `strike_price` field for instrument: {}

Error message

CryptoOption missing `strike_price` field for instrument: {}

What it means

Tardis instrument parsing builds a Nautilus CryptoOption instrument from the exchange's instrument definition. Options must carry a strike price; when the Tardis response has no `strike_price` for an option instrument, create_crypto_option refuses to fabricate one and fails the parse.

Source

Thrown at crates/adapters/tardis/src/http/instruments.rs:242

    multiplier: Option<Quantity>,
    margin_init: Decimal,
    margin_maint: Decimal,
    maker_fee: Decimal,
    taker_fee: Decimal,
    ts_event: UnixNanos,
    ts_init: UnixNanos,
) -> anyhow::Result<InstrumentAny> {
    let is_inverse = info.inverse.unwrap_or(false);

    let option_type = info.option_type.ok_or_else(|| {
        anyhow::anyhow!(
            "CryptoOption missing `option_type` field for instrument: {}",
            info.id
        )
    })?;

    let strike_price = info.strike_price.ok_or_else(|| {
        anyhow::anyhow!(
            "CryptoOption missing `strike_price` field for instrument: {}",
            info.id
        )
    })?;

    Ok(InstrumentAny::CryptoOption(
        CryptoOption::builder()
            .instrument_id(instrument_id)
            .raw_symbol(raw_symbol)
            .underlying(get_currency(info.base_currency.to_uppercase().as_str()))
            .quote_currency(get_currency(info.quote_currency.to_uppercase().as_str()))
            .settlement_currency(get_currency(
                parse_settlement_currency(info, is_inverse).as_str(),
            ))
            .is_inverse(is_inverse)
            .option_kind(parse_option_kind(option_type))
            .strike_price(Price::new(strike_price, price_increment.precision))
            .activation_ns(activation)

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Inspect the raw Tardis instrument payload for that instrument id and confirm strike_price is present; re-fetch the definition if it was truncated.
  2. Update/verify the Tardis deserialization types so strike_price is mapped correctly (field-name or casing mismatch causes None).
  3. Filter out or skip option instruments without strike_price in your data pipeline before parsing.
  4. Pin/upgrade the nautilus_tardis adapter version matching the current Tardis API schema.

Example fix

// before
let strike_price = info.strike_price.ok_or_else(|| anyhow::anyhow!("CryptoOption missing `strike_price` field for instrument: {}", info.id))?;
// after
let strike_price = match info.strike_price {
    Some(sp) => sp,
    None => {
        tracing::warn!("Skipping option {} with no strike_price", info.id);
        return Ok(None); // skip instead of failing the whole parse
    }
};
Defensive patterns

Strategy: validation

Validate before calling

if instrument_info.strike_price.is_none() {
    eprintln!("skipping option {} (no strike_price)", instrument_info.id);
}

Type guard

fn has_strike(info: &TardisInstrumentInfo) -> bool { info.strike_price.is_some() }

Prevention

When it happens

Trigger: Calling parse_option_instrument -> create_crypto_option with a Tardis instrument definition whose `strike_price` field is null/absent (info.strike_price is None after deserialization).

Common situations: Tardis API schema changes or partial instrument snapshots; requesting option instruments for venues that omit strike on some records; caching stale/incomplete instrument definitions; deserialization silently dropping unexpected/missing fields.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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