{"record":{"id":"79f072ebda89e433","repo":"nautechsystems/nautilus_trader","slug":"no-lighter-market-index-for-fill-instrument-instr","errorCode":null,"errorMessage":"no Lighter market_index for fill instrument {instrument_id}","messagePattern":"no Lighter market_index for fill instrument (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/lighter/src/execution.rs","lineNumber":5218,"sourceCode":"            }\n            None => coverage.as_ref().is_some_and(|skipped| skipped.is_empty()),\n        };\n        Ok((reports, complete, coverage))\n    }\n\n    async fn paginate_fill_reports(&self, cmd: &GenerateFillReports) -> anyhow::Result<FillSweep> {\n        let Some(credential) = &self.credential else {\n            log::warn!(\"Lighter generate_fill_reports: no credentials\");\n            return Ok(FillSweep {\n                reports: Vec::new(),\n                covers_window: true,\n            });\n        };\n\n        let market_id = match cmd.instrument_id {\n            Some(instrument_id) => {\n                Some(self.registry.market_index(&instrument_id).ok_or_else(|| {\n                    anyhow::anyhow!(\"no Lighter market_index for fill instrument {instrument_id}\",)\n                })?)\n            }\n            None => None,\n        };\n\n        let auth = build_auth_token_for(credential)\n            .context(\"failed to mint Lighter auth token for fill fetch\")?;\n\n        let ts_init = self.clock.get_time_ns();\n        let mut reports = Vec::new();\n        let mut cursor: Option<String> = None;\n        let mut seen_cursors = AHashSet::new();\n        let mut seen_in_call = AHashSet::new();\n        let mut pages = 0_usize;\n        let mut oldest_served: Option<UnixNanos> = None;\n        let mut covers_window = true;\n\n        loop {","sourceCodeStart":5200,"sourceCodeEnd":5236,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/lighter/src/execution.rs#L5200-L5236","documentation":"When generating fill (order status) reports filtered to a specific instrument, the adapter needs the Lighter market_index for that instrument to query the exchange. If the registry lookup fails, this error is raised because fills cannot be fetched for an unmapped instrument.","triggerScenarios":"Calling generate_order_status_reports (fill reconciliation) with cmd.instrument_id = Some(id) where the Lighter registry contains no market_index for that instrument_id — instrument never loaded, wrong venue, or stale ID.","commonSituations":"Fill reconciliation scoped to an instrument from a different adapter, an instrument whose market was delisted/changed on Lighter, or a misconfigured instrument ID in the reconciliation request.","solutions":["Register/load the instrument into the Lighter registry before running fill reconciliation.","Confirm the instrument_id venue and symbol are exactly what the adapter registered.","Rebuild/refresh the registry mapping, then retry the reconciliation.","Drop the instrument from the requested scope if it is not traded on Lighter."],"exampleFix":"// before\nlet market_id = self.registry.market_index(&instrument_id).ok_or_else(|| {\n    anyhow::anyhow!(\"no Lighter market_index for fill instrument {instrument_id}\")\n})?;\n// after\nlet market_id = self.registry.market_index(&instrument_id)\n    .ok_or_else(|| anyhow::anyhow!(\n        \"no Lighter market_index for fill instrument {instrument_id}; registered instruments: {:?}\",\n        self.registry.registered_ids()\n    ))?;","handlingStrategy":"validation","validationCode":"let market_id = registry.market_index(&instrument_id)\n    .ok_or_else(|| anyhow!(\"instrument {instrument_id} not registered with Lighter\"))?;","typeGuard":"fn can_reconcile_fills(registry: &Registry, id: &InstrumentId) -> bool { registry.market_index(id).is_some() }","tryCatchPattern":"if let Err(e) = result {\n    if e.to_string().contains(\"no Lighter market_index for fill\") { register_and_retry(instrument_id)?; }\n}","preventionTips":["Register all traded instruments with the adapter before fill reconciliation","Filter reconciliation scope to registered instruments only","Audit instrument IDs after market migrations/delistings"],"tags":["lighter","fills","instrument-registry","mapping"],"backgroundTag":"resource-not-found","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"}