{"record":{"id":"2fb511533fd633fe","repo":"nautechsystems/nautilus_trader","slug":"invalid-derive-subscription-channel-channel","errorCode":null,"errorMessage":"invalid Derive subscription channel `{channel}`","messagePattern":"invalid Derive subscription channel `(.+?)`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/derive/src/data.rs","lineNumber":2126,"sourceCode":"            let (instrument_name, interval) = ticker_channel_parts(channel)?;\n            return Ok(Self::Ticker {\n                channel: channel.to_string(),\n                instrument_name,\n                interval,\n            });\n        }\n\n        if let Some((instrument_type, currency)) = channel\n            .strip_prefix(\"trades.\")\n            .and_then(|value| value.split_once('.'))\n        {\n            return Ok(Self::Trades {\n                channel: channel.to_string(),\n                instrument_type: instrument_type.to_string(),\n                currency: currency.to_string(),\n            });\n        }\n        anyhow::bail!(\"invalid Derive subscription channel `{channel}`\")\n    }\n\n    fn channel(&self) -> &str {\n        match self {\n            Self::Orderbook { channel, .. }\n            | Self::Ticker { channel, .. }\n            | Self::Trades { channel, .. } => channel,\n        }\n    }\n\n    async fn subscribe(&self, ws: &DeriveWebSocketSubscriptionHandle) -> Result<(), DeriveWsError> {\n        match self {\n            Self::Orderbook {\n                instrument_name,\n                group,\n                depth,\n                ..\n            } => {","sourceCodeStart":2108,"sourceCodeEnd":2144,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/derive/src/data.rs#L2108-L2144","documentation":"Raised by the Derive subscription channel parser (a FromStr-style constructor for the subscription enum) when the given channel string does not match any supported Derive WebSocket channel pattern (orderbook, ticker, trades, etc.). It is the fall-through after all known channel formats fail to parse.","triggerScenarios":"Parsing or constructing a subscription from a channel string that is not one of Derive's recognized channel names/formats, e.g. typos, unsupported channel kinds, or malformed channel strings containing the channel/instrument/currency components.","commonSituations":"Hardcoding a channel name from Derive docs for a product type this adapter doesn't parse yet; typos like 'orderbook ' (trailing space) or wrong casing; version drift where Derive added channels the adapter doesn't know.","solutions":["Use one of the adapter's supported channel names (orderbook, ticker, trades) with the correct format.","Prefer constructing subscriptions via the adapter's typed helpers/subscribe APIs instead of raw channel strings.","If Derive introduced a new channel, check the adapter version and upgrade or extend the parser."],"exampleFix":"// before\nlet sub = Subscription::parse(\"orderbookV2/ETH-USD\")?; // unsupported pattern\n// after\nlet sub = Subscription::parse(\"orderbook/ETH-USD-PERP\")?;","handlingStrategy":"validation","validationCode":"const SUPPORTED_CHANNELS: [&str; 3] = [\"orderbook\", \"ticker\", \"trades\"];\nassert!(SUPPORTED_CHANNELS.contains(&channel), \"unsupported Derive channel: {channel}\");","typeGuard":null,"tryCatchPattern":"match Subscription::try_from(channel_str) {\n    Ok(sub) => subscribe(sub),\n    Err(e) => log::error!(\"{e}; check channel name against Derive adapter docs\"),\n}","preventionTips":["Build subscriptions with the adapter's typed APIs, not raw channel strings.","Keep a list of supported channel names for the adapter version in use.","Check for adapter updates when Derive adds new channels."],"tags":["websocket","subscription","parse-error","invalid-identifier","derive"],"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-14T00:17:10.932Z"}