Smart Trading endpoints
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.
Documented price modes
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.