nautechsystems/nautilus_trader · error

Unsupported minute step for Kraken Futures: {step}

Error message

Unsupported minute step for Kraken Futures: {step}

What it means

Kraken Futures OHLC endpoints accept only 1m, 5m, and 15m resolutions for Minute bars. bar_type_to_futures_resolution maps the BarType spec to these strings and bails when a Minute-bar step is anything else.

Source

Thrown at crates/adapters/kraken/src/common/parse.rs:1199

}

/// Converts a Nautilus BarType to Kraken Futures API resolution string.
///
/// Supported resolutions: 1m, 5m, 15m, 1h, 4h, 12h, 1d, 1w
///
/// # Errors
///
/// Returns an error if:
/// - Bar aggregation type is not supported.
/// - Bar step is not supported for the aggregation type.
pub fn bar_type_to_futures_resolution(bar_type: BarType) -> anyhow::Result<&'static str> {
    let step = bar_type.spec().step.get() as u32;
    match bar_type.spec().aggregation {
        BarAggregation::Minute => match step {
            1 => Ok("1m"),
            5 => Ok("5m"),
            15 => Ok("15m"),
            _ => anyhow::bail!("Unsupported minute step for Kraken Futures: {step}"),
        },
        BarAggregation::Hour => match step {
            1 => Ok("1h"),
            4 => Ok("4h"),
            12 => Ok("12h"),
            _ => anyhow::bail!("Unsupported hour step for Kraken Futures: {step}"),
        },
        BarAggregation::Day => {
            if step == 1 {
                Ok("1d")
            } else {
                anyhow::bail!("Unsupported day step for Kraken Futures: {step}")
            }
        }
        BarAggregation::Week => {
            if step == 1 {
                Ok("1w")
            } else {

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Use a supported step: 1, 5, or 15 minutes.
  2. Request 1m bars and aggregate to the desired interval (e.g. 30m) locally.
  3. Switch to Hour/Day aggregation with a supported step if that fits the interval.

Example fix

// before
BarSpec::new(BarAggregation::Minute, 30)
// after
BarSpec::new(BarAggregation::Minute, 15) // or aggregate 1m bars to 30m locally
Defensive patterns

Strategy: validation

Validate before calling

const FUTURES_MINUTE_STEPS: [u32; 3] = [1, 5, 15];
if bar_type.spec().aggregation == BarAggregation::Minute
    && !FUTURES_MINUTE_STEPS.contains(&bar_type.spec().step.get() as u32) {
    eprintln!("Kraken Futures minute steps: 1, 5, 15");
}

Try / catch

match bar_type_to_futures_resolution(&bar_type) {
    Ok(res) => request(res),
    Err(e) if e.to_string().contains("Unsupported") => {
        request("1m")?; /* aggregate locally */
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: request_bars calls bar_type_to_futures_resolution with BarAggregation::Minute and step not in {1, 5, 15} — e.g. 2-minute, 10-minute, or 30-minute bars on Kraken Futures.

Common situations: Reusing bar specs tuned for other exchanges (e.g. 30m crypto bars) against Kraken Futures; generic multi-venue bar configuration.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/e193ef4b64680797. Report an issue: GitHub.