{"record":{"id":"7306d51be00abb50","repo":"nautechsystems/nautilus_trader","slug":"unsupported-minute-step-step-7306d5","errorCode":null,"errorMessage":"Unsupported minute step: {step}","messagePattern":"Unsupported minute step: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/hyperliquid/src/common/parse.rs","lineNumber":453,"sourceCode":"///\n/// Returns an error if the bar type uses an unsupported aggregation or step value.\npub fn bar_type_to_interval(bar_type: &BarType) -> anyhow::Result<HyperliquidBarInterval> {\n    let spec = bar_type.spec();\n    let step = spec.step.get();\n\n    anyhow::ensure!(\n        bar_type.aggregation_source() == AggregationSource::External,\n        \"Only EXTERNAL aggregation is supported\"\n    );\n\n    let interval = match spec.aggregation {\n        BarAggregation::Minute => match step {\n            1 => OneMinute,\n            3 => ThreeMinutes,\n            5 => FiveMinutes,\n            15 => FifteenMinutes,\n            30 => ThirtyMinutes,\n            _ => anyhow::bail!(\"Unsupported minute step: {step}\"),\n        },\n        BarAggregation::Hour => match step {\n            1 => OneHour,\n            2 => TwoHours,\n            4 => FourHours,\n            8 => EightHours,\n            12 => TwelveHours,\n            _ => anyhow::bail!(\"Unsupported hour step: {step}\"),\n        },\n        BarAggregation::Day => match step {\n            1 => OneDay,\n            3 => ThreeDays,\n            _ => anyhow::bail!(\"Unsupported day step: {step}\"),\n        },\n        BarAggregation::Week if step == 1 => OneWeek,\n        BarAggregation::Month if step == 1 => OneMonth,\n        a => anyhow::bail!(\"Hyperliquid does not support {a:?} aggregation\"),\n    };","sourceCodeStart":435,"sourceCodeEnd":471,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/hyperliquid/src/common/parse.rs#L435-L471","documentation":"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.","triggerScenarios":"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'.","commonSituations":"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.","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."],"exampleFix":"// before\nlet bar_type = BarType::new(instrument_id, 10, BarAggregation::Minute, PriceType::Last);\n// after\nlet bar_type = BarType::new(instrument_id, 15, BarAggregation::Minute, PriceType::Last);","handlingStrategy":"validation","validationCode":"const HYPERLIQUID_MINUTE_STEPS: [u32; 5] = [1, 3, 5, 15, 30];\nif !(spec.aggregation() == BarAggregation::Minute\n     && HYPERLIQUID_MINUTE_STEPS.contains(&spec.step())) {\n    return Err(anyhow::anyhow!(\"minute step {} unsupported on Hyperliquid\", spec.step()));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["hyperliquid","bars","interval","rust"],"backgroundTag":"unsupported-config-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}