{"record":{"id":"265872f20bb7f332","repo":"nautechsystems/nautilus_trader","slug":"trigger-order-types-are-not-supported-for-hyperliq","errorCode":null,"errorMessage":"Trigger order types are not supported for Hyperliquid HIP-4 outcomes: {symbol} (received {order.order_type():?})","messagePattern":"Trigger order types are not supported for Hyperliquid HIP-4 outcomes: (.+?) \\(received (.+?)\\)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/hyperliquid/src/execution.rs","lineNumber":2726,"sourceCode":"        | OrderType::StopMarket\n        | OrderType::StopLimit\n        | OrderType::MarketIfTouched\n        | OrderType::LimitIfTouched => {}\n        _ => anyhow::bail!(\n            \"Unsupported order type for Hyperliquid: {:?}\",\n            order.order_type()\n        ),\n    }\n\n    // HIP-4 outcomes are fully-collateralized side tokens with no margin,\n    // funding, or trigger machinery. Reject features that don't apply.\n    if product_type == HyperliquidProductType::Outcome {\n        if order.is_reduce_only() {\n            anyhow::bail!(\"Reduce-only is not supported for Hyperliquid HIP-4 outcomes: {symbol}\");\n        }\n\n        if !matches!(order.order_type(), OrderType::Market | OrderType::Limit) {\n            anyhow::bail!(\n                \"Trigger order types are not supported for Hyperliquid HIP-4 outcomes: \\\n                 {symbol} (received {:?})\",\n                order.order_type()\n            );\n        }\n    }\n\n    if matches!(\n        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()","sourceCodeStart":2708,"sourceCodeEnd":2744,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/hyperliquid/src/execution.rs#L2708-L2744","documentation":"HIP-4 outcome tokens have no trigger machinery, so only plain Market and Limit orders are accepted for Outcome products. Any conditional/trigger order type (StopMarket, StopLimit, MarketIfTouched, LimitIfTouched) on an outcome is rejected with this error, including the received order type in the message.","triggerScenarios":"Submitting a stop or if-touched order whose instrument resolves to HyperliquidProductType::Outcome — order_type() not matching Market or Limit while product_type == Outcome.","commonSituations":"Strategies that place protective stops uniformly across all holdings, applied to outcome side tokens; copying perp order logic to outcome markets.","solutions":["Use only Market or Limit orders for HIP-4 outcome instruments.","Implement trigger logic in the strategy (monitor price and submit a plain market/limit order) for outcomes.","Branch on the instrument's product type before submitting conditional order types."],"exampleFix":"// before\nlet order = factory.stop_market(instrument_id, ...); // outcome instrument\nexec_client.submit_order(&order).await?;\n// after\nif product_type == HyperliquidProductType::Outcome {\n    let order = factory.limit(instrument_id, ...); // plain limit only\n    exec_client.submit_order(&order).await?;\n}","handlingStrategy":"validation","validationCode":"fn outcome_allows_order_type(product_type: HyperliquidProductType, t: OrderType) -> bool {\n    product_type != HyperliquidProductType::Outcome\n        || matches!(t, OrderType::Market | OrderType::Limit)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict outcome markets to Market/Limit orders","Implement trigger logic in the strategy for outcomes","Check product type before building conditional orders"],"tags":["rust","hyperliquid","hip-4","trigger-orders","unsupported"],"backgroundTag":"unsupported-enum-value","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"}