{"record":{"id":"c4ad126cc8d7c261","repo":"nautechsystems/nautilus_trader","slug":"unsupported-tif-time-in-force-for-market-on-coin","errorCode":null,"errorMessage":"Unsupported TIF {time_in_force} for MARKET on Coinbase (use IOC or FOK)","messagePattern":"Unsupported TIF (.+?) for MARKET on Coinbase \\(use IOC or FOK\\)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/coinbase/src/http/client.rs","lineNumber":1643,"sourceCode":"                }\n            } else {\n                MarketParams {\n                    quote_size: None,\n                    base_size: Some(qty),\n                }\n            };\n\n            match time_in_force {\n                TimeInForce::Ioc | TimeInForce::Gtc => {\n                    Ok(OrderConfiguration::MarketIoc(MarketIoc {\n                        market_market_ioc: params,\n                    }))\n                }\n                TimeInForce::Fok => Ok(OrderConfiguration::MarketFok(MarketFok {\n                    market_market_fok: params,\n                })),\n                _ => {\n                    anyhow::bail!(\n                        \"Unsupported TIF {time_in_force} for MARKET on Coinbase (use IOC or FOK)\"\n                    )\n                }\n            }\n        }\n        OrderType::Limit => {\n            let limit_price =\n                price.ok_or_else(|| anyhow::anyhow!(\"LIMIT order requires a price\"))?;\n\n            match time_in_force {\n                TimeInForce::Gtc => Ok(OrderConfiguration::LimitGtc(LimitGtc {\n                    limit_limit_gtc: LimitGtcParams {\n                        base_size: qty,\n                        limit_price,\n                        post_only,\n                    },\n                })),\n                TimeInForce::Gtd => {","sourceCodeStart":1625,"sourceCodeEnd":1661,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/coinbase/src/http/client.rs#L1625-L1661","documentation":"When converting a MARKET order to Coinbase's Advanced Trade API payload, only IOC and FOK time-in-force values are supported (mapped to MarketIoc/MarketFok configurations). Any other TIF on a MARKET order is rejected by the payload builder.","triggerScenarios":"Submitting a MARKET order whose TimeInForce is GTC, GTD, DAY, etc.; typically from a config that sets a default TIF globally without considering order type.","commonSituations":"Strategy defaults TIF=GTC for all orders; a routing layer that stamps DAY on market orders; porting orders built for venues that accept GTC market orders.","solutions":["Set time_in_force to TimeInForce::Ioc (or Fok) on MARKET orders sent to Coinbase","Leave TIF unset so the adapter can map the market order appropriately if supported","Adjust strategy/order-factory defaults so only limit orders carry GTC/DAY","Validate the (order_type, time_in_force) combination in pre-submit checks"],"exampleFix":"// before\nlet order = order_factory.market(..., TimeInForce::Gtc, ...);\n\n// after\nlet order = order_factory.market(..., TimeInForce::Ioc, ...);","handlingStrategy":"validation","validationCode":"if order.order_type == OrderType::Market\n    && !matches!(order.time_in_force, TimeInForce::Ioc | TimeInForce::Fok | TimeInForce::Gtc)\n{\n    return Err(anyhow!(\"Coinbase MARKET orders need IOC or FOK\"));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure the order factory to use IOC for market orders","Keep GTC/DAY defaults only on limit orders","Add a pre-submit (order_type, tif) compatibility check per venue","Document per-venue TIF support in your routing layer"],"tags":["order-type","time-in-force","unsupported-operation","rust"],"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"}