nautechsystems/nautilus_trader · error

Unsupported order type for Coinbase: {other}

Error message

Unsupported order type for Coinbase: {other}

What it means

The Coinbase order-configuration builder only implements LIMIT and STOP_LIMIT order types (plus market handled elsewhere); any other OrderType falls through to the catch-all `other` arm and is rejected. The error message echoes the unhandled OrderType value for diagnosis.

Source

Thrown at crates/adapters/coinbase/src/http/client.rs:1717

                    },
                })),
                TimeInForce::Gtd => {
                    let expire = expire_time
                        .ok_or_else(|| anyhow::anyhow!("GTD STOP_LIMIT requires expire_time"))?;
                    Ok(OrderConfiguration::StopLimitGtd(StopLimitGtd {
                        stop_limit_stop_limit_gtd: StopLimitGtdParams {
                            base_size: qty,
                            limit_price,
                            stop_price,
                            stop_direction: direction,
                            end_time: format_rfc3339_from_nanos(expire)?,
                        },
                    }))
                }
                _ => anyhow::bail!("Unsupported TIF {time_in_force} for STOP_LIMIT on Coinbase"),
            }
        }
        other => anyhow::bail!("Unsupported order type for Coinbase: {other}"),
    }
}

#[cfg(test)]
mod tests {
    use rstest::rstest;

    use super::*;

    #[rstest]
    fn test_raw_client_construction_live() {
        let client = CoinbaseRawHttpClient::new(CoinbaseEnvironment::Live, 10, None, None).unwrap();
        assert_eq!(client.environment(), CoinbaseEnvironment::Live);
        assert!(!client.is_authenticated());
    }

    #[rstest]
    fn test_raw_client_construction_sandbox() {

View on GitHub (pinned to 18893faf8b)

Solutions

  1. Only submit Market, Limit, or StopLimit orders to Coinbase; route other types through an emulated contingent-order controller
  2. Convert the unsupported type (e.g. StopMarket -> StopLimit) before submission
  3. Add a builder arm if Coinbase's API has since added the order type

Example fix

// before
client.submit(OrderType::StopMarket, ...)
// after
// use OrderEmulator or convert:
client.submit(OrderType::StopLimit, ...) // with price + trigger
Defensive patterns

Strategy: validation

Validate before calling

fn coinbase_supported_order_type(t: OrderType) -> bool {
    matches!(t, OrderType::Market | OrderType::Limit | OrderType::StopLimit)
}

Try / catch

match client.submit(order).await {
    Err(e) if e.to_string().contains("Unsupported order type") => {
        // route to OrderEmulator or convert order type
    }
    r => r.expect("submit"),
}

Prevention

When it happens

Trigger: Calling the Coinbase HTTP client's order submission with an OrderType such as StopMarket, LimitIfTouched, TrailingStopMarket, or MarketToLimit that has no builder arm.

Common situations: Strategy emits conditional/trailing orders naively routed to Coinbase; a generic execution engine forwards all order types without venue capability filtering; newer Nautilus order types not yet mapped in the adapter.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/2082479b5a162f9d. Report an issue: GitHub.