{"record":{"id":"3325264510e5d578","repo":"nautechsystems/nautilus_trader","slug":"lighter-does-not-support-historical-quote-requests","errorCode":null,"errorMessage":"Lighter does not support historical quote requests for {}; subscribe to quotes via WebSocket for live BBO ticks","messagePattern":"Lighter does not support historical quote requests for (.+?); subscribe to quotes via WebSocket for live BBO ticks","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/lighter/src/data/mod.rs","lineNumber":1633,"sourceCode":"                        clock.get_time_ns(),\n                        params,\n                    ));\n\n                    if let Err(e) = sender.send(DataEvent::Response(response)) {\n                        log::error!(\"Failed to send bars response: {e}\");\n                    }\n                }\n                Err(e) => {\n                    log::error!(\"Lighter bars request failed for {instrument_id}: {e:?}\");\n                }\n            }\n        });\n\n        Ok(())\n    }\n\n    fn request_quotes(&self, request: RequestQuotes) -> anyhow::Result<()> {\n        anyhow::bail!(\n            \"Lighter does not support historical quote requests for {}; \\\n             subscribe to quotes via WebSocket for live BBO ticks\",\n            request.instrument_id,\n        )\n    }\n\n    fn request_trades(&self, request: RequestTrades) -> anyhow::Result<()> {\n        let instrument_id = request.instrument_id;\n        log::debug!(\"Requesting Lighter trades for {instrument_id}\");\n\n        let instrument = self\n            .instruments\n            .get_cloned(&instrument_id)\n            .ok_or_else(|| InstrumentLookupError::not_found(instrument_id))?;\n\n        let http = self.http_client.clone();\n        let sender = self.data_sender.clone();\n        let request_id = request.request_id;","sourceCodeStart":1615,"sourceCodeEnd":1651,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/lighter/src/data/mod.rs#L1615-L1651","documentation":"The Lighter data client does not implement historical (REST) quote requests: quotes are only streamed as live BBO ticks over WebSocket. request_quotes always bails with this message naming the requested instrument. It is an explicit capability gap, not a transient failure.","triggerScenarios":"Calling request_quotes (e.g. via DataEngine.request or a RequestQuotes message) for any Lighter instrument, whether from a strategy warming up historical quote data or a backtest/live bridge requesting quote history.","commonSituations":"Strategies that request historical quotes before subscribing; code shared across venues where other adapters support quote history but Lighter does not; data pipelines assuming uniform historical support.","solutions":["Subscribe to the live quote stream (subscribe_quotes) instead of requesting history.","If historical quotes are required, capture them yourself via the WS stream into a cache/backing store and query that.","Use historical trades or bars (which Lighter does support) as a proxy for historical BBO where acceptable.","Guard the call site: skip request_quotes for instruments on the Lighter venue."],"exampleFix":"// before\ndata_engine.request(RequestQuotes::new(instrument_id, start, end, callback))\n// after\ndata_engine.subscribe_quotes(instrument_id) // live BBO via WebSocket; history not available on Lighter","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"// venue-agnostic path\nif request.instrument_id.venue.as_str() == \"LIGHTER\" {\n    data_engine.subscribe_quotes(request.instrument_id)?; // live only\n} else {\n    data_engine.request_quotes(request)?;\n}","preventionTips":["Never call request_quotes for Lighter instruments; use the WS quote stream.","Capture live quotes into your own store if history is needed later.","Document Lighter's historical capabilities (bars/trades yes; quotes/depth history no) in shared strategy code."],"tags":["rust","adapter","historical-data","quotes","unsupported"],"backgroundTag":"operation-not-supported","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"}