{"record":{"id":"3d1c8acfc215f981","repo":"nautechsystems/nautilus_trader","slug":"unsupported-lighter-candle-day-step-step","errorCode":null,"errorMessage":"unsupported Lighter candle day step: {step}","messagePattern":"unsupported Lighter candle day step: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/lighter/src/common/enums.rs","lineNumber":278,"sourceCode":"\n        let step = spec.step.get();\n        match spec.aggregation {\n            BarAggregation::Minute => match step {\n                1 => Ok(Self::OneMinute),\n                5 => Ok(Self::FiveMinute),\n                15 => Ok(Self::FifteenMinute),\n                30 => Ok(Self::ThirtyMinute),\n                _ => anyhow::bail!(\"unsupported Lighter candle minute step: {step}\"),\n            },\n            BarAggregation::Hour => match step {\n                1 => Ok(Self::OneHour),\n                4 => Ok(Self::FourHour),\n                12 => Ok(Self::TwelveHour),\n                _ => anyhow::bail!(\"unsupported Lighter candle hour step: {step}\"),\n            },\n            BarAggregation::Day => match step {\n                1 => Ok(Self::OneDay),\n                _ => anyhow::bail!(\"unsupported Lighter candle day step: {step}\"),\n            },\n            BarAggregation::Week => match step {\n                1 => Ok(Self::OneWeek),\n                _ => anyhow::bail!(\"unsupported Lighter candle week step: {step}\"),\n            },\n            other => anyhow::bail!(\"unsupported Lighter candle aggregation: {other}\"),\n        }\n    }\n}\n\n/// Lighter historical funding resolution.\n#[derive(\n    Copy,\n    Clone,\n    Debug,\n    Default,\n    Display,\n    PartialEq,","sourceCodeStart":260,"sourceCodeEnd":296,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/lighter/src/common/enums.rs#L260-L296","documentation":"Raised by the LighterCandleInterval try_from conversion when the aggregation is Day and the step is anything other than 1. Lighter only provides a single 1-day candle interval, so multi-day bars cannot be requested from the venue and are rejected locally.","triggerScenarios":"Calling try_from with aggregation=Day and step != 1 (e.g. Day/step 7 or Day/step 3) through subscribe_bars or request_bars.","commonSituations":"Requesting weekly bars as Day/step 7 instead of Week/step 1; generic bar configs generated from a timedelta of multiple days; configs ported from exchanges that allow multi-day candles.","solutions":["Use BarAggregation::Day with step 1.","For multi-day periods use the Week aggregation with step 1 where applicable.","Resample locally from 1-day bars to obtain 2d/3d/7d bars.","Validate day step == 1 before constructing the request."],"exampleFix":"// before\nBarSpec { aggregation: BarAggregation::Day, step: 7, .. }\n// after\nBarSpec { aggregation: BarAggregation::Week, step: 1, .. }","handlingStrategy":"validation","validationCode":"if bar_spec.aggregation == BarAggregation::Day {\n    assert_eq!(bar_spec.step, 1, \"Lighter only supports Day/step 1 bars\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use Week/step 1 for 7-day periods instead of Day/step 7.","Validate day step == 1 in config validation.","Aggregate multi-day bars client-side from daily bars."],"tags":["rust","adapter","bar-aggregation","configuration"],"backgroundTag":"unsupported-enum-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"}