nautechsystems/nautilus_trader · error

missing limit price for order {} (market orders require an e

Error message

missing limit price for order {} (market orders require an explicit slippage-adjusted price)

What it means

Derive orders require an explicit price: either the caller supplies one or the order itself carries a limit price. When resolving the price for an order (e.g. a market order, which has no price in Nautilus), neither exists, so the resolver bails — market orders must carry a slippage-adjusted price.

Source

Thrown at crates/adapters/derive/src/http/query.rs:652

    Ok(())
}

pub(crate) fn validate_trigger_order_support(order: &OrderAny) -> anyhow::Result<()> {
    trigger_order_type_to_derive(order.order_type())?;
    time_in_force_to_derive(order.time_in_force(), order.is_post_only())?;
    trigger_price_type_to_derive(order.trigger_type())?;
    Ok(())
}

fn resolve_limit_price(
    order: &OrderAny,
    explicit_price: Option<Decimal>,
) -> anyhow::Result<Decimal> {
    match explicit_price {
        Some(p) => Ok(p),
        None => match order.price() {
            Some(p) => Ok(p.as_decimal()),
            None => anyhow::bail!(
                "missing limit price for order {} (market orders require an explicit slippage-adjusted price)",
                order.client_order_id(),
            ),
        },
    }
}

#[derive(Debug, Clone, Copy, PartialEq, Eq)]
struct DeriveTriggerFields {
    trigger_price: Decimal,
    trigger_price_type: DeriveTriggerPriceType,
    trigger_type: DeriveTriggerType,
}

#[expect(clippy::too_many_arguments)]
fn build_signed_order_params(
    order: &OrderAny,
    instrument: &DeriveInstrument,

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Attach an explicit slippage-adjusted price to the market order before submission
  2. Use a LimitOrder with post_only or appropriate price instead of a market order
  3. Compute price from the current book mid/last with a slippage buffer in the strategy
  4. If your order type should carry a price, verify how it was constructed (Price field left default)

Example fix

// before
order_factory.market(instrument_id, OrderSide::Buy, qty) // no price
// after
let px = instrument.make_price(mid * Decimal::from(101)) / Decimal::from(100);
order_factory.market(instrument_id, OrderSide::Buy, qty) // then set price, or use:
order_factory.limit(instrument_id, OrderSide::Buy, qty, px)
Defensive patterns

Strategy: validation

Validate before calling

fn ensure_derive_price(o: &OrderAny) -> anyhow::Result<()> {
    let has_px = matches!(o, OrderAny::Limit(_)) || o.price().is_some();
    anyhow::ensure!(has_px, "order {} needs explicit price for Derive", o.client_order_id());
    Ok(())
}

Try / catch

match resolve_price(explicit_price, &order) {
    Ok(px) => submit(px),
    Err(e) if e.to_string().contains("missing limit price") => {
        let px = book.mid_price_with_slippage(0.01)?;
        submit(px);
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Submitting a MarketOrder to Derive without setting a price; submitting an order with explicit_price None and order.price() returning None.

Common situations: Strategies using market orders ported from venues that support true market orders; forgetting to compute a slippage-included limit price for Derive's RFQ/order model.

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/4537a11ab350f16d. Report an issue: GitHub.