{"record":{"id":"524ba31b37a5422c","repo":"nautechsystems/nautilus_trader","slug":"fok-not-supported-by-kraken-futures-use-ioc-inste","errorCode":null,"errorMessage":"FOK not supported by Kraken Futures, use IOC instead","messagePattern":"FOK not supported by Kraken Futures, use IOC instead","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/kraken/src/http/futures/client.rs","lineNumber":1951,"sourceCode":"\n        let raw_symbol = instrument.raw_symbol().inner();\n\n        // Map order type and time-in-force to Kraken order type\n        // Kraken Futures encodes TIF in the orderType field:\n        // - lmt = limit (GTC)\n        // - ioc = immediate-or-cancel\n        // - post = post-only (maker only)\n        // - mkt = market\n        let kraken_order_type = match order_type {\n            OrderType::Market => KrakenFuturesOrderType::Market,\n            OrderType::Limit => {\n                if post_only {\n                    KrakenFuturesOrderType::Post\n                } else {\n                    match time_in_force {\n                        TimeInForce::Ioc => KrakenFuturesOrderType::Ioc,\n                        TimeInForce::Fok => {\n                            anyhow::bail!(\"FOK not supported by Kraken Futures, use IOC instead\")\n                        }\n                        TimeInForce::Gtd => {\n                            anyhow::bail!(\"GTD not supported by Kraken Futures, use GTC instead\")\n                        }\n                        _ => KrakenFuturesOrderType::Limit, // GTC is default\n                    }\n                }\n            }\n            OrderType::StopMarket | OrderType::StopLimit => KrakenFuturesOrderType::Stop,\n            OrderType::MarketIfTouched | OrderType::LimitIfTouched => {\n                KrakenFuturesOrderType::TakeProfit\n            }\n            _ => anyhow::bail!(\"Unsupported order type: {order_type:?}\"),\n        };\n\n        let kraken_side = KrakenOrderSide::from(order_side);\n\n        let mut builder = KrakenFuturesSendOrderParamsBuilder::default();","sourceCodeStart":1933,"sourceCodeEnd":1969,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/kraken/src/http/futures/client.rs#L1933-L1969","documentation":"Kraken Futures does not support Fill-or-Kill time in force for limit orders. build_send_order_params explicitly rejects TimeInForce::Fok with this message, advising IOC as the closest supported alternative.","triggerScenarios":"Submitting a Limit order via submit_order/send_order_batches with time_in_force = Fok on the Kraken Futures adapter.","commonSituations":"Reusing order parameters tuned for other venues (e.g. FOK-heavy strategies from Binance/Coinbase) against Kraken Futures; strategy config defaulting to FOK.","solutions":["Change the order's time_in_force to Ioc.","Use Gtc if immediate-or-cancel semantics are not strictly required.","Adjust strategy config so FOK is never emitted for the Kraken Futures venue."],"exampleFix":"// before\nbuilder.time_in_force(TimeInForce::Fok)\n// after\nbuilder.time_in_force(TimeInForce::Ioc)","handlingStrategy":"validation","validationCode":"fn tif_futures_supported(tif: TimeInForce) -> bool {\n    !matches!(tif, TimeInForce::Fok | TimeInForce::Gtd)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Map FOK to IOC in a venue-specific order translator before submission.","Keep per-venue TIF whitelist in strategy config.","Test order emitters against Kraken Futures TIF rules in a staging run."],"tags":["kraken","futures","time-in-force","unsupported"],"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"}