nautechsystems/nautilus_trader · error
Unsupported minute interval: {step}m
Error message
Unsupported minute interval: {step}m What it means
bar_spec_to_binance_interval supports minute steps 1, 3, 5, 15 and 30 — exactly the minute kline intervals Binance exposes (1m, 3m, 5m, 15m, 30m). Any other minute step (2, 10, 20, 45...) has no venue-side kline interval and bails with this message.
Source
Thrown at crates/adapters/binance/src/common/parse.rs:1445
///
/// Returns an error if the bar specification does not map to a supported
/// Binance kline interval.
pub fn bar_spec_to_binance_interval(
bar_spec: BarSpecification,
) -> anyhow::Result<BinanceKlineInterval> {
let step = bar_spec.step.get();
let interval = match bar_spec.aggregation {
BarAggregation::Second => match step {
1 => BinanceKlineInterval::Second1,
_ => anyhow::bail!("Unsupported second interval: {step}s"),
},
BarAggregation::Minute => match step {
1 => BinanceKlineInterval::Minute1,
3 => BinanceKlineInterval::Minute3,
5 => BinanceKlineInterval::Minute5,
15 => BinanceKlineInterval::Minute15,
30 => BinanceKlineInterval::Minute30,
_ => anyhow::bail!("Unsupported minute interval: {step}m"),
},
BarAggregation::Hour => match step {
1 => BinanceKlineInterval::Hour1,
2 => BinanceKlineInterval::Hour2,
4 => BinanceKlineInterval::Hour4,
6 => BinanceKlineInterval::Hour6,
8 => BinanceKlineInterval::Hour8,
12 => BinanceKlineInterval::Hour12,
_ => anyhow::bail!("Unsupported hour interval: {step}h"),
},
BarAggregation::Day => match step {
1 => BinanceKlineInterval::Day1,
3 => BinanceKlineInterval::Day3,
_ => anyhow::bail!("Unsupported day interval: {step}d"),
},
BarAggregation::Week => match step {
1 => BinanceKlineInterval::Week1,
_ => anyhow::bail!("Unsupported week interval: {step}w"),View on GitHub (pinned to a4b06ed870)
Solutions
- Use the nearest supported external interval (1, 3, 5, 15, 30 minutes).
- Or keep the exact step with INTERNAL aggregation (e.g. 10-MINUTE-LAST-INTERNAL), which aggregates locally instead of querying the venue.
- Validate BarType strings in config before startup.
Example fix
// before
// let bar_type = BarType::from("10-MINUTE-LAST-EXTERNAL");
// -> Unsupported minute interval: 10m
// after
// let bar_type = BarType::from("10-MINUTE-LAST-INTERNAL"); // aggregated locally
// or
// let bar_type = BarType::from("15-MINUTE-LAST-EXTERNAL"); // nearest venue interval Defensive patterns
Strategy: validation
Validate before calling
fn supported_minute_step(step: u32) -> bool {
matches!(step, 1 | 3 | 5 | 15 | 30)
} Type guard
fn is_supported_minute_bar(step: u32) -> bool {
matches!(step, 1 | 3 | 5 | 15 | 30)
} Try / catch
let bar_type = BarType::from("10-MINUTE-LAST-EXTERNAL");
if let Err(e) = data_client.subscribe_bars(bar_type) {
if e.to_string().contains("Unsupported minute interval") {
// fall back: 15-MINUTE external or 10-MINUTE-LAST-INTERNAL
} else {
return Err(e);
}
} Prevention
- Hard-check minute steps against {1, 3, 5, 15, 30} during config validation.
- Use INTERNAL aggregation to keep arbitrary steps like 10m.
- Centralize BarType construction so unsupported specs fail one validated code path.
When it happens
Trigger: Requesting Binance bars with a BarType whose minute step is not in {1, 3, 5, 15, 30} — commonly 10-MINUTE, 20-MINUTE, or 45-MINUTE specifications.
Common situations: Strategy configs assume the platform transparently aggregates any step; configs ported from venues supporting 10m klines; hand-written BarType strings with a mistyped step.
Related errors
- Unsupported second interval: {step}s
- Unsupported hour interval: {step}h
- Unsupported day interval: {step}d
- Unsupported week interval: {step}w
- Only EXTERNAL aggregation is supported
AI-assisted analysis of nautechsystems/nautilus_trader@a4b06ed870 (2026-08-16).
Data as JSON: /api/errors/73aa65253dcb41bf.
Report an issue: GitHub.