{"record":{"id":"e193ef4b64680797","repo":"nautechsystems/nautilus_trader","slug":"unsupported-minute-step-for-kraken-futures-step","errorCode":null,"errorMessage":"Unsupported minute step for Kraken Futures: {step}","messagePattern":"Unsupported minute step for Kraken Futures: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/kraken/src/common/parse.rs","lineNumber":1199,"sourceCode":"}\n\n/// Converts a Nautilus BarType to Kraken Futures API resolution string.\n///\n/// Supported resolutions: 1m, 5m, 15m, 1h, 4h, 12h, 1d, 1w\n///\n/// # Errors\n///\n/// Returns an error if:\n/// - Bar aggregation type is not supported.\n/// - Bar step is not supported for the aggregation type.\npub fn bar_type_to_futures_resolution(bar_type: BarType) -> anyhow::Result<&'static str> {\n    let step = bar_type.spec().step.get() as u32;\n    match bar_type.spec().aggregation {\n        BarAggregation::Minute => match step {\n            1 => Ok(\"1m\"),\n            5 => Ok(\"5m\"),\n            15 => Ok(\"15m\"),\n            _ => anyhow::bail!(\"Unsupported minute step for Kraken Futures: {step}\"),\n        },\n        BarAggregation::Hour => match step {\n            1 => Ok(\"1h\"),\n            4 => Ok(\"4h\"),\n            12 => Ok(\"12h\"),\n            _ => anyhow::bail!(\"Unsupported hour step for Kraken Futures: {step}\"),\n        },\n        BarAggregation::Day => {\n            if step == 1 {\n                Ok(\"1d\")\n            } else {\n                anyhow::bail!(\"Unsupported day step for Kraken Futures: {step}\")\n            }\n        }\n        BarAggregation::Week => {\n            if step == 1 {\n                Ok(\"1w\")\n            } else {","sourceCodeStart":1181,"sourceCodeEnd":1217,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/kraken/src/common/parse.rs#L1181-L1217","documentation":"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.","triggerScenarios":"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.","commonSituations":"Reusing bar specs tuned for other exchanges (e.g. 30m crypto bars) against Kraken Futures; generic multi-venue bar configuration.","solutions":["Use a supported step: 1, 5, or 15 minutes.","Request 1m bars and aggregate to the desired interval (e.g. 30m) locally.","Switch to Hour/Day aggregation with a supported step if that fits the interval."],"exampleFix":"// before\nBarSpec::new(BarAggregation::Minute, 30)\n// after\nBarSpec::new(BarAggregation::Minute, 15) // or aggregate 1m bars to 30m locally","handlingStrategy":"validation","validationCode":"const FUTURES_MINUTE_STEPS: [u32; 3] = [1, 5, 15];\nif bar_type.spec().aggregation == BarAggregation::Minute\n    && !FUTURES_MINUTE_STEPS.contains(&bar_type.spec().step.get() as u32) {\n    eprintln!(\"Kraken Futures minute steps: 1, 5, 15\");\n}","typeGuard":null,"tryCatchPattern":"match bar_type_to_futures_resolution(&bar_type) {\n    Ok(res) => request(res),\n    Err(e) if e.to_string().contains(\"Unsupported\") => {\n        request(\"1m\")?; /* aggregate locally */\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Restrict Kraken Futures bar specs to 1m/5m/15m, 1h/4h/12h, 1d, 1w.","Validate bar specs at strategy config load time.","Fallback pattern: request the finest supported resolution and aggregate locally."],"tags":["kraken-futures","bars","resolution","unsupported"],"backgroundTag":"invalid-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"}