{"record":{"id":"40177774c09f1b05","repo":"nautechsystems/nautilus_trader","slug":"binance-product-type-futures-does-not-support","errorCode":null,"errorMessage":"Binance {product_type:?} Futures does not support native GTD","messagePattern":"Binance (.+?) Futures does not support native GTD","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/futures/execution.rs","lineNumber":1181,"sourceCode":"        log::warn!(\n            \"Binance Futures GTD submitted as GTC because use_gtd=false. Enable manage_gtd_expiry on the submitting strategy\"\n        );\n        return Ok(FuturesOrderLifetime {\n            time_in_force: TimeInForce::Gtc,\n            good_till_date: None,\n        });\n    }\n\n    anyhow::ensure!(\n        matches!(\n            order_type,\n            OrderType::Limit | OrderType::StopLimit | OrderType::LimitIfTouched\n        ),\n        \"Binance Futures does not support GTD for order type {order_type:?}\"\n    );\n    anyhow::ensure!(!post_only, \"Binance Futures GTD cannot be post-only\");\n\n    anyhow::ensure!(\n        product_type == BinanceProductType::UsdM,\n        \"Binance {product_type:?} Futures does not support native GTD\"\n    );\n\n    let expire_time = expire_time.context(\"Binance Futures GTD requires an expire_time\")?;\n    let expire_ns = expire_time.as_u64();\n    anyhow::ensure!(\n        expire_ns.is_multiple_of(NANOSECONDS_IN_SECOND),\n        \"Binance Futures goodTillDate requires whole-second precision\"\n    );\n\n    let minimum_ns = ts_now\n        .as_u64()\n        .checked_add(BINANCE_GTD_MIN_LEAD_SECS * NANOSECONDS_IN_SECOND)\n        .context(\"Binance Futures GTD minimum timestamp overflow\")?;\n    anyhow::ensure!(\n        expire_ns > minimum_ns,\n        \"Binance Futures goodTillDate must be strictly greater than current time plus {BINANCE_GTD_MIN_LEAD_SECS} seconds\"","sourceCodeStart":1163,"sourceCodeEnd":1199,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/futures/execution.rs#L1163-L1199","documentation":"Only the USD-margined futures product (UsdM, /fapi) supports Binance's native goodTillDate; the coin-margined product (CoinM, /dapi) has no equivalent parameter, so the client refuses native GTD for CoinM. The guard fires when an order qualifies for native GTD (correct type, not post-only) but config.product_type is CoinM. The intended alternative is local expiry management via manage_gtd_expiry=false, which submits GTC and lets the strategy cancel at expiry.","triggerScenarios":"Running BinanceFuturesExecutionClient with product_type: CoinM and submitting a GTD order from a strategy with manage_gtd_expiry enabled (Limit/StopLimit/LimitIfTouched, not post-only).","commonSituations":"Porting a USD-M strategy config to COIN-M venues (BTCUSDT_PERP vs BTCUSD_PERM style symbols) without adjusting TIF handling; enabling native GTD globally on a multi-product deployment.","solutions":["Use product_type UsdM if native GTD is required","For CoinM, set manage_gtd_expiry=false on the submitting strategy so GTD submits as GTC and the strategy expires the order itself","Or replace Gtd with Gtc plus strategy-side cancel-on-time logic"],"exampleFix":"// before: CoinM client + strategy with manage_gtd_expiry=true submits GTD order\nlet order = Order::limit(instrument_id, side, qty, price)\n    .time_in_force(TimeInForce::Gtd).expire_time(expiry);\n\n// after: keep CoinM but let the strategy manage expiry\n// strategy config: manage_gtd_expiry = false  (order submits as GTC, strategy cancels at expiry)\n// or switch the client to UsdM for native GTD","handlingStrategy":"validation","validationCode":"use binance product enum;\n\nif order.time_in_force() == TimeInForce::Gtd && strategy.manage_gtd_expiry {\n    anyhow::ensure!(\n        config.product_type == BinanceProductType::UsdM,\n        \"native GTD needs UsdM; for CoinM set manage_gtd_expiry=false\"\n    );\n}","typeGuard":"fn product_supports_native_gtd(product_type: BinanceProductType) -> bool {\n    product_type == BinanceProductType::UsdM\n}","tryCatchPattern":null,"preventionTips":["Per-venue GTD policy in config: native on UsdM, strategy-managed on CoinM","Smoke-test one GTD order per product type after adapter upgrades"],"tags":["binance-futures","gtd","coinm","product-type","time-in-force","rust"],"backgroundTag":"good-till-date-validation","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}