{"record":{"id":"eaca8e4c61bfc327","repo":"nautechsystems/nautilus_trader","slug":"limit-orders-require-a-limit-price-for-hyperliquid","errorCode":null,"errorMessage":"Limit orders require a limit price for Hyperliquid: {order.order_type():?}","messagePattern":"Limit orders require a limit price for Hyperliquid: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/hyperliquid/src/execution.rs","lineNumber":2753,"sourceCode":"        order.order_type(),\n        OrderType::StopMarket\n            | OrderType::StopLimit\n            | OrderType::MarketIfTouched\n            | OrderType::LimitIfTouched\n    ) && order.trigger_price().is_none()\n    {\n        anyhow::bail!(\n            \"Conditional orders require a trigger price for Hyperliquid: {:?}\",\n            order.order_type()\n        );\n    }\n\n    if matches!(\n        order.order_type(),\n        OrderType::Limit | OrderType::StopLimit | OrderType::LimitIfTouched\n    ) && order.price().is_none()\n    {\n        anyhow::bail!(\n            \"Limit orders require a limit price for Hyperliquid: {:?}\",\n            order.order_type()\n        );\n    }\n\n    Ok(())\n}\n\nfn can_fast_cancel_order(order_type: Option<OrderType>) -> bool {\n    matches!(order_type, Some(OrderType::Market | OrderType::Limit))\n}\n\nfn cancel_status_count_mismatch_reason(\n    label: &str,\n    expected_count: usize,\n    actual_count: usize,\n) -> Option<String> {\n    (actual_count != 0 && actual_count != expected_count).then(|| {","sourceCodeStart":2735,"sourceCodeEnd":2771,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/hyperliquid/src/execution.rs#L2735-L2771","documentation":"Limit-style orders on Hyperliquid (Limit, StopLimit, LimitIfTouched) must carry a limit price. If order.price() is None for one of these types, the adapter rejects the order with this error naming the order type.","triggerScenarios":"submit_order with OrderType in {Limit, StopLimit, LimitIfTouched} where order.price() is None — the order was constructed without setting its price.","commonSituations":"Building a limit order via a factory call that omitted the price; converting orders from another venue representation that dropped the price; strategy code that sets only a trigger price for a StopLimit and forgets the limit price.","solutions":["Set the price when constructing the Limit/StopLimit/LimitIfTouched order.","Validate in the strategy before submission that price().is_some() for limit-style orders.","Derive the price from the current book/mid if the strategy intends a passive limit.","Fix order-builder helpers so the price parameter is required for limit-style types."],"exampleFix":"// before\nlet order = factory.limit_if_touched(instrument_id, side, qty, trigger_price); // price missing\nexec_client.submit_order(&order).await?;\n// after\nlet order = factory.limit_if_touched(instrument_id, side, qty, limit_price, trigger_price);\nexec_client.submit_order(&order).await?;","handlingStrategy":"validation","validationCode":"fn has_limit_price(order: &OrderAny) -> bool {\n    !matches!(order.order_type(), OrderType::Limit | OrderType::StopLimit\n        | OrderType::LimitIfTouched)\n        || order.price().is_some()\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set the price on limit-style orders","Validate order completeness before submit_order","Use factory signatures that make the price parameter mandatory"],"tags":["rust","hyperliquid","limit-price","missing-argument","order-validation"],"backgroundTag":"missing-required-argument","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}