{"record":{"id":"c7dc82faff8bd6a3","repo":"nautechsystems/nautilus_trader","slug":"binance-futures-gtd-cannot-be-post-only","errorCode":null,"errorMessage":"Binance Futures GTD cannot be post-only","messagePattern":"Binance Futures GTD cannot be post-only","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/futures/execution.rs","lineNumber":1501,"sourceCode":"\n    if !use_gtd {\n        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!(","sourceCodeStart":1483,"sourceCodeEnd":1519,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/binance/src/futures/execution.rs#L1483-L1519","documentation":"Binance Futures rejects a native GTD (goodTillDate) order that is also post-only; the two constraints cannot be combined at the venue. The adapter enforces this client-side in determine_futures_order_lifetime so the order fails fast with a clear message instead of an exchange rejection.","triggerScenarios":"validate_order / build_futures_order_list_batch with TimeInForce=Gtd, use_gtd=true, and post_only=true on a Limit (or limit-style) order.","commonSituations":"Maker-only strategies using post-only limit orders while a global GTD expiry is configured; combining a default expire_time with the adapter's post-only flag without realizing the venue disallows the pair.","solutions":["Drop post_only on GTD orders (post_only=false) if the expiry is required.","Keep post_only and switch time_in_force to Gtc.","Set use_gtd=false (or manage_gtd_expiry locally) so the GTD is emulated client-side as GTC with a local cancel, preserving post-only.","Split configuration: post-only orders use GTC, expiring orders skip post-only."],"exampleFix":"// before\norder_factory.limit(..., TimeInForce::Gtd, Some(expire), post_only=true);\n// after\norder_factory.limit(..., TimeInForce::Gtc, None, post_only=true); // or post_only=false with GTD","handlingStrategy":"validation","validationCode":"if tif == TimeInForce::Gtd && use_gtd && post_only {\n    // choose: post_only + Gtc, or GTD without post_only\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not combine post-only with GTD in Binance Futures configs","Use local GTD emulation (use_gtd=false + manage_gtd_expiry) when post-only is required"],"tags":["gtd","post-only","binance-futures","unsupported-combination"],"backgroundTag":"unsupported-operation","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}