{"record":{"id":"f1d0552261300b7c","repo":"nautechsystems/nautilus_trader","slug":"unsupported-day-step-step-f1d055","errorCode":null,"errorMessage":"Unsupported day step: {step}","messagePattern":"Unsupported day step: (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/hyperliquid/src/common/parse.rs","lineNumber":466,"sourceCode":"            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\n/// cannot be derived from the symbol alone). `slippage_bps` controls the\n/// buffer applied when deriving a limit from a stop trigger price.\npub fn order_to_hyperliquid_request_with_asset(\n    order: &OrderAny,\n    asset: u32,","sourceCodeStart":448,"sourceCodeEnd":484,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/hyperliquid/src/common/parse.rs#L448-L484","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nlet bar_type = BarType::new(instrument_id, 7, BarAggregation::Day, PriceType::Last);\n// after\nlet bar_type = BarType::new(instrument_id, 1, BarAggregation::Week, PriceType::Last);","handlingStrategy":"validation","validationCode":"if spec.aggregation() == BarAggregation::Day && !matches!(spec.step(), 1 | 3) {\n    return Err(anyhow::anyhow!(\"day step {} unsupported on Hyperliquid\", spec.step()));\n}\n// weekly: use BarAggregation::Week with step 1","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"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"}