{"record":{"id":"0a7b93c21ade818a","repo":"nautechsystems/nautilus_trader","slug":"unsupported-instrument-symbol-format-for-hyperliqu","errorCode":null,"errorMessage":"Unsupported instrument symbol format for Hyperliquid: {symbol} (expected -PERP, -SPOT, or HIP-4 outcome `{{N}}-{{YES|NO}}-OUTCOME`)","messagePattern":"Unsupported instrument symbol format for Hyperliquid: (.+?) \\(expected -PERP, -SPOT, or HIP-4 outcome `(.+?)\\}-(.+?)\\}-OUTCOME`\\)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/hyperliquid/src/execution.rs","lineNumber":2699,"sourceCode":"        }\n    });\n\n    pairs.into_iter().unzip()\n}\n\n/// Validates that an order is acceptable for submission to Hyperliquid.\n///\n/// Checks symbol format, order type support, and HIP-4-specific restrictions\n/// (no reduce-only, no trigger order types on outcome side tokens).\n///\n/// # Errors\n///\n/// Returns an error describing the first validation failure encountered.\npub fn validate_order_for_hyperliquid(order: &OrderAny) -> anyhow::Result<()> {\n    let instrument_id = order.instrument_id();\n    let symbol = instrument_id.symbol.as_str();\n    let product_type = HyperliquidProductType::from_symbol(symbol).map_err(|_| {\n        anyhow::anyhow!(\n            \"Unsupported instrument symbol format for Hyperliquid: {symbol} \\\n             (expected -PERP, -SPOT, or HIP-4 outcome `{{N}}-{{YES|NO}}-OUTCOME`)\"\n        )\n    })?;\n\n    match order.order_type() {\n        OrderType::Market\n        | OrderType::Limit\n        | 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","sourceCodeStart":2681,"sourceCodeEnd":2717,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/hyperliquid/src/execution.rs#L2681-L2717","documentation":"validate_order_for_hyperliquid() rejects orders whose instrument symbol cannot be parsed into a Hyperliquid product type. Hyperliquid symbols must be a perpetual (-PERP), spot (-SPOT), or a HIP-4 outcome market of the form {N}-{YES|NO}-OUTCOME; anything else fails symbol parsing and produces this message.","triggerScenarios":"Submitting an order whose instrument_id.symbol does not match any supported Hyperliquid format — e.g. 'BTC', 'BTC-USDT-PERP', 'ETH/USD', or a malformed HIP-3/HIP-4 builder-deployed symbol.","commonSituations":"Configuring instruments using Binance/other-venue naming conventions instead of Hyperliquid's; typos in symbol suffixes; using builder-deployed HIP-3 markets whose symbol format this adapter does not recognize.","solutions":["Rename the instrument to a supported format: e.g. BTC-PERP, ETH-SPOT, or {N}-{YES|NO}-OUTCOME for HIP-4 outcome markets","Verify the symbol exists on Hyperliquid and matches its exact venue naming","Check how the instrument was loaded/configured and correct the venue-specific symbol mapping","If trading HIP-3 builder-deployed markets, confirm the adapter version supports that symbol format"],"exampleFix":"// before\norder.instrument_id = InstrumentId::from(\"BTC-USDT-PERP.HYPERLIQUID\");\n// after\norder.instrument_id = InstrumentId::from(\"BTC-PERP.HYPERLIQUID\");","handlingStrategy":"validation","validationCode":"fn is_valid_hl_symbol(sym: &str) -> bool {\n    sym.ends_with(\"-PERP\") || sym.ends_with(\"-SPOT\")\n        || (regex::Regex::new(r\"^\\d+-(YES|NO)-OUTCOME$\").unwrap().is_match(sym))\n}\n// call before building the order: assert!(is_valid_hl_symbol(order.instrument_id().symbol.as_str()));","typeGuard":"fn as_hyperliquid_symbol(sym: &str) -> Option<&str> {\n    if sym.ends_with(\"-PERP\") || sym.ends_with(\"-SPOT\")\n        || regex::Regex::new(r\"^\\d+-(YES|NO)-OUTCOME$\").unwrap().is_match(sym) { Some(sym) } else { None }\n}","tryCatchPattern":"if let Err(e) = client.submit_order(order).await { if e.to_string().contains(\"Unsupported instrument symbol\") { fix_symbol_mapping(&e); } }","preventionTips":["Always use Hyperliquid's native symbol naming (BTC-PERP, not BTC-USDT-PERP)","Validate instrument IDs against the adapter's supported formats at config load time","Load instruments via the adapter's own instrument provider","For HIP-4 outcome markets, follow the {N}-{YES|NO}-OUTCOME template exactly"],"tags":["validation","symbols","hyperliquid","orders"],"backgroundTag":"invalid-argument-format","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"}