private/batch-order-request
REQUESTA batched order operation endpoint that allows you to submit multiple cancel and create order operations in a single request for a specific instrument.wss://stream.crypto.com/exchange/v1/user
private/batch-order-requestPrivate
Cancels are processed before creates (not atomic by default). Operations are independent (one failure doesn't roll back others) when atomic is false.
Limits:
- Maximum 10 create orders per batch request
- At least one of cancels or creates must be non-empty
This call is asynchronous, so the response is simply a confirmation of the request.
The user.order subscription can be used to check when orders are successfully created or canceled.
Request
Body
required
- Array [
- ]
- Array [
- ➖ M: Cancel Maker
- ➖ T: Cancel Taker
- ➖ B: Cancel Both Maker and Taker
- ➖ M: Matches Master or Sub a/c
- ➖ S: Matches Sub a/c only
- ➖ D: reset all STP fields to default (stp_inst and stp_id in same request are ignored).
- ]
Request id (echoed in response)
Must be "private/batch-order-request"
Current timestamp in milliseconds, e.g. "1771761038000".
params objectrequired
Target instrument for all operations in this batch request.
cancels object[]
Order ID to cancel.
Client Order ID to cancel.
creates object[]
<= 1000 Instrument symbol, e.g. BTCUSD-PERP
Possible values: [BUY, SELL]
BUY or SELL
Order quantity. For MARKET BUY can use notional instead.
Client order ID (max 36 chars). Recommended for correlation.
Possible values: [GOOD_TILL_CANCEL, IMMEDIATE_OR_CANCEL, FILL_OR_KILL]
Time in force
Possible values: [POST_ONLY, REDUCE_ONLY, SMART_POST_ONLY, ISOLATED_MARGIN, MARGIN_ORDER]
Optional array of execution instructions. POST_ONLY and SMART_POST_ONLY mutually exclusive.
Fee instrument (e.g. CRO) for fee deduction
Self-trade prevention ID (0 to 32767)
Possible values: [M, T, B]
Self-trade prevention instruction. Used in private/change-account-settings (params) and private/get-account-settings (result). Mandatory if stp_scope is set.
Possible values: [M, S, D]
Self-trade prevention scope. Used in private/change-account-settings (params) and private/get-account-settings (result).
Possible values: [LIMIT, MARKET]
Order type: LIMIT or MARKET
Limit price (required for LIMIT orders)
Amount to spend; for MARKET BUY only (alternative to quantity)
Possible values: [SPOT, MARGIN]
SPOT or MARGIN (spot/margin mode).
Isolated margin amount
Isolation ID for isolated margin
Leverage for margin/derivatives
Self-trade prevention cancel behavior.
Self-trade prevention account enforcement flag.
Self-trade prevention group ID.
Schema
- Array [
- ]
- Array [
- ]
Echoed request id
Method invoked
0 = success; non-zero indicates error (reason code).
result object
cancels object[]
0 if success.
Order ID that was cancelled.
Client Order ID that was cancelled.
(Optional) Error or status message.
creates object[]
0 if success.
Newly created order ID.
Client Order ID from the request.
(Optional) Error or status message.
Present when code !== 0.
Present when code !== 0.