nautechsystems/nautilus_trader · error · anyhow::Error
Unsupported day step: {step}
Error message
Unsupported day step: {step} What it means
bar_type_to_interval cannot map the requested Day-aggregation step to a Hyperliquid candle interval; only specific day steps (e.g. 1, 3, 7) exist in the interval enum, so any other step fails before a bars request or subscription is issued.
Source
Thrown at crates/adapters/hyperliquid/src/common/parse.rs:466
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"),
};
Ok(interval)
}
/// Converts a Nautilus order to Hyperliquid request using a pre-resolved asset index.
///
/// This variant is used when the caller has already resolved the asset index
/// from the instrument cache (e.g., for SPOT instruments where the index
/// cannot be derived from the symbol alone). `slippage_bps` controls the
/// buffer applied when deriving a limit from a stop trigger price.
pub fn order_to_hyperliquid_request_with_asset(
order: &OrderAny,
asset: u32,View on GitHub (pinned to 18893faf8b)
Solutions
- Change the day step to 1 or 3.
- For weekly bars use aggregation Week with step 1 instead of Day step 7.
- Resample locally from a supported interval if an unsupported day width is required.
- Validate bar specs against Hyperliquid's supported intervals at startup.
Example fix
// before let bar_type = BarType::new(instrument_id, 7, BarAggregation::Day, PriceType::Last); // after let bar_type = BarType::new(instrument_id, 1, BarAggregation::Week, PriceType::Last);
Defensive patterns
Strategy: validation
Validate before calling
if spec.aggregation() == BarAggregation::Day && !matches!(spec.step(), 1 | 3) {
return Err(anyhow::anyhow!("day step {} unsupported on Hyperliquid", spec.step()));
}
// weekly: use BarAggregation::Week with step 1 Prevention
- Express weekly bars as Week(step=1), not Day(step=7)
- Validate bar specs at startup against Hyperliquid's interval list
- Keep venue-specific bar configs separate from generic ones
When it happens
Trigger: request_bars, request_bars_from_http, subscribe_bars, or unsubscribe_bars with a Day-aggregated BarType whose step is not 1 or 3, e.g. 7-DAY or 2-DAY bar specs.
Common situations: Weekly bars configured as 7-DAY instead of a Week-aggregated bar type, generic multi-day resampling configs, or bar specs shared across adapters where other venues support arbitrary day steps.
Related errors
- Invalid Hyperliquid bar interval: {s}
- Unsupported minute step: {step}
- Unsupported hour 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/f1d0552261300b7c.
Report an issue: GitHub.