{"record":{"id":"09e32b0060686aa8","repo":"nautechsystems/nautilus_trader","slug":"unsupported-tif-time-in-force-for-stop-limit-on","errorCode":null,"errorMessage":"Unsupported TIF {time_in_force} for STOP_LIMIT on Coinbase","messagePattern":"Unsupported TIF (.+?) for STOP_LIMIT on Coinbase","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/coinbase/src/http/client.rs","lineNumber":1714,"sourceCode":"                        limit_price,\n                        stop_price,\n                        stop_direction: direction,\n                    },\n                })),\n                TimeInForce::Gtd => {\n                    let expire = expire_time\n                        .ok_or_else(|| anyhow::anyhow!(\"GTD STOP_LIMIT requires expire_time\"))?;\n                    Ok(OrderConfiguration::StopLimitGtd(StopLimitGtd {\n                        stop_limit_stop_limit_gtd: StopLimitGtdParams {\n                            base_size: qty,\n                            limit_price,\n                            stop_price,\n                            stop_direction: direction,\n                            end_time: format_rfc3339_from_nanos(expire)?,\n                        },\n                    }))\n                }\n                _ => anyhow::bail!(\"Unsupported TIF {time_in_force} for STOP_LIMIT on Coinbase\"),\n            }\n        }\n        other => anyhow::bail!(\"Unsupported order type for Coinbase: {other}\"),\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use rstest::rstest;\n\n    use super::*;\n\n    #[rstest]\n    fn test_raw_client_construction_live() {\n        let client = CoinbaseRawHttpClient::new(CoinbaseEnvironment::Live, 10, None, None).unwrap();\n        assert_eq!(client.environment(), CoinbaseEnvironment::Live);\n        assert!(!client.is_authenticated());\n    }","sourceCodeStart":1696,"sourceCodeEnd":1732,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/coinbase/src/http/client.rs#L1696-L1732","documentation":"When building a STOP_LIMIT order, the adapter matches the TimeInForce to one of the Coinbase stop-limit order configurations (GTC/GTD with end_time, etc.). Any TIF not explicitly handled causes an immediate bail, because Coinbase's STOP_LIMIT schema differs per TIF and the adapter cannot synthesize a request.","triggerScenarios":"Submitting a STOP_LIMIT order to Coinbase with a TimeInForce outside the handled set (e.g. Ioc, Fok, Day) instead of Gtc or Gtd.","commonSituations":"Reusing a STOP_LIMIT order spec written for another exchange that allows IOC/FOK stop-limits; strategy config that sets stop-limit exits with a TIF Coinbase rejects.","solutions":["Use TimeInForce::Gtc or TimeInForce::Gtd for STOP_LIMIT orders on Coinbase","If GTD, ensure the expire time is set (it is formatted via format_rfc3339_from_nanos)","Extend the match arms only if Coinbase's API adds support for the TIF"],"exampleFix":"// before\n.order_type(OrderType::StopLimit).time_in_force(TimeInForce::Ioc)\n// after\n.order_type(OrderType::StopLimit).time_in_force(TimeInForce::Gtc)","handlingStrategy":"validation","validationCode":"fn coinbase_stop_limit_tif(tif: TimeInForce) -> Result<(), String> {\n    match tif {\n        TimeInForce::Gtc | TimeInForce::Gtd => Ok(()),\n        other => Err(format!(\"Coinbase STOP_LIMIT supports Gtc/Gtd only, got {other}\")),\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pair STOP_LIMIT with Gtc or Gtd on Coinbase","Set expire time when using Gtd","Add venue capability checks in the execution path"],"tags":["rust","coinbase","orders","stop-limit"],"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"}