nautechsystems/nautilus_trader · error
Cannot process partial quote for {instrument_id}: missing bi
Error message
Cannot process partial quote for {instrument_id}: missing bid_price and no cached value What it means
QuoteCache::process merges partial quote updates with the previously cached quote for the instrument. This error means bid_price was None and there is no cached quote for the instrument, so bid_price cannot be resolved and no complete QuoteTick can be built.
Source
Thrown at crates/common/src/cache/quote.rs:128
/// Returns an error if:
/// - Any required field is `None` and there is no cached quote.
/// - The first quote received is incomplete (no cached values to merge with).
#[expect(clippy::too_many_arguments)]
pub fn process(
&mut self,
instrument_id: InstrumentId,
bid_price: Option<Price>,
ask_price: Option<Price>,
bid_size: Option<Quantity>,
ask_size: Option<Quantity>,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> anyhow::Result<QuoteTick> {
let cached = self.quotes.get(&instrument_id);
// Resolve each field: use provided value or fall back to cache
let Some(bid_price) = bid_price.or_else(|| cached.map(|quote| quote.bid_price)) else {
anyhow::bail!(
"Cannot process partial quote for {instrument_id}: missing bid_price and no cached value"
);
};
let Some(ask_price) = ask_price.or_else(|| cached.map(|quote| quote.ask_price)) else {
anyhow::bail!(
"Cannot process partial quote for {instrument_id}: missing ask_price and no cached value"
);
};
let Some(bid_size) = bid_size.or_else(|| cached.map(|quote| quote.bid_size)) else {
anyhow::bail!(
"Cannot process partial quote for {instrument_id}: missing bid_size and no cached value"
);
};
let Some(ask_size) = ask_size.or_else(|| cached.map(|quote| quote.ask_size)) else {
anyhow::bail!(View on GitHub (pinned to 18893faf8b)
Solutions
- Wait for (or request) a full quote snapshot before forwarding partial updates to process
- Skip partial updates until the first complete quote for that instrument has been cached
- Provide an explicit bid_price instead of None when no cache entry exists
- Seed the cache with a full quote before applying deltas
Example fix
// before
quote_cache.process(instrument_id, None, ask, bid_size, ask_size, ts_event, ts_init)?;
// after
if quote_cache.contains(&instrument_id) {
quote_cache.process(instrument_id, None, ask, bid_size, ask_size, ts_event, ts_init)?;
} // else wait for a complete quote Defensive patterns
Strategy: try-catch
Validate before calling
fn can_process(cache: &QuoteCache, id: &InstrumentId, bid_price: Option<Price>) -> bool {
bid_price.is_some() || cache.contains(id)
} Try / catch
match quote_cache.process(instrument_id, bid_price, ask_price, bid_size, ask_size, ts_event, ts_init) {
Ok(quote) => /* forward quote */,
Err(e) if e.to_string().contains("missing bid_price") => {
// no cached quote yet: skip this partial update until a full quote arrives
}
Err(e) => return Err(e.into()),
} Prevention
- Only forward partial updates once a complete quote has been cached for the instrument
- After reconnection (cache cleared), wait for a full snapshot before resuming delta updates
- Wrap process() and treat 'missing X and no cached value' errors as skip signals, not fatal
When it happens
Trigger: Calling process(instrument_id, None, ask_price, bid_size, ask_size, ...) as the first update for an instrument (nothing cached yet), or after cache.clear() (e.g. post-reconnect) when the next update is still partial.
Common situations: Feeding top-of-book delta-style feeds into a freshly started/restarted process; a reconnect that cleared the cache followed by partial updates; subscribing mid-session where the first tick omits the bid side.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Cannot process partial quote for {instrument_id}: missing as
- Cannot process partial quote for {instrument_id}: missing bi
- Cannot process partial quote for {instrument_id}: missing as
- Missing ask quote for pair {pair}
- DataActor {} must be registered before calling `cache()` - t
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/be1ab0c8604f0a15.
Report an issue: GitHub.