{"record":{"id":"11e0c67c1e4d2b9e","repo":"nautechsystems/nautilus_trader","slug":"limit-order-requires-a-price","errorCode":null,"errorMessage":"LIMIT order requires a price","messagePattern":"LIMIT order requires a price","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/coinbase/src/http/client.rs","lineNumber":1651,"sourceCode":"            match time_in_force {\n                TimeInForce::Ioc | TimeInForce::Gtc => {\n                    Ok(OrderConfiguration::MarketIoc(MarketIoc {\n                        market_market_ioc: params,\n                    }))\n                }\n                TimeInForce::Fok => Ok(OrderConfiguration::MarketFok(MarketFok {\n                    market_market_fok: params,\n                })),\n                _ => {\n                    anyhow::bail!(\n                        \"Unsupported TIF {time_in_force} for MARKET on Coinbase (use IOC or FOK)\"\n                    )\n                }\n            }\n        }\n        OrderType::Limit => {\n            let limit_price =\n                price.ok_or_else(|| anyhow::anyhow!(\"LIMIT order requires a price\"))?;\n\n            match time_in_force {\n                TimeInForce::Gtc => Ok(OrderConfiguration::LimitGtc(LimitGtc {\n                    limit_limit_gtc: LimitGtcParams {\n                        base_size: qty,\n                        limit_price,\n                        post_only,\n                    },\n                })),\n                TimeInForce::Gtd => {\n                    let expire = expire_time\n                        .ok_or_else(|| anyhow::anyhow!(\"GTD LIMIT requires expire_time\"))?;\n                    Ok(OrderConfiguration::LimitGtd(LimitGtd {\n                        limit_limit_gtd: LimitGtdParams {\n                            base_size: qty,\n                            limit_price,\n                            end_time: format_rfc3339_from_nanos(expire)?,\n                            post_only,","sourceCodeStart":1633,"sourceCodeEnd":1669,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/coinbase/src/http/client.rs#L1633-L1669","documentation":"This error is raised by `build_order_configuration` when a `LIMIT` order is submitted without a `price`. A limit order is meaningless without a limit price, and Coinbase's `LimitGtc`/`LimitGtd`/`LimitFok` payloads require `limit_price`, so the adapter fails fast rather than sending a malformed request. It typically indicates the submit request was constructed as LIMIT but its price field was None.","triggerScenarios":"Submitting a LIMIT order where the price parameter is None — e.g. a strategy building a limit order without specifying price, or a generic order factory that leaves price unset, with any TIF (GTC/GTD/FOK).","commonSituations":"Strategy bugs where the limit price is computed but never passed into the order request; converting market-order code paths to limit without adding a price; serialization round-trips dropping an unset price.","solutions":["Provide a valid limit `Price` when constructing the LIMIT order/request.","Check the strategy/order-factory code path to ensure price is populated for LIMIT orders.","Validate before submission: reject LIMIT requests with no price early with a clearer message.","If the order was meant to be MARKET, change the order type instead of leaving price unset."],"exampleFix":"// before\nlet order = factory.limit(instrument_id, Buy, qty); // price never set\n// after\nlet price = Price::from(\"65000.00\");\nlet order = factory.limit(instrument_id, Buy, qty, price, TimeInForce::Gtc);","handlingStrategy":"validation","validationCode":"fn validate_limit_request(order_type: OrderType, price: Option<Price>) -> Result<(), String> {\n    match order_type {\n        OrderType::Limit if price.is_none() => Err(\"LIMIT order requires a price\".into()),\n        _ => Ok(()),\n    }\n}","typeGuard":null,"tryCatchPattern":"match build_order_configuration(OrderType::Limit, side, qty, price, None, tif, None, post_only, false, false) {\n    Ok(config) => submit(config),\n    Err(e) if e.to_string().contains(\"requires a price\") => {\n        tracing::error!(\"limit order submitted without price; fix order construction\");\n        Err(e)\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Always set a price for LIMIT/STOP_LIMIT orders at the order-factory level.","Add pre-submit validation of required fields per order type.","Use typed builders that force a price for limit orders.","Add unit tests asserting limit orders carry a price."],"tags":["coinbase","orders","limit-order","missing-field","validation"],"backgroundTag":"missing-required-argument","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"}