Orderbook

private/cancel

Cancels one resting order identified by order_id, subaccount_id and instrument_name. Requires any trade scope on the session; returns the cancelled order with its final status.

post/private/cancel

Request

  • Base URL: https://api.derive.xyz/v3
  • URL: https://api.derive.xyz/v3/private/cancel
  • Auth: none declared

Request body

instrument_namestring required
order_idstring uuid required

UUID v4 string

subaccount_idinteger required

Response

Success

algo_duration_secinteger nullable
algo_num_slicesinteger nullable
algo_slices_completedinteger nullable
algo_type'twap'
amountstring decimal required

Decimal string of the human value (e.g. "1.5"), up to 12 fractional digits; a string or JSON number is accepted

average_pricestring decimal required

Decimal string of the human value (e.g. "1.5"), up to 12 fractional digits; a string or JSON number is accepted

cancel_reason'' | 'user_request' | 'mmp_trigger' | 'insufficient_margin' | 'signed_max_fee_too_low' | 'cancel_on_disconnect' | 'ioc_or_market_partial_fill' | 'session_key_deregistered' | 'subaccount_withdrawn' | 'compliance' | 'trigger_failed' | 'validation_failed' | 'algo_completed'
creation_timestampinteger required
direction'buy' | 'sell' required
extra_feestring decimal required

Decimal string of the human value (e.g. "1.5"), up to 12 fractional digits; a string or JSON number is accepted

filled_amountstring decimal required

Decimal string of the human value (e.g. "1.5"), up to 12 fractional digits; a string or JSON number is accepted

instrument_namestring required
is_transferboolean required
labelstring
last_update_timestampinteger required
limit_pricestring decimal required

Decimal string of the human value (e.g. "1.5"), up to 12 fractional digits; a string or JSON number is accepted

max_feestring decimal required

Decimal string of the human value (e.g. "1.5"), up to 12 fractional digits; a string or JSON number is accepted

mmpboolean required
noncestring required
order_feestring decimal required

Decimal string of the human value (e.g. "1.5"), up to 12 fractional digits; a string or JSON number is accepted

order_idstring required
order_status'open' | 'filled' | 'rejected' | 'cancelled' | 'expired' | 'untriggered' | 'algo_active' required
order_type'limit' | 'market' required
quote_idstring uuid nullable required

Optional UUID v4 string

replaced_order_idstring uuid nullable required

Optional UUID v4 string

signaturestring required
signature_expiry_secinteger required
signed_limit_pricestring decimal nullable required

Optional decimal string of the human value (e.g. "1.5"), up to 12 fractional digits, or null; a string or JSON number is accepted

signerstring required
subaccount_idinteger required
time_in_force'gtc' | 'post_only' | 'fok' | 'ioc' required
trigger_pricestring decimal nullable required

Optional decimal string of the human value (e.g. "1.5"), up to 12 fractional digits, or null; a string or JSON number is accepted

trigger_price_type'mark' | 'index'
trigger_reject_messagestring nullable
trigger_type'stoploss' | 'takeprofit'

Changes

No recorded changes to this operation across all 1 revision of this API.