nautechsystems/nautilus_trader · error
Unsupported day step: {step}
Error message
Unsupported day step: {step} What it means
bar_type_to_granularity cannot map the requested Day-aggregation bar step to a Coinbase Exchange candles granularity; Coinbase's fixed granularity set only includes a one-day bucket, so any other day step fails.
Source
Thrown at crates/adapters/coinbase/src/common/parse.rs:148
let step = spec.step.get();
match spec.aggregation {
BarAggregation::Minute => match step {
1 => Ok(CoinbaseGranularity::OneMinute),
5 => Ok(CoinbaseGranularity::FiveMinute),
15 => Ok(CoinbaseGranularity::FifteenMinute),
30 => Ok(CoinbaseGranularity::ThirtyMinute),
_ => anyhow::bail!("Unsupported minute step: {step}"),
},
BarAggregation::Hour => match step {
1 => Ok(CoinbaseGranularity::OneHour),
2 => Ok(CoinbaseGranularity::TwoHour),
6 => Ok(CoinbaseGranularity::SixHour),
_ => anyhow::bail!("Unsupported hour step: {step}"),
},
BarAggregation::Day => match step {
1 => Ok(CoinbaseGranularity::OneDay),
_ => anyhow::bail!("Unsupported day step: {step}"),
},
other => anyhow::bail!("Unsupported aggregation: {other}"),
}
}
#[cfg(test)]
mod tests {
use rstest::rstest;
use super::*;
#[rstest]
#[case(
"BTC-USD.COINBASE-1-MINUTE-LAST-EXTERNAL",
CoinbaseGranularity::OneMinute
)]
#[case(
"BTC-USD.COINBASE-5-MINUTE-LAST-EXTERNAL",View on GitHub (pinned to 18893faf8b)
Solutions
- Use a 1-day BarType (`...-1-DAY.INTERNAL`) and aggregate multiple days locally if needed.
- Request daily bars from an exchange that supports the larger step natively.
- Validate bar types in strategy configuration before handing them to the Coinbase data client.
Example fix
// before "BTC-USD.COINBASE-7-DAY.INTERNAL" // after "BTC-USD.COINBASE-1-DAY.INTERNAL" // aggregate 7-day bars locally
Defensive patterns
Strategy: validation
Validate before calling
if bar_type.spec().aggregation == BarAggregation::Day
&& bar_type.spec().step.get() != 1
{
return Err(anyhow!("Coinbase supports only 1-day bars"));
} Try / catch
match bar_type_to_granularity(&bar_type) {
Ok(g) => request_candles(g),
Err(e) if e.to_string().contains("Unsupported day step") => {
request_candles(CoinbaseGranularity::OneDay); // combine days locally
}
Err(e) => return Err(e),
} Prevention
- Use 1-day bar types for Coinbase daily candles
- Build weekly/monthly bars locally from daily data
- Document per-exchange granularity limits in config schemas
When it happens
Trigger: Calling `request_bars` with a `BarType` such as `BTC-USD.COINBASE-7-DAY.INTERNAL` — a weekly bar type that Coinbase cannot serve natively.
Common situations: Weekly/monthly bar requests pointed at Coinbase; generic strategies templated with multi-day bar types without per-exchange adjustment.
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
- Unsupported minute step: {step}
- Unsupported hour step: {step}
- Unsupported aggregation: {other}
- Unsupported bar aggregation type: '{suffix}'
- Binance Spot kline subscriptions require JSON market-data mo
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/9ea3ec8b26fb1200.
Report an issue: GitHub.