{"record":{"id":"fef57e765774d8c4","repo":"nautechsystems/nautilus_trader","slug":"unsupported-lighter-candle-week-step-step","errorCode":null,"errorMessage":"unsupported Lighter candle week step: {step}","messagePattern":"unsupported Lighter candle week step: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/lighter/src/common/enums.rs","lineNumber":282,"sourceCode":"                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,\n    Eq,\n    Hash,\n    AsRefStr,\n    EnumIter,","sourceCodeStart":264,"sourceCodeEnd":300,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/lighter/src/common/enums.rs#L264-L300","documentation":"Raised by the LighterCandleInterval try_from conversion when the aggregation is Week and the step is not 1. Only 1-week candles exist on Lighter, so any other week step is rejected before a subscription is attempted.","triggerScenarios":"Calling try_from with aggregation=Week and step != 1 (e.g. Week/step 2 or Week/step 4) via subscribe_bars or request_bars.","commonSituations":"Requesting biweekly or monthly bars; translating an exchange's 2w/1M intervals to Lighter; templated configs that scale the step uniformly.","solutions":["Use BarAggregation::Week with step 1.","Resample locally from weekly (or daily) bars for longer periods.","Validate week step == 1 before building the BarSpec.","If monthly bars are needed, aggregate client-side from 1d or 1w bars."],"exampleFix":"// before\nBarSpec { aggregation: BarAggregation::Week, step: 2, .. }\n// after\nBarSpec { aggregation: BarAggregation::Week, step: 1, .. } // resample 2w client-side","handlingStrategy":"validation","validationCode":"if bar_spec.aggregation == BarAggregation::Week {\n    assert_eq!(bar_spec.step, 1, \"Lighter only supports Week/step 1 bars\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate week step == 1 before requesting bars.","Resample longer periods from weekly or daily bars locally."],"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"}