nautechsystems/nautilus_trader · error · anyhow::Error
Unsupported minute step: {step}
Error message
Unsupported minute step: {step} What it means
bar_type_to_interval maps Nautilus bar aggregation steps to Hyperliquid candle intervals. For Minute aggregation only steps 1, 3, 5, 15, and 30 have Hyperliquid equivalents, so any other minute step (e.g. 2, 10, 20, 60) is rejected because the exchange simply does not offer that candle width.
Source
Thrown at crates/adapters/hyperliquid/src/common/parse.rs:453
///
/// Returns an error if the bar type uses an unsupported aggregation or step value.
pub fn bar_type_to_interval(bar_type: &BarType) -> anyhow::Result<HyperliquidBarInterval> {
let spec = bar_type.spec();
let step = spec.step.get();
anyhow::ensure!(
bar_type.aggregation_source() == AggregationSource::External,
"Only EXTERNAL aggregation is supported"
);
let interval = match spec.aggregation {
BarAggregation::Minute => match step {
1 => OneMinute,
3 => ThreeMinutes,
5 => FiveMinutes,
15 => FifteenMinutes,
30 => ThirtyMinutes,
_ => anyhow::bail!("Unsupported minute step: {step}"),
},
BarAggregation::Hour => match step {
1 => OneHour,
2 => TwoHours,
4 => FourHours,
8 => EightHours,
12 => TwelveHours,
_ => anyhow::bail!("Unsupported hour step: {step}"),
},
BarAggregation::Day => match step {
1 => OneDay,
3 => ThreeDays,
_ => anyhow::bail!("Unsupported day step: {step}"),
},
BarAggregation::Week if step == 1 => OneWeek,
BarAggregation::Month if step == 1 => OneMonth,
a => anyhow::bail!("Hyperliquid does not support {a:?} aggregation"),
};View on GitHub (pinned to 18893faf8b)
Solutions
- Change the bar step to a supported one: 1, 3, 5, 15, or 30 minutes.
- Use 60-minute step by switching aggregation to Hour with step 1 (HOUR bar type).
- If finer granularity is needed, subscribe to a supported interval and resample locally in the strategy.
- Validate bar specs against the adapter's supported interval list at config load time.
Example fix
// before let bar_type = BarType::new(instrument_id, 10, BarAggregation::Minute, PriceType::Last); // after let bar_type = BarType::new(instrument_id, 15, BarAggregation::Minute, PriceType::Last);
Defensive patterns
Strategy: validation
Validate before calling
const HYPERLIQUID_MINUTE_STEPS: [u32; 5] = [1, 3, 5, 15, 30];
if !(spec.aggregation() == BarAggregation::Minute
&& HYPERLIQUID_MINUTE_STEPS.contains(&spec.step())) {
return Err(anyhow::anyhow!("minute step {} unsupported on Hyperliquid", spec.step()));
} Prevention
- Validate all bar specs against the adapter's supported intervals at config load
- Use 60-minute bars via HOUR aggregation instead of large minute steps
- Resample unsupported intervals locally from a supported base interval
When it happens
Trigger: Requesting or subscribing to bars (request_bars_from_http, request_bars, subscribe_bars, unsubscribe_bars) with a BarType whose aggregation is Minute and step not in {1,3,5,15,30}, e.g. BarType 'ETH-USD.HYPERLIQUID-2-MINUTE-EXTERNAL'.
Common situations: Configured bar intervals copied from another exchange adapter's supported set (e.g. 2-min or 10-min bars), a strategy parameter sweep generating arbitrary minute steps, or resampling configs using 60-MINUTE instead of 1-HOUR.
Related errors
- Invalid Hyperliquid bar interval: {s}
- Unsupported hour step: {step}
- Unsupported day step: {step}
- Hyperliquid does not support {a:?} aggregation
- Only EXTERNAL aggregation is supported
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/7306d51be00abb50.
Report an issue: GitHub.