{"record":{"id":"bb230b6008ce21d4","repo":"nautechsystems/nautilus_trader","slug":"unsupported-tif-time-in-force-for-limit-on-coinb","errorCode":null,"errorMessage":"Unsupported TIF {time_in_force} for LIMIT on Coinbase","messagePattern":"Unsupported TIF (.+?) for LIMIT on Coinbase","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/coinbase/src/http/client.rs","lineNumber":1679,"sourceCode":"                TimeInForce::Gtd => {\n                    let expire = expire_time\n                        .ok_or_else(|| anyhow::anyhow!(\"GTD LIMIT requires expire_time\"))?;\n                    Ok(OrderConfiguration::LimitGtd(LimitGtd {\n                        limit_limit_gtd: LimitGtdParams {\n                            base_size: qty,\n                            limit_price,\n                            end_time: format_rfc3339_from_nanos(expire)?,\n                            post_only,\n                        },\n                    }))\n                }\n                TimeInForce::Fok => Ok(OrderConfiguration::LimitFok(LimitFok {\n                    limit_limit_fok: LimitFokParams {\n                        base_size: qty,\n                        limit_price,\n                    },\n                })),\n                _ => anyhow::bail!(\"Unsupported TIF {time_in_force} for LIMIT on Coinbase\"),\n            }\n        }\n        OrderType::StopLimit => {\n            let limit_price =\n                price.ok_or_else(|| anyhow::anyhow!(\"STOP_LIMIT order requires a price\"))?;\n            let stop_price = trigger\n                .ok_or_else(|| anyhow::anyhow!(\"STOP_LIMIT order requires trigger_price\"))?;\n            let direction = match side {\n                OrderSide::Buy => CoinbaseStopDirection::StopUp,\n                OrderSide::Sell => CoinbaseStopDirection::StopDown,\n            };\n\n            match time_in_force {\n                TimeInForce::Gtc => Ok(OrderConfiguration::StopLimitGtc(StopLimitGtc {\n                    stop_limit_stop_limit_gtc: StopLimitGtcParams {\n                        base_size: qty,\n                        limit_price,\n                        stop_price,","sourceCodeStart":1661,"sourceCodeEnd":1697,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/coinbase/src/http/client.rs#L1661-L1697","documentation":"The Coinbase adapter builds a LIMIT order request by matching the order's TimeInForce to a specific Coinbase product type (GTC, GTD, IOC, FOK). If the TIF is anything not explicitly handled, the adapter aborts with this anyhow error because Coinbase's REST API requires a distinct order configuration per TIF and no fallback exists.","triggerScenarios":"Submitting a LIMIT order to Coinbase whose TimeInForce is not one of Gtc, Gtd, Ioc, Fok — e.g. a TIF value like MarketOnOpen/Day/AtTheOpen/Unknown that reached the order factory or client.","commonSituations":"Configuring strategies with a Nautilus TimeInForce that has no Coinbase equivalent (e.g. DAY or OPG mapped straight through); copying order templates from other venues (Binance/FX) that use DAY TIF; leaving TIF unset so it deserializes to an unsupported variant.","solutions":["Set the order's time_in_force to Gtc, Gtd, Ioc, or Fok before submitting LIMIT orders to Coinbase","Add the missing TIF to the match arm in build order configuration if Coinbase now supports it (check API docs)","Use an order factory preset that only produces Coinbase-supported TIF values"],"exampleFix":"// before\nlet order = self.factory.limit(..., TimeInForce::Day, ...);\n// after\nlet order = self.factory.limit(..., TimeInForce::Gtc, ...); // or Ioc/Fok/Gtd","handlingStrategy":"validation","validationCode":"fn coinbase_limit_tif(tif: TimeInForce) -> Result<(), String> {\n    match tif {\n        TimeInForce::Gtc | TimeInForce::Gtd | TimeInForce::Ioc | TimeInForce::Fok => Ok(()),\n        other => Err(format!(\"Coinbase LIMIT does not support TIF {other}\")),\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict order factory presets to Coinbase-supported TIF values","Validate TIF in strategy config at startup","Keep a per-venue supported-TIF table and filter orders before submit"],"tags":["rust","coinbase","orders","time-in-force"],"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"}