Orderbook

private/order

Submits a signed limit or market order for a subaccount, specifying instrument, direction, amount, limit price and max fee, plus optional flags like time-in-force, reduce-only, post-only and MMP. The same endpoint also creates trigger orders (via trigger_type/trigger_price) and algo orders (via algo_type), though the two cannot be combined in one request. Requires a signed order payload and Orderbook trade scope for the instrument's asset; returns the created order with its assigned id and current status.

post/private/order

Request

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

Request body

algo_duration_secinteger nullable
algo_num_slicesinteger nullable
algo_type'twap'
amountstring decimal required

Order amount in units of the base, as a decimal string (e.g. "1.5") or a JSON number.

clientstring nullable
direction'buy' | 'sell' required
extra_feestring decimal nullable

Optional extra fee per unit of volume, as a decimal string or JSON number. Defaults to zero.

instrument_namestring required
is_atomic_signingboolean nullable
labelstring nullable
limit_pricestring decimal required

Limit price in quote currency, as a decimal string (e.g. "3100.5") or a JSON number.

max_feestring decimal required

Max fee per unit of volume in quote currency, as a decimal string or a JSON number.

mmpboolean nullable

Tags the order for market maker protection. Only tagged orders are cancelled by cancel on disconnect.

noncestring required
order_type'limit' | 'market'
reduce_onlyboolean nullable
referral_codestring nullable
reject_post_onlyboolean nullable
reject_timestampinteger nullable
signaturestring required
signature_expiry_secinteger required
signerstring required
subaccount_idinteger required
time_in_force'gtc' | 'post_only' | 'fok' | 'ioc'
trigger_pricestring decimal nullable

Trigger price as a decimal string or JSON number; omit for non-trigger orders.

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

Response

Success

Changes

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