{"record":{"id":"ffde8726c6eb6aef","repo":"nautechsystems/nautilus_trader","slug":"cannot-process-partial-quote-for-instrument-id-ffde87","errorCode":null,"errorMessage":"Cannot process partial quote for {instrument_id}: missing bid_size and no cached value","messagePattern":"Cannot process partial quote for (.+?): missing bid_size and no cached value","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/common/src/cache/quote.rs","lineNumber":140,"sourceCode":"        ts_init: UnixNanos,\n    ) -> anyhow::Result<QuoteTick> {\n        let cached = self.quotes.get(&instrument_id);\n\n        // Resolve each field: use provided value or fall back to cache\n        let Some(bid_price) = bid_price.or_else(|| cached.map(|quote| quote.bid_price)) else {\n            anyhow::bail!(\n                \"Cannot process partial quote for {instrument_id}: missing bid_price and no cached value\"\n            );\n        };\n\n        let Some(ask_price) = ask_price.or_else(|| cached.map(|quote| quote.ask_price)) else {\n            anyhow::bail!(\n                \"Cannot process partial quote for {instrument_id}: missing ask_price and no cached value\"\n            );\n        };\n\n        let Some(bid_size) = bid_size.or_else(|| cached.map(|quote| quote.bid_size)) else {\n            anyhow::bail!(\n                \"Cannot process partial quote for {instrument_id}: missing bid_size and no cached value\"\n            );\n        };\n\n        let Some(ask_size) = ask_size.or_else(|| cached.map(|quote| quote.ask_size)) else {\n            anyhow::bail!(\n                \"Cannot process partial quote for {instrument_id}: missing ask_size and no cached value\"\n            );\n        };\n\n        let quote = QuoteTick::new(\n            instrument_id,\n            bid_price,\n            ask_price,\n            bid_size,\n            ask_size,\n            ts_event,\n            ts_init,","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/common/src/cache/quote.rs#L122-L158","documentation":"Partial-quote merge guard in the quote cache's process: a new BBO update omitted bid_size and no previously cached quote exists for the instrument, so a complete QuoteTick cannot be assembled and the update is rejected.","triggerScenarios":"First call to process for an instrument (or the first call after clear()) with bid_size=None while other fields are provided.","commonSituations":"Size-only-delta feeds that never send sizes on the first tick; restarted processes with an empty cache; feeds where size fields are optional/absent at session start.","solutions":["Send a full quote (including both sizes) as the first update per instrument","Skip or buffer partial updates until the cache holds a quote for that instrument","Supply a default/explicit bid_size when no cached value exists"],"exampleFix":"// before\nquote_cache.process(instrument_id, bid, ask, None, ask_size, ts_event, ts_init)?;\n// after\nlet bid_size = bid_size.or_else(|| last_known_sizes.get(&instrument_id).copied());\nquote_cache.process(instrument_id, bid, ask, bid_size, ask_size, ts_event, ts_init)?;","handlingStrategy":"try-catch","validationCode":"fn can_process(cache: &QuoteCache, id: &InstrumentId, bid_size: Option<Quantity>) -> bool {\n    bid_size.is_some() || cache.contains(id)\n}","typeGuard":null,"tryCatchPattern":"match quote_cache.process(instrument_id, bid_price, ask_price, bid_size, ask_size, ts_event, ts_init) {\n    Ok(quote) => /* forward quote */,\n    Err(e) if e.to_string().contains(\"missing bid_size\") => { /* skip partial update */ }\n    Err(e) => return Err(e.into()),\n}","preventionTips":["Include sizes in the initial quote snapshot, not just prices","Keep a last-known-sizes map to fill None sizes on cold start"],"tags":["market-data","quotes","cache","missing-data","rust"],"backgroundTag":"missing-required-argument","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"}