{"record":{"id":"2138c5d4b5ee423a","repo":"nautechsystems/nautilus_trader","slug":"unsupported-hour-step-step-2138c5","errorCode":null,"errorMessage":"Unsupported hour step: {step}","messagePattern":"Unsupported hour step: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/hyperliquid/src/common/parse.rs","lineNumber":461,"sourceCode":"        \"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    };\n\n    Ok(interval)\n}\n\n/// Converts a Nautilus order to Hyperliquid request using a pre-resolved asset index.\n///\n/// This variant is used when the caller has already resolved the asset index\n/// from the instrument cache (e.g., for SPOT instruments where the index","sourceCodeStart":443,"sourceCodeEnd":479,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/hyperliquid/src/common/parse.rs#L443-L479","documentation":"For Hour aggregation, bar_type_to_interval only accepts steps 1, 2, 4, 8, and 12, matching Hyperliquid's candle interval enum. Any other hour step (e.g. 3, 6, 24) is rejected with this error since the venue has no such interval.","triggerScenarios":"Calling request_bars / request_bars_from_http / subscribe_bars / unsubscribe_bars with an Hour-aggregated BarType whose step is not {1,2,4,8,12}, e.g. a 6-HOUR or 24-HOUR bar spec.","commonSituations":"Strategies configured with 24-HOUR bars (should be 1-DAY), 6-HOUR bars from another venue's supported set, or generic resampling configs not tailored to Hyperliquid's interval list.","solutions":["Change the hour step to 1, 2, 4, 8, or 12.","Use a Day-aggregated bar type (step 1 or 3) instead of 24-hour bars.","Resample locally: subscribe to a supported interval (e.g. 4-HOUR) and aggregate to the desired width in the strategy.","Validate the bar spec against supported intervals before subscribing."],"exampleFix":"// before\nlet bar_type = BarType::new(instrument_id, 6, BarAggregation::Hour, PriceType::Last);\n// after\nlet bar_type = BarType::new(instrument_id, 8, BarAggregation::Hour, PriceType::Last);","handlingStrategy":"validation","validationCode":"const HYPERLIQUID_HOUR_STEPS: [u32; 5] = [1, 2, 4, 8, 12];\nif spec.aggregation() == BarAggregation::Hour\n    && !HYPERLIQUID_HOUR_STEPS.contains(&spec.step()) {\n    return Err(anyhow::anyhow!(\"hour step {} unsupported on Hyperliquid\", spec.step()));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use DAY bars instead of 24-HOUR bars","Check interval support per venue before sharing bar configs across adapters","Sweep only supported steps in parameter optimization"],"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-14T05:17:10.506Z"}