nautechsystems/nautilus_trader · error

Loading quote data for Redis cache adapter not supported

Error message

Loading quote data for Redis cache adapter not supported

What it means

load_quotes on the Redis cache adapter is unimplemented and always bails with this message. Historical/market quote data loading is not supported by the Redis-backed cache, which is oriented toward state persistence rather than market data storage.

Source

Thrown at crates/infrastructure/src/redis/cache.rs:1609

        self.database.load_custom_data(data_type)
    }

    fn load_order_snapshot(
        &self,
        _client_order_id: &ClientOrderId,
    ) -> anyhow::Result<Option<OrderSnapshot>> {
        anyhow::bail!("Loading order snapshots from Redis cache adapter not supported")
    }

    fn load_position_snapshot(
        &self,
        _position_id: &PositionId,
    ) -> anyhow::Result<Option<PositionSnapshot>> {
        anyhow::bail!("Loading position snapshots from Redis cache adapter not supported")
    }

    fn load_quotes(&self, _instrument_id: &InstrumentId) -> anyhow::Result<Vec<QuoteTick>> {
        anyhow::bail!("Loading quote data for Redis cache adapter not supported")
    }

    fn load_trades(&self, _instrument_id: &InstrumentId) -> anyhow::Result<Vec<TradeTick>> {
        anyhow::bail!("Loading market data for Redis cache adapter not supported")
    }

    fn load_funding_rates(
        &self,
        _instrument_id: &InstrumentId,
    ) -> anyhow::Result<Vec<FundingRateUpdate>> {
        anyhow::bail!("Loading market data for Redis cache adapter not supported")
    }

    fn load_bars(&self, _instrument_id: &InstrumentId) -> anyhow::Result<Vec<Bar>> {
        anyhow::bail!("Loading market data for Redis cache adapter not supported")
    }

    fn add(&self, key: String, value: Bytes) -> anyhow::Result<()> {

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Load quotes from a data catalog / Parquet data adapter rather than the Redis cache.
  2. Pipe live QuoteTicks via data clients instead of replaying them from the cache.
  3. Handle the error gracefully (empty vec) when quote replay is optional.
  4. Check adapter capability before invoking market-data load methods.

Example fix

// before
let quotes = cache.load_quotes(&instrument_id)?; // bails on Redis
// after
let quotes = match cache.load_quotes(&instrument_id) {
    Ok(q) => q,
    Err(_) => Vec::new(), // Redis adapter does not support quote loads
};
Defensive patterns

Strategy: fallback

Validate before calling

// Python
if isinstance(cache_database, RedisCacheDatabase):
    quotes = []  # unsupported on Redis
else:
    quotes = cache.load_quotes(instrument_id)

Try / catch

// Python
try:
    quotes = cache.load_quotes(instrument_id)
except RuntimeError as e:
    if "quote data" in str(e) and "not supported" in str(e):
        quotes = []
    else:
        raise

Prevention

When it happens

Trigger: Calling cache.load_quotes(instrument_id) or running data-replay/restore code paths that read quote ticks from the cache while Redis is the backing adapter.

Common situations: Trying to warm up strategies with historical quotes from Redis; scripts that mixed a data catalog with the Redis cache and assumed load_quotes worked on both; backtests ported to live setups where the Redis cache replaced the local cache.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/9378b9c1a4c3c684. Report an issue: GitHub.