nautechsystems/nautilus_trader · error
`handle_quote_tick` {IMPL_ERR} `{}`
Error message
`handle_quote_tick` {IMPL_ERR} `{}` What it means
The default Indicator trait implementation of handle_quote bails immediately: it is a placeholder signaling that the concrete indicator must override handle_quote to process QuoteTicks. Hitting it means the indicator type was used polymorphically without providing its own quote-tick handler.
Source
Thrown at crates/indicators/src/indicator.rs:57
fn handle_deltas(&mut self, deltas: &OrderBookDeltas) {
panic!("`handle_deltas` {IMPL_ERR} `{}`", self.name());
}
fn handle_depth(&mut self, depth: &OrderBookDepth10) {
panic!("`handle_depth` {IMPL_ERR} `{}`", self.name());
}
fn handle_book(&mut self, book: &OrderBook) {
panic!("`handle_book_mbo` {IMPL_ERR} `{}`", self.name());
}
/// Updates the indicator with the given quote tick.
///
/// # Errors
///
/// Returns an error if the configured price type cannot be extracted from the quote.
fn handle_quote(&mut self, quote: &QuoteTick) -> anyhow::Result<()> {
anyhow::bail!("`handle_quote_tick` {IMPL_ERR} `{}`", self.name());
}
fn handle_trade(&mut self, trade: &TradeTick) {
panic!("`handle_trade_tick` {IMPL_ERR} `{}`", self.name());
}
fn handle_bar(&mut self, bar: &Bar) {
panic!("`handle_bar` {IMPL_ERR} `{}`", self.name());
}
fn reset(&mut self);
}
pub trait MovingAverage: Indicator {
fn value(&self) -> f64;
fn count(&self) -> usize;
fn update_raw(&mut self, value: f64);
}View on GitHub (pinned to 18893faf8b)
Solutions
- Implement handle_quote in your indicator type to extract the configured price from QuoteTick.
- If the indicator only supports bars/trades, stop feeding quote ticks to it and feed the supported update type.
- Wrap registration in a check that the indicator declares quote-tick support before subscribing it to quote streams.
Example fix
// before
impl Indicator for MyIndicator { fn handle_bar(&mut self, bar: &Bar) { ... } }
// after
impl Indicator for MyIndicator {
fn handle_quote(&mut self, quote: &QuoteTick) -> anyhow::Result<()> {
self.update(quote.price_of(self.price_type));
Ok(())
}
} Defensive patterns
Strategy: type-guard
Type guard
fn supports_quotes<I: Indicator>(ind: &I) -> bool {
// Prefer an explicit capability flag on your indicator type
ind.supports_quote_ticks()
} Try / catch
// Rust: match on the error from handle_quote
match indicator.handle_quote("e) {
Ok(()) => {}
Err(e) if e.to_string().contains("IMPL_ERR") => {
log::error!("indicator {} does not implement handle_quote", indicator.name());
}
Err(e) => return Err(e),
} Prevention
- Always override handle_quote when implementing the Indicator trait for quote-driven indicators.
- Use a trait with default-panicking methods sparingly; document required overrides.
- Test custom indicators with a QuoteTick before live deployment.
When it happens
Trigger: Calling handle_quote on an indicator struct that inherits the default trait impl instead of overriding it, i.e. feeding a quote tick into an indicator that only implemented handle_bar or left handle_quote unimplemented.
Common situations: Writing a custom indicator and forgetting to implement handle_quote; registering a partially implemented indicator in an indicator bundle driven by quote ticks; trait-object dispatch where the concrete type never overrode the method.
Related errors
- `calculate_from_returns` {IMPL_ERR} `{}`
- `calculate_from_realized_pnls` {IMPL_ERR} `{}`
- `calculate_from_positions` {IMPL_ERR} `{}`
- Implement FromRow for FuturesSpread
- Implement FromRow for OptionSpread
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/4396032ad7cbe68c.
Report an issue: GitHub.