{"record":{"id":"4eff4192ee4fa0d7","repo":"nautechsystems/nautilus_trader","slug":"unsupported-time-in-force-e","errorCode":null,"errorMessage":"Unsupported time in force: {e}","messagePattern":"Unsupported time in force: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/polymarket/src/execution/submitter.rs","lineNumber":441,"sourceCode":"    }\n\n    /// Prepares multiple limit order submissions in parallel.\n    pub(crate) async fn prepare_limit_order_submissions(\n        &self,\n        requests: &[LimitOrderSubmitRequest],\n    ) -> Vec<anyhow::Result<SignedLimitOrderSubmission>> {\n        let futures = requests\n            .iter()\n            .map(|request| self.prepare_limit_order_submission(request));\n        futures_util::future::join_all(futures).await\n    }\n\n    pub(crate) async fn prepare_limit_order_submission(\n        &self,\n        request: &LimitOrderSubmitRequest,\n    ) -> anyhow::Result<SignedLimitOrderSubmission> {\n        let order_type = PolymarketOrderType::try_from(request.time_in_force)\n            .map_err(|e| anyhow::anyhow!(\"Unsupported time in force: {e}\"))?;\n        let side = PolymarketOrderSide::from(request.side);\n        let expiration = limit_order_expiration(request.expire_time);\n\n        let order = if request.quote_quantity {\n            anyhow::ensure!(\n                side == PolymarketOrderSide::Buy,\n                \"Limit SELL orders require quote_quantity=false (amount in shares)\"\n            );\n            self.order_builder.build_limit_order_from_collateral(\n                &request.token_id,\n                request.price.as_decimal(),\n                request.quantity.as_decimal(),\n                &expiration,\n                request.neg_risk,\n                request.tick_decimals,\n            )\n        } else {\n            self.order_builder.build_limit_order(","sourceCodeStart":423,"sourceCodeEnd":459,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/polymarket/src/execution/submitter.rs#L423-L459","documentation":"Raised in `prepare_limit_order_submission` when converting the request's `TimeInForce` to a `PolymarketOrderType` via TryFrom fails. Polymarket limit orders support GTC, GTD, FOK and FAK only; the bail message is 'Unsupported `TimeInForce` for Polymarket: {value:?}'. The limit order is not built or signed.","triggerScenarios":"Submitting a limit order with a TimeInForce variant outside {Gtc, Gtd, Fok, Ioc}, e.g. TimeInForce::Day or venue-specific variants not mapped for Polymarket.","commonSituations":"Strategies ported from equity/futures adapters that default to DAY orders; configs using a TimeInForce enum variant added in a newer core version but not yet mapped in the Polymarket adapter.","solutions":["Use TimeInForce::Gtc (resting), Gtd (with expire_time), Fok, or Ioc for Polymarket limit orders","Map unsupported TIF variants at the strategy layer to the nearest supported one","Check the adapter's enums.rs for the currently supported set"],"exampleFix":"// before\nlet req = LimitOrderSubmitRequest { time_in_force: TimeInForce::Day, .. };\n// after\nlet req = LimitOrderSubmitRequest { time_in_force: TimeInForce::Gtc, .. };","handlingStrategy":"validation","validationCode":"match tif {\n    TimeInForce::Gtc | TimeInForce::Gtd | TimeInForce::Fok | TimeInForce::Ioc => {}\n    other => return Err(anyhow!(\"unsupported Polymarket limit TIF: {other:?}\")),\n}","typeGuard":null,"tryCatchPattern":"if let Err(e) = prepare_limit_order_submission(&req).await {\n    if e.to_string().contains(\"Unsupported `TimeInForce`\") {\n        // translate TIF (e.g. Day -> Gtc) and rebuild the request\n    }\n}","preventionTips":["Restrict strategy TIF options to GTC/GTD/FOK/IOC for Polymarket","Translate foreign TIF variants at the strategy layer"],"tags":["polymarket","time-in-force","enum","limit-order"],"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-14T05:17:10.506Z"}