nautechsystems/nautilus_trader · error
Deribit does not support resolution '{resolution}'. Supporte
Error message
Deribit does not support resolution '{resolution}'. Supported: {supported_resolutions:?} What it means
After mapping an aggregation to a resolution string, request_bars validates it against Deribit's supported resolution list (1,3,5,10,15,30,60,120,180,360,720 minutes and 1D). Steps that compose to a resolution outside this list (e.g. Hour(5) -> '300') bail with the unsupported resolution and the full supported list.
Source
Thrown at crates/adapters/deribit/src/http/client.rs:1405
}
// Convert BarType to Deribit resolution
let spec = bar_type.spec();
let step = spec.step.get();
let resolution = match spec.aggregation {
BarAggregation::Minute => format!("{step}"),
BarAggregation::Hour => format!("{}", step * 60),
BarAggregation::Day => "1D".to_string(),
a => anyhow::bail!("Deribit does not support {a:?} aggregation"),
};
// Validate resolution is supported by Deribit
let supported_resolutions = [
"1", "3", "5", "10", "15", "30", "60", "120", "180", "360", "720", "1D",
];
if !supported_resolutions.contains(&resolution.as_str()) {
anyhow::bail!(
"Deribit does not support resolution '{resolution}'. Supported: {supported_resolutions:?}"
);
}
let instrument_id = bar_type.instrument_id();
let (price_precision, size_precision, use_cost_for_volume) =
if let Some(instrument) = self.get_instrument(&instrument_id.symbol.inner()) {
(
instrument.price_precision(),
instrument.size_precision(),
use_cost_for_bar_volume(&instrument),
)
} else {
log::warn!("Instrument {instrument_id} not in cache, skipping bars request");
return Err(InstrumentLookupError::not_found(instrument_id).into());
};
let instrument_name = instrument_id.symbol.to_string();View on GitHub (pinned to 18893faf8b)
Solutions
- Restrict bar specs to Deribit-supported resolutions: 1,3,5,10,15,30,60,120,180,360,720 minutes or 1D
- Use multiple 1D requests for multi-day history instead of a 2D+ resolution
- Validate the computed resolution against the supported list before calling request_bars
Example fix
// before
let bar_type = BarType::new(instrument_id, BarAggregation::Minute(2).into(), PriceType::Last);
let bars = client.request_bars(bar_type).await?; // resolution '2' unsupported
// after
const SUPPORTED: [&str; 12] = ["1","3","5","10","15","30","60","120","180","360","720","1D"];
let spec = bar_type.spec();
let resolution = match spec.aggregation {
BarAggregation::Minute(s) => s.get().to_string(),
BarAggregation::Hour(s) => (s.get() * 60).to_string(),
BarAggregation::Day(_) => "1D".to_string(),
_ => return Err(anyhow!("unsupported aggregation")),
};
assert!(SUPPORTED.contains(&resolution.as_str()), "unsupported resolution {resolution}"); Defensive patterns
Strategy: validation
Validate before calling
const SUPPORTED: [&str; 12] = ["1","3","5","10","15","30","60","120","180","360","720","1D"];
let resolution = match bar_type.spec().aggregation {
BarAggregation::Minute(s) => s.get().to_string(),
BarAggregation::Hour(s) => (s.get() * 60).to_string(),
BarAggregation::Day(_) => "1D".to_string(),
_ => String::new(),
};
assert!(SUPPORTED.contains(&resolution.as_str()), "unsupported resolution: {resolution}"); Prevention
- Keep a static list of Deribit-supported resolutions in config validation
- Avoid arbitrary minute steps; use 1,3,5,10,15,30,60,120,180,360,720 or 1D only
- For multi-day history, paginate 1D requests instead of multi-day resolutions
When it happens
Trigger: Requesting bars whose computed resolution is not in Deribit's set — e.g. Minute(2) -> '2', Minute(4) -> '4', Hour(5) -> '300', Day(2) -> '2D' (Day is hardcoded to '1D').
Common situations: Assuming arbitrary minute steps are supported; multi-day bars expecting '2D' style resolutions; generic bar-spec configs reused from other exchanges with finer granularity.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- Inconsistent array lengths in chart data
- Only EXTERNAL aggregation is supported
- Unsupported bar specification for AX: {step}-{:?}
- Chart data status is '{}', expected 'ok'
- invalid depth {depth}; supported depths: {DERIBIT_BOOK_VALID
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/b4d4699bba135dad.
Report an issue: GitHub.