Smart Trading endpoints

ActionEndpointKey identifiers
CreatePOST /strategy/smartTradingStrategy/createTradeaccount_id, currency, source, trade
CancelPOST /strategy/smartTradingStrategy/cancelTradeaccount_id and trade_ids
List unfinishedPOST /strategy/smartTradingStrategy/openTradesaccount_id; optional currency
Update a legPOST /strategy/smartTradingStrategy/updateLegaccount_id, trade_id, leg_id plus price or spread

Trade object

The Stable reference documents legs, split_count, is_balance, order_interval, check_interval, stop_seconds, reduce_only, hidden_order, condition, efficient_mode, finish_order_mode, capture_mode, capture_spread_bp and price_protection. These optional controls do not guarantee execution outcomes. When capture_mode is enabled, every leg must be an option and price_mode must be dynamic_mark_price or dynamic_screen_price; check the current reference before enabling it. Time units depend on the full response path: trade.start_time and trade.stop_time are Unix seconds; trade.legs[].start_time is Unix milliseconds. Do not apply one rule to every start_time field. stop_seconds is a duration, not a timestamp. Preserve raw values and use endpoint-specific timestamp mappings.

Leg fieldMeaningValidation
idStable leg identifier used by updateLeg.Optional: provide and persist a unique ID, or persist the server-generated ID returned in the response.
instrumentDeribit instrument name.Validate against the selected account and currency.
directionlong or short.Do not infer it from signed amount.
amountPositive quantity.Reject zero/negative or wrong contract units.
price_modeHow price/IV follows the market.Use one documented mode and its required companion field.
price / spreadAbsolute limit or dynamic offset.limit modes need price; dynamic modes need spread.
sortLeg ordering for balanced execution.Positive and only meaningful when balanced.

Documented price modes

Mode familyValuesRequired value
ImmediatemarketNo price or spread.
Fixed limitlimit_price, limit_ivprice.
Dynamicdynamic_mark_price, dynamic_screen_price, dynamic_mark_iv, dynamic_screen_ivspread.

Execution lifecycle

  • Create a client-side operation ID and lock the strategy/cart against double submission.
  • Normalize legs, persist every leg ID and show the final payload to an operator.
  • Submit createTrade once and store the returned trade ID.
  • Poll openTrades for unfinished tasks. A task disappearing from that list does not prove that every leg filled; check the history and Deribit order/fill state.
  • Use updateLeg only to change price or spread for the identified leg.
  • Cancel using exact trade IDs when required, then check openTrades and Deribit orders/fills; a cancel response alone does not prove that all orders were cancelled.
  • Look for final history within a defined review window, then reconcile each leg and fill with Deribit.

Risk controls to add around the API

  • Maximum contracts and maximum premium per operation.
  • Allowed instrument expiries and strike distance.
  • reduce_only validation against current positions.
  • Deadline and clock-skew checks around stop_seconds.
  • Operator confirmation when balance, hidden order or dynamic pricing is used.
  • Single-flight create requests and a recovery process for unknown outcomes.
Smart Trading product guideConcepts, preview and human workflow.Logs and historyMonitor and reconcile API-controlled executions.