nautechsystems/nautilus_trader · error
Unsupported TIF {time_in_force} for MARKET on Coinbase (use
Error message
Unsupported TIF {time_in_force} for MARKET on Coinbase (use IOC or FOK) What it means
When converting a MARKET order to Coinbase's Advanced Trade API payload, only IOC and FOK time-in-force values are supported (mapped to MarketIoc/MarketFok configurations). Any other TIF on a MARKET order is rejected by the payload builder.
Source
Thrown at crates/adapters/coinbase/src/http/client.rs:1643
}
} else {
MarketParams {
quote_size: None,
base_size: Some(qty),
}
};
match time_in_force {
TimeInForce::Ioc | TimeInForce::Gtc => {
Ok(OrderConfiguration::MarketIoc(MarketIoc {
market_market_ioc: params,
}))
}
TimeInForce::Fok => Ok(OrderConfiguration::MarketFok(MarketFok {
market_market_fok: params,
})),
_ => {
anyhow::bail!(
"Unsupported TIF {time_in_force} for MARKET on Coinbase (use IOC or FOK)"
)
}
}
}
OrderType::Limit => {
let limit_price =
price.ok_or_else(|| anyhow::anyhow!("LIMIT order requires a price"))?;
match time_in_force {
TimeInForce::Gtc => Ok(OrderConfiguration::LimitGtc(LimitGtc {
limit_limit_gtc: LimitGtcParams {
base_size: qty,
limit_price,
post_only,
},
})),
TimeInForce::Gtd => {View on GitHub (pinned to 18893faf8b)
Solutions
- Set time_in_force to TimeInForce::Ioc (or Fok) on MARKET orders sent to Coinbase
- Leave TIF unset so the adapter can map the market order appropriately if supported
- Adjust strategy/order-factory defaults so only limit orders carry GTC/DAY
- Validate the (order_type, time_in_force) combination in pre-submit checks
Example fix
// before let order = order_factory.market(..., TimeInForce::Gtc, ...); // after let order = order_factory.market(..., TimeInForce::Ioc, ...);
Defensive patterns
Strategy: validation
Validate before calling
if order.order_type == OrderType::Market
&& !matches!(order.time_in_force, TimeInForce::Ioc | TimeInForce::Fok | TimeInForce::Gtc)
{
return Err(anyhow!("Coinbase MARKET orders need IOC or FOK"));
} Prevention
- Configure the order factory to use IOC for market orders
- Keep GTC/DAY defaults only on limit orders
- Add a pre-submit (order_type, tif) compatibility check per venue
- Document per-venue TIF support in your routing layer
When it happens
Trigger: Submitting a MARKET order whose TimeInForce is GTC, GTD, DAY, etc.; typically from a config that sets a default TIF globally without considering order type.
Common situations: Strategy defaults TIF=GTC for all orders; a routing layer that stamps DAY on market orders; porting orders built for venues that accept GTC market orders.
Related errors
- Unsupported OrderType for conditional orders: {value:?}
- Conditional order types must use OKXAlgoOrderType
- Invalid `OrderType` cannot be represented on OKX: {value:?}
- `InstrumentId` not applicable to `Block`
- Unsupported order type: {:?}, the Architect AX adapter accep
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/c4ad126cc8d7c261.
Report an issue: GitHub.