{"record":{"id":"f4f4f50b666c1c75","repo":"nautechsystems/nautilus_trader","slug":"price-match-cannot-be-combined-with-post-only-orde","errorCode":null,"errorMessage":"price_match cannot be combined with post-only orders","messagePattern":"price_match cannot be combined with post-only orders","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/futures/execution.rs","lineNumber":2564,"sourceCode":"\n            if !matches!(\n                order_type,\n                OrderType::StopMarket | OrderType::MarketIfTouched\n            ) {\n                anyhow::bail!(\n                    \"`close_position` is not supported for order type {order_type:?} on Binance\"\n                );\n            }\n\n            if order.is_reduce_only() {\n                anyhow::bail!(\"`close_position` cannot be combined with `reduce_only` on Binance\");\n            }\n        }\n\n        if let Some(pm_str) = cmd.params.as_ref().and_then(|p| p.get_str(\"price_match\")) {\n            BinancePriceMatch::from_param(pm_str)?;\n            let order_type = order.order_type();\n            anyhow::ensure!(\n                !order.is_post_only(),\n                \"price_match cannot be combined with post-only orders\"\n            );\n            anyhow::ensure!(\n                order_type == OrderType::Limit,\n                \"price_match is not supported for order type {order_type:?}\"\n            );\n        }\n\n        let lifetime = determine_futures_order_lifetime(\n            self.product_type,\n            order.order_type(),\n            order.time_in_force(),\n            order.expire_time(),\n            order.is_post_only(),\n            self.config.use_gtd,\n            self.clock.get_time_ns(),\n        )?;","sourceCodeStart":2546,"sourceCodeEnd":2582,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/futures/execution.rs#L2546-L2582","documentation":"price_match (priceMatch=OPP/OPP1) prices a LIMIT order against the best price on the opposite side of the book; Binance does not allow combining it with post-only. The adapter validates this combination before submission and rejects the order locally.","triggerScenarios":"SubmitOrder with a price_match param on an order built with post_only=true.","commonSituations":"Strategies stacking liquidity-provider constraints (post-only) with passive pricing features; config defaults that enable post_only globally while a template adds price_match.","solutions":["Remove post_only for orders that use price_match","Or drop price_match and specify an explicit limit price for post-only orders"],"exampleFix":"// before — conflicting combination\n// order: post_only = true; params: price_match = \"OPP\"\n\n// after — choose one\n// order: post_only = false; params: price_match = \"OPP\"","handlingStrategy":"validation","validationCode":"// Before submit_order()\nif params.get_str(\"price_match\").is_some() {\n    assert!(!order.is_post_only(), \"price_match cannot combine with post-only\");\n}","typeGuard":"fn price_match_combinable(has_price_match: bool, post_only: bool) -> bool {\n    !has_price_match || !post_only\n}","tryCatchPattern":"On this local rejection, resubmit with either post_only disabled or the price_match param removed and an explicit limit price set.","preventionTips":["Review global post-only defaults before adding price_match to templates","Unit-test parameter combinations for Binance-bound orders","Keep venue-specific parameter rules documented alongside strategy config"],"tags":["binance","futures","price-match","post-only","order-validation","rust"],"backgroundTag":"conflicting-order-parameters","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}