{"record":{"id":"47d1a4abfa2e6f21","repo":"nautechsystems/nautilus_trader","slug":"option-chain-reference-price-requests-are-not-supp","errorCode":null,"errorMessage":"option-chain reference price requests are not supported","messagePattern":"option-chain reference price requests are not supported","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/common/src/clients/data.rs","lineNumber":627,"sourceCode":"    /// # Errors\n    ///\n    /// Returns an error if the trades request fails.\n    fn request_funding_rates(&self, request: RequestFundingRates) -> anyhow::Result<()> {\n        log_not_implemented(&request);\n        Ok(())\n    }\n\n    /// Requests a reference price for an option-chain bootstrap.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the option-chain reference price request fails.\n    fn request_option_chain_reference_price(\n        &self,\n        request: RequestOptionChainReferencePrice,\n    ) -> anyhow::Result<()> {\n        log_not_implemented(&request);\n        anyhow::bail!(\"option-chain reference price requests are not supported\")\n    }\n\n    /// Requests historical or streaming bar data for a specified instrument and bar type.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the bars request fails.\n    fn request_bars(&self, request: RequestBars) -> anyhow::Result<()> {\n        log_not_implemented(&request);\n        Ok(())\n    }\n\n    /// Requests historical order book depth data for a specified instrument.\n    ///\n    /// # Errors\n    ///\n    /// Returns an error if the order book depths request fails.\n    fn request_book_depth(&self, request: RequestBookDepth) -> anyhow::Result<()> {","sourceCodeStart":609,"sourceCodeEnd":645,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/common/src/clients/data.rs#L609-L645","documentation":"The default DataClient implementation of request_option_chain_reference_price is a stub: it logs the request as not implemented and immediately returns an error. Clients that do not support option-chain reference price requests inherit this default and always fail with this message.","triggerScenarios":"Calling request_option_chain_reference_price (typically via a RequestOptionChainReferencePrice routed through the DataEngine) on a data client that has not overridden this method.","commonSituations":"Requesting option-chain reference prices against a broker/venue whose client adapter lacks support; wiring a generic data client for an options workflow it doesn't implement; code assuming all clients support every request type.","solutions":["Use a data client implementation that overrides request_option_chain_reference_price with real support","Check the client's supported request types (or capability flags) before sending the request","Route the request to a venue/provider that supports option-chain reference prices","Implement the method in your custom DataClient subclass if you need the feature"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Only send the request if the client actually supports it (no default-stub).\n// e.g. check the concrete client type or a capability flag before calling:\nif !client.supports_option_chain_reference_price() { return Ok(()); }","typeGuard":"// In Rust, detect the stub by testing the concrete type:\nfn supports_ref_prices(c: &dyn DataClient) -> bool {\n    // true only for client types that override request_option_chain_reference_price\n    c.as_any().downcast_ref::<MySupportedClient>().is_some()\n}","tryCatchPattern":"if let Err(e) = client.request_option_chain_reference_price(request) {\n    if e.to_string().contains(\"not supported\") {\n        // fall back to another data source or skip this request type\n    } else {\n        return Err(e.into());\n    }\n}","preventionTips":["Verify client capability coverage before wiring it into options workflows","Centralize capability checks so unsupported request types are filtered before dispatch","Prefer clients documented to support the specific request type for the venue"],"tags":["data-client","options","not-implemented","rust"],"backgroundTag":"method-not-implemented","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"}