{"record":{"id":"8713f28622a6c433","repo":"nautechsystems/nautilus_trader","slug":"unsupported-order-type-for-hyperliquid-order-typ","errorCode":null,"errorMessage":"Unsupported order type for Hyperliquid: {order_type:?}","messagePattern":"Unsupported order type for Hyperliquid: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/hyperliquid/src/common/parse.rs","lineNumber":636,"sourceCode":"            if let Some(trigger_price) = order.trigger_price() {\n                let raw = trigger_price.as_decimal();\n                let trigger_price_decimal = if should_normalize_prices {\n                    normalize_price(raw, price_decimals).normalize()\n                } else {\n                    raw.normalize()\n                };\n                HyperliquidExchangeOrderKind::Trigger {\n                    trigger: HyperliquidExchangeTriggerParams {\n                        is_market: false,\n                        trigger_px: trigger_price_decimal,\n                        tpsl: HyperliquidExchangeTpSl::Tp,\n                    },\n                }\n            } else {\n                anyhow::bail!(\"Limit-if-touched orders require a trigger price\")\n            }\n        }\n        _ => anyhow::bail!(\"Unsupported order type for Hyperliquid: {order_type:?}\"),\n    };\n\n    Ok(HyperliquidExchangePlaceOrderRequest {\n        asset,\n        is_buy,\n        price: price_decimal,\n        size: size_decimal,\n        reduce_only,\n        kind,\n        cloid,\n    })\n}\n\n/// Default slippage buffer in basis points for MARKET orders.\npub const DEFAULT_MARKET_SLIPPAGE_BPS: u32 = 50;\n\n/// Derives a market order limit price from a quote with a configurable\n/// slippage buffer in basis points, rounded to 5 significant figures and","sourceCodeStart":618,"sourceCodeEnd":654,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/hyperliquid/src/common/parse.rs#L618-L654","documentation":"This is the catch-all branch of the order-type mapping in the Hyperliquid adapter. Only the order types explicitly handled above (Market, Limit, MarketIfTouched, LimitIfTouched, etc.) are supported by Hyperliquid; any other Nautilus order type falls into the wildcard and is rejected with the unsupported type's Debug representation interpolated into the message.","triggerScenarios":"Calling submit_order/modify_order/order_request with an order type not implemented in the mapping — e.g. TrailingStopMarket, TrailingStopLimit, or another venue-specific order type on Hyperliquid.","commonSituations":"Running a multi-venue strategy unchanged against Hyperliquid when it was written for a venue supporting trailing stops or other exotic order types; upgrades where a new order type is used before adapter support exists.","solutions":["Restrict the strategy to order types Hyperliquid supports (Market, Limit, and trigger-based MIT/LIT).","Emulate unsupported types (e.g. trailing stops) client-side with regular trigger orders and strategy-level updates.","Check the adapter's supported OrderType mapping and file/await an upstream feature request for the needed type."],"exampleFix":"// before\nlet order = self.order_factory.trailing_stop_market(...); // unsupported on Hyperliquid\n// after\nlet order = self.order_factory.market_if_touched(\n    instrument_id, side, qty, Some(trigger_price), TimeInForce::Gtc,\n);","handlingStrategy":"validation","validationCode":"const SUPPORTED: &[OrderType] = &[OrderType::Market, OrderType::Limit, OrderType::MarketIfTouched, OrderType::LimitIfTouched];\nif !SUPPORTED.contains(&order.order_type()) {\n    return Err(format!(\"{:?} not supported on Hyperliquid\", order.order_type()));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a per-venue supported-order-type table in strategy config.","Avoid unconditionally using trailing-stop or exotic order types in multi-venue strategies.","Review adapter release notes for newly supported order types."],"tags":["order-submission","unsupported-feature","hyperliquid"],"backgroundTag":"unsupported-operation","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"}