nautechsystems/nautilus_trader · error
unsupported Lighter candle week step: {step}
Error message
unsupported Lighter candle week step: {step} What it means
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.
Source
Thrown at crates/adapters/lighter/src/common/enums.rs:282
1 => Ok(Self::OneMinute),
5 => Ok(Self::FiveMinute),
15 => Ok(Self::FifteenMinute),
30 => Ok(Self::ThirtyMinute),
_ => anyhow::bail!("unsupported Lighter candle minute step: {step}"),
},
BarAggregation::Hour => match step {
1 => Ok(Self::OneHour),
4 => Ok(Self::FourHour),
12 => Ok(Self::TwelveHour),
_ => anyhow::bail!("unsupported Lighter candle hour step: {step}"),
},
BarAggregation::Day => match step {
1 => Ok(Self::OneDay),
_ => anyhow::bail!("unsupported Lighter candle day step: {step}"),
},
BarAggregation::Week => match step {
1 => Ok(Self::OneWeek),
_ => anyhow::bail!("unsupported Lighter candle week step: {step}"),
},
other => anyhow::bail!("unsupported Lighter candle aggregation: {other}"),
}
}
}
/// Lighter historical funding resolution.
#[derive(
Copy,
Clone,
Debug,
Default,
Display,
PartialEq,
Eq,
Hash,
AsRefStr,
EnumIter,View on GitHub (pinned to 18893faf8b)
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.
Example fix
// before
BarSpec { aggregation: BarAggregation::Week, step: 2, .. }
// after
BarSpec { aggregation: BarAggregation::Week, step: 1, .. } // resample 2w client-side Defensive patterns
Strategy: validation
Validate before calling
if bar_spec.aggregation == BarAggregation::Week {
assert_eq!(bar_spec.step, 1, "Lighter only supports Week/step 1 bars");
} Prevention
- Validate week step == 1 before requesting bars.
- Resample longer periods from weekly or daily bars locally.
When it happens
Trigger: Calling try_from with aggregation=Week and step != 1 (e.g. Week/step 2 or Week/step 4) via subscribe_bars or request_bars.
Common situations: Requesting biweekly or monthly bars; translating an exchange's 2w/1M intervals to Lighter; templated configs that scale the step uniformly.
Related errors
- unsupported Lighter candle minute step: {step}
- unsupported Lighter candle hour step: {step}
- unsupported Lighter candle day step: {step}
- unsupported Lighter candle aggregation: {other}
- Unsupported blockchain {blockchain} for RPC connection
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/fef57e765774d8c4.
Report an issue: GitHub.