private/create-order
POSTCreates a new BUY or SELL order./private/create-order
This call is asynchronous, so the response is simply a confirmation of the request.
The user.order subscription can be used to check when the order is successfully created.
Request
Body
required
- ➖ LIMIT: Limit order at specified price.
- ➖ MARKET: Market order; executes at best available price.
- ➖ STOP: Stop order; triggers a market order when ref_price is reached.
- ➖ STOP_LIMIT: Stop-limit order; places a limit order when ref_price is reached.
- ➖ BEST_BID_OR_LAST_PRICE: Best bid price or last traded price (whichever is higher for BUY, lower for SELL)
- ➖ BEST_ASK_OR_LAST_PRICE: Best ask price or last traded price (whichever is lower for BUY, higher for SELL)
- ➖ GOOD_TILL_CANCEL: Active until filled or explicitly cancelled. Default for limit orders.
- ➖ IMMEDIATE_OR_CANCEL: Fill immediately (partial or full); cancel remainder.
- ➖ FILL_OR_KILL: Fill entirely and immediately, or cancel the entire order.
- ➖ GOOD_TILL_DATE: Active until expire_time_ns. Requires expire_time_ns.
Request id (echoed in response)
Must be "private/create-order"
Your API key (only required for private REST)
HMAC-SHA256 signature in hex (only required for private REST)
Current timestamp in milliseconds, e.g. "1771761038000".
params objectrequired
Instrument symbol, e.g. BTCUSD-PERP.
Possible values: [BUY, SELL]
BUY or SELL
Possible values: [LIMIT, MARKET, STOP, STOP_LIMIT]
Order type:
Order quantity.
Limit price. Required for LIMIT and STOP_LIMIT orders.
Trigger price. Required for STOP_LOSS and STOP_LIMIT orders.
Possible values: [BEST_BID_OR_LAST_PRICE, BEST_ASK_OR_LAST_PRICE]
Reference price type for trigger orders:
Client order ID (max 36 chars). Recommended for correlation.
Possible values: [GOOD_TILL_CANCEL, IMMEDIATE_OR_CANCEL, FILL_OR_KILL, GOOD_TILL_DATE]
Time in force:
Order expiry time in epoch nanoseconds. Required when time_in_force is GOOD_TILL_DATE.
Schema
Echoed request id
Method invoked
0 = success; non-zero indicates error (reason code).
result object
Newly created order ID
Client Order ID from the request, or the request nonce if not provided. Recommend specifying client_oid as nonce can be the same across orders.
Response message. Contains additional reason when code !== 0.
Present when code !== 0.