nautechsystems/nautilus_trader · error
Unsupported order type {other:?} for Deribit
Error message
Unsupported order type {other:?} for Deribit What it means
build_order_params maps Nautilus OrderType values to Deribit order types. Only Market, Limit, StopLimit, StopMarket, LimitIfTouched, and MarketIfTouched are supported; any other OrderType (e.g. trailing variants) hits the catch-all arm and bails.
Source
Thrown at crates/adapters/deribit/src/execution.rs:250
if errors.is_empty() {
Ok(())
} else {
anyhow::bail!(errors.join("; "))
}
}
// Rejects unsupported order types and time-in-force values
fn build_order_params(order: &dyn Order) -> anyhow::Result<DeribitOrderParams> {
let order_type = match order.order_type() {
OrderType::Limit => "limit",
OrderType::Market => "market",
OrderType::StopLimit => "stop_limit",
OrderType::StopMarket => "stop_market",
OrderType::LimitIfTouched => "take_limit",
OrderType::MarketIfTouched => "take_market",
other => {
anyhow::bail!("Unsupported order type {other:?} for Deribit");
}
}
.to_string();
let time_in_force = if matches!(
order.order_type(),
OrderType::Market | OrderType::StopMarket | OrderType::MarketIfTouched
) {
// Deribit rejects `time_in_force` on market-style order types
None
} else {
Some(
match order.time_in_force() {
TimeInForce::Gtc => "good_til_cancelled",
TimeInForce::Ioc => "immediate_or_cancel",
TimeInForce::Fok => "fill_or_kill",
TimeInForce::Gtd => {
if order.expire_time().is_some() {View on GitHub (pinned to 18893faf8b)
Solutions
- Use a supported OrderType: Market, Limit, StopMarket, StopLimit, MarketIfTouched, or LimitIfTouched
- Emulate unsupported types (e.g. trailing stops) in strategy code or with Nautilus order emulation
- Guard order submission with a match on order_type() before sending to Deribit
Example fix
// before let order = factory.trailing_stop(...); exec_client.submit_order(&order)?; // after let order = factory.stop_limit(...); // Deribit-supported type exec_client.submit_order(&order)?;
Defensive patterns
Strategy: type-guard
Validate before calling
const SUPPORTED: &[OrderType] = &[
OrderType::Market, OrderType::Limit, OrderType::StopLimit,
OrderType::StopMarket, OrderType::LimitIfTouched, OrderType::MarketIfTouched,
];
if !SUPPORTED.contains(&order.order_type()) {
return Err(anyhow::anyhow!("{:#?} unsupported on Deribit", order.order_type()));
} Type guard
fn deribit_supported(t: OrderType) -> bool {
matches!(t, OrderType::Market | OrderType::Limit | OrderType::StopLimit
| OrderType::StopMarket | OrderType::LimitIfTouched | OrderType::MarketIfTouched)
} Try / catch
match exec_client.submit_order(&order) {
Err(e) if e.to_string().contains("Unsupported order type") => emulate_or_convert_order(&order),
other => other,
} Prevention
- Restrict strategy order factories to Deribit-supported OrderTypes
- Use Nautilus order emulation for trailing-stop style orders on Deribit
- Add a startup-time config check rejecting unsupported order types per venue
When it happens
Trigger: Submitting an order whose order_type() is not one of Market/StopLimit/StopMarket/LimitIfTouched/MarketIfTouched/Limit — for example OrderType::LimitThatCatchesUp or trailing-stop types — via submit_order on the Deribit execution client.
Common situations: Strategy code written venue-agnostically issuing trailing-stop orders; portfolio-level order factories defaulting to an exotic order type; migration from another venue whose adapter maps more types.
Related errors
- Unsupported time_in_force {other:?} for Deribit
- Deribit only supports L2_MBP order book deltas
- errors joined with "; " (aggregated disconnect errors)
- Unsupported order type for Hyperliquid: {order.order_type():
- unsupported Nautilus order type for Lighter: {e}
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/9aa5d9bc17b82fe7.
Report an issue: GitHub.