Place Order (TRADE)
Place Order (TRADE).
query Parameters
symbolTrading pair, for example BTCUSDT.
sideOrder side. Supported values: BUY, SELL.
positionSidePosition side. Supported values: LONG, SHORT.
typeOrder type. Supported values: LIMIT, MARKET.
quantityOrder quantity. Must be greater than 0.
newClientOrderIdClient order identifier (1-36 characters, pattern ^[\.A-Z:/a-z0-9_-]{1,36}$).
timeInForceTime-in-force policy. Required when type = LIMIT. Supported values: GTC, IOC, FOK, POST_ONLY.
priceLimit price. Required when type = LIMIT.
tpTriggerPriceOptional take-profit trigger price.
slTriggerPriceOptional stop-loss trigger price.
TpWorkingTypeTake-profit trigger price source. Supported values: CONTRACT_PRICE, MARK_PRICE. Default CONTRACT_PRICE.
SlWorkingTypeStop-loss trigger price source. Supported values: CONTRACT_PRICE, MARK_PRICE. Default CONTRACT_PRICE.
reduceOnlyWhether the order is reduce-only.
Place Order (TRADE) › Responses
Successful response
orderIdOrder ID assigned by the system.
clientOrderIdEcho of newClientOrderId.
successWhether the order request was accepted.
errorCodeError code when success = false; otherwise empty.
errorMessageError message when success = false; otherwise empty.
Place Orders Batch (TRADE)
Place Orders Batch (TRADE).
query Parameters
batchOrdersUp to 5 orders per request. Each element uses the same fields as Place Order (TRADE).
Place Orders Batch (TRADE) › Responses
Successful response
orderIdOrder ID assigned by the system.
clientOrderIdEcho of newClientOrderId.
successWhether the order request was accepted.
errorCodeError code when success = false; otherwise empty.
errorMessageError message when success = false; otherwise empty.
Cancel Order (TRADE)
Cancel Order (TRADE).
query Parameters
orderIdTarget order ID. Required when origClientOrderId is not provided.
origClientOrderIdClient order ID, 1-36 characters. Required when orderId is not provided.
Cancel Order (TRADE) › Responses
Successful response
orderIdCancelled order ID.
origClientOrderIdClient order ID (if provided).
successWhether the cancel request succeeded.
errorCodeError code when success = false.
errorMessageError description when success = false.
Cancel Orders Batch (TRADE)
Cancel Orders Batch (TRADE).
query Parameters
orderIdListUp to 10 order IDs to cancel. Required when origClientOrderIdList is empty.
origClientOrderIdListUp to 10 client order IDs. Each must match ^[\.A-Z:/a-z0-9_-]{1,36}$. Required when orderIdList is empty.
Cancel Orders Batch (TRADE) › Responses
Successful response
orderIdCancelled order ID.
origClientOrderIdClient order ID (if provided).
successWhether the cancel request succeeded.
errorCodeError code when success = false.
errorMessageError description when success = false.
Cancel All Open Orders (TRADE)
Cancel All Open Orders (TRADE).
query Parameters
symbolTrading pair to filter. Omit to cancel all open orders across symbols.
Cancel All Open Orders (TRADE) › Responses
Successful response
orderIdID of the cancelled order.
successWhether this order was successfully cancelled.
errorCodeError code when success = false.
errorMessageError message when success = false.
Close Positions (TRADE)
Close Positions (TRADE).
query Parameters
symbolTrading pair to close.
positionIdPosition ID.
Close Positions (TRADE) › Responses
Successful response
positionIdPosition identifier.
successWhether the close action succeeded.
successOrderIdOrder ID created to close the position (when successful).
errorMessageFailure reason when success = false.
Place Conditional Order (TRADE)
Place Conditional Order (TRADE).
query Parameters
symbolTrading pair, e.g. BTCUSDT.
sideOrder side. Values: BUY, SELL.
positionSidePosition side. Values: LONG, SHORT.
typeConditional order type. Values: STOP, TAKE_PROFIT, STOP_MARKET, TAKE_PROFIT_MARKET, TRAILING_MARKET.
quantityOrder quantity. Must be > 0.
clientAlgoIdClient-defined identifier (1-36 characters, pattern ^[\.A-Z:/a-z0-9_-]{1,36}$).
priceExecution price. Required when type is STOP or TAKE_PROFIT.
triggerPriceTrigger price. Required when type is STOP, TAKE_PROFIT, STOP_MARKET, or TAKE_PROFIT_MARKET.
presetTakeProfitPriceOptional take-profit trigger price.
presetStopLossPriceOptional stop-loss trigger price.
TpWorkingTypeTake-profit trigger type: CONTRACT_PRICE or MARK_PRICE. Default CONTRACT_PRICE.
SlWorkingTypeStop-loss trigger type: CONTRACT_PRICE or MARK_PRICE. Default CONTRACT_PRICE.
activatePriceTrailing stop activation price. Only valid when type = TRAILING_MARKET. If omitted, the current market price is used based on workingType.
callbackRateTrailing stop callback rate. Required when type = TRAILING_MARKET. Range: [0.001, 0.9999].
workingTypePrice type used for trailing activation and callback. Values: CONTRACT_PRICE, MARK_PRICE. Default CONTRACT_PRICE.
reduceOnlyWhether the order is reduce-only.
Place Conditional Order (TRADE) › Responses
Successful response
orderIdOrder ID assigned by the system.
clientOrderIdEcho of newClientOrderId.
successWhether the order request was accepted.
errorCodeError code when success = false; otherwise empty.
errorMessageError message when success = false; otherwise empty.
Cancel Conditional Order (TRADE)
Cancel Conditional Order (TRADE).
query Parameters
orderIdConditional order ID to cancel.
Cancel Conditional Order (TRADE) › Responses
Successful response
orderIdCancelled order ID.
origClientOrderIdClient order ID (if provided).
successWhether the cancel request succeeded.
errorCodeError code when success = false.
errorMessageError description when success = false.
Cancel All Conditional Orders (TRADE)
Cancel All Conditional Orders (TRADE).
query Parameters
symbolTrading pair filter. Omit to cancel all conditional orders.
Cancel All Conditional Orders (TRADE) › Responses
Successful response
orderIdConditional order ID.
successWhether the cancel succeeded.
errorCodeError code when success = false.
errorMessageError description when success = false.
Place TP/SL Conditional Orders (TRADE)
Place TP/SL Conditional Orders (TRADE).
query Parameters
symbolTrading pair.
clientAlgoIdClient-defined identifier (1-36 characters, pattern ^[\.A-Z:/a-z0-9_-]{1,36}$).
planTypePlan type. Values: TAKE_PROFIT, STOP_LOSS.
triggerPriceTrigger price (> 0).
positionSidePosition side (LONG, SHORT).
executePriceExecution price. Set to 0 or omit for market execution. Copy-trading API keys only support market close, so this field must be 0 or omitted.
quantityQuantity to execute. Set to 0 or omit to set TP/SL for the full position. Copy-trading API keys must close the full position, so this field must be 0 or omitted.
triggerPriceTypeTrigger source. CONTRACT_PRICE or MARK_PRICE. Default CONTRACT_PRICE.
reduceOnlyWhether the order is reduce-only.
Place TP/SL Conditional Orders (TRADE) › Responses
Successful response
successWhether the plan order was accepted.
orderIdPlan order ID when successful.
errorCodeError code when success = false.
errorMessageError description when success = false.
Modify TP/SL Conditional Order (TRADE)
Modify TP/SL Conditional Order (TRADE).
query Parameters
orderIdConditional order ID to modify.
triggerPriceNew trigger price (> 0).
executePriceNew execution price. Set to 0 or omit to switch to market execution. Copy-trading API keys only support market close, so this field must be 0 or omitted.
triggerPriceTypeTrigger price source. CONTRACT_PRICE or MARK_PRICE. Default CONTRACT_PRICE.
Modify TP/SL Conditional Order (TRADE) › Responses
Successful response
successWhether the modification was accepted.
Get Order Info (USER_DATA)
Get Order Info (USER_DATA).
query Parameters
orderIdOrder ID to query.
Get Order Info (USER_DATA) › Responses
Successful response
avgPriceAverage fill price.
clientOrderIdClient-defined order ID.
cumQuoteCumulative filled amount in the quote asset.
executedQtyFilled quantity in the base asset.
orderIdSystem order ID.
origQtyOriginal order quantity.
priceOrder price.
reduceOnlyWhether the order can only reduce positions.
sideOrder side. See Order Side for possible values.
positionSidePosition side. See Position Mode.
statusOrder status. See Order Status.
stopPriceStop price / trigger price (if applicable).
symbolTrading pair.
timeOrder creation time (ms).
timeInForceTime-in-force policy. See Time in Force.
typeOrder type. See Order Type.
updateTimeLast update time (ms).
workingTypeTrigger price type. See Trigger Price Type.
Get Current Orders (USER_DATA)
Get Current Orders (USER_DATA).
query Parameters
symbolFilter by trading pair.
orderIdOnly return orders with ID greater than the specified value.
startTimeFilter orders created after this timestamp (ms).
endTimeFilter orders created before this timestamp (ms).
limitPage size, 1-100. Default 100.
pagePage index starting from 0. Default 0.
Get Current Orders (USER_DATA) › Responses
Successful response
avgPriceAverage fill price.
clientOrderIdClient-defined order ID.
cumQuoteCumulative filled amount in the quote asset.
executedQtyFilled quantity in the base asset.
orderIdSystem order ID.
origQtyOriginal order quantity.
priceOrder price.
reduceOnlyWhether the order can only reduce positions.
sideOrder side. See Order Side for possible values.
positionSidePosition side. See Position Mode.
statusOrder status. See Order Status.
stopPriceStop price / trigger price (if applicable).
symbolTrading pair.
timeOrder creation time (ms).
timeInForceTime-in-force policy. See Time in Force.
typeOrder type. See Order Type.
updateTimeLast update time (ms).
workingTypeTrigger price type. See Trigger Price Type.
priceProtectpriceMatchselfTradePreventionModegoodTillDateGet Current Trailing Orders (USER_DATA)
Get Current Trailing Orders (USER_DATA).
query Parameters
symbolFilter by trading pair.
orderIdOnly return orders with ID greater than the specified value.
startTimeFilter orders created after this timestamp (ms).
endTimeFilter orders created before this timestamp (ms).
limitPage size, 1-100. Default 100.
pagePage index starting from 0. Default 0.
Get Current Trailing Orders (USER_DATA) › Responses
Successful response
avgPriceAverage fill price.
clientOrderIdClient-defined order ID.
cumQuoteCumulative filled amount in the quote asset.
executedQtyFilled quantity in the base asset.
orderIdSystem order ID.
origQtyOriginal order quantity.
priceOrder price.
reduceOnlyWhether the order can only reduce positions.
sideOrder side. See Order Side for possible values.
positionSidePosition side. See Position Mode.
statusOrder status. See Order Status.
stopPriceStop price / trigger price (if applicable).
symbolTrading pair.
timeOrder creation time (ms).
timeInForceTime-in-force policy. See Time in Force.
typeOrder type. See Order Type.
updateTimeLast update time (ms).
workingTypeTrigger price type. See Trigger Price Type.
activatePriceActivation price. This field is returned when available.
callbackRateCallback rate percentage. This field is returned when available.
Get Order History (USER_DATA)
Get Order History (USER_DATA).
query Parameters
symbolFilter by trading pair.
limitNumber of records per page, 1-100. Default 100.
startTimeStart time (ms). Must be less than or equal to endTime.
endTimeEnd time (ms). Must be within 90 days of startTime.
pagePage index starting from 0. Default 0.
Get Order History (USER_DATA) › Responses
Successful response
orderIdSystem order ID.
symbolTrading pair.
sideOrder side. See Order Side for possible values.
positionSidePosition side. See Position Mode.
statusOrder status. See Order Status.
typeOrder type. See Order Type.
timeOrder creation time (ms).
priceOrder price.
origQtyOriginal order quantity.
executedQtyFilled quantity in the base asset.
avgPriceAverage fill price.
updateTimeLast update time (ms).
clientOrderIdClient-defined order ID.
cumQuoteCumulative filled amount in the quote asset.
timeInForceTime-in-force policy. See Time in Force.
reduceOnlyWhether the order can only reduce positions.
stopPriceStop price / trigger price (if applicable).
workingTypeTrigger price type. See Trigger Price Type.
Get Trailing Order History (USER_DATA)
Get Trailing Order History (USER_DATA).
query Parameters
symbolFilter by trading pair.
limitNumber of records per page, 1-1000. Default 500.
startTimeStart time (ms). Must be less than or equal to endTime.
endTimeEnd time (ms). Must be within 90 days of startTime.
pagePage index starting from 0. Default 0.
Get Trailing Order History (USER_DATA) › Responses
Successful response
avgPriceAverage fill price.
clientOrderIdClient-defined order ID.
cumQuoteCumulative filled amount in the quote asset.
executedQtyFilled quantity in the base asset.
orderIdSystem order ID.
origQtyOriginal order quantity.
priceOrder price.
reduceOnlyWhether the order can only reduce positions.
sideOrder side. See Order Side for possible values.
positionSidePosition side. See Position Mode.
statusOrder status. See Order Status.
stopPriceStop price / trigger price (if applicable).
symbolTrading pair.
timeOrder creation time (ms).
timeInForceTime-in-force policy. See Time in Force.
typeOrder type. See Order Type.
updateTimeLast update time (ms).
workingTypeTrigger price type. See Trigger Price Type.
activatePriceActivation price. This field is returned when available.
callbackRateCallback rate percentage. This field is returned when available.
Get Trade Details (USER_DATA)
Get Trade Details (USER_DATA).
query Parameters
symbolTrading pair filter.
orderIdOnly return trades associated with this order.
startTimeStart time (ms).
endTimeEnd time (ms). Must be ≥ startTime.
limitNumber of records (1-100). Default 100.
Get Trade Details (USER_DATA) › Responses
Successful response
idTrade ID.
orderIdAssociated order ID.
symbolTrading pair.
buyerWhether the user was the buyer.
commissionCommission amount.
commissionAssetAsset used to pay commission.
makertrue if maker, false if taker.
priceTrade price.
qtyFilled quantity (base asset).
quoteQtyFilled amount (quote asset).
realizedPnlRealised PnL for this fill.
sideOrder side, BUY or SELL.
positionSidePosition side, LONG or SHORT.
timeTrade time (ms).
Get Current Conditional Orders (USER_DATA)
Get Current Conditional Orders (USER_DATA).
query Parameters
symbolTrading pair filter.
startTimeStart time (ms).
endTimeEnd time (ms). Must be ≥ startTime.
pagePage number starting from 1. Default 1.
limitPage size, 1-100. Default 100.
Get Current Conditional Orders (USER_DATA) › Responses
Successful response
algoIdConditional order ID.
clientAlgoIdClient-defined ID.
algoTypeConditional order category. Currently only CONDITIONAL is returned.
orderTypeTriggered order type. Values: STOP, TAKE_PROFIT, STOP_MARKET, TAKE_PROFIT_MARKET, TRAILING_STOP_MARKET.
symbolTrading pair.
sideOrder side. Values: BUY, SELL.
positionSidePosition side. Values: LONG, SHORT.
timeInForceTime-in-force for the triggered order. Values: GTC, IOC, FOK, POST_ONLY.
quantityRequested quantity.
algoStatusConditional order status. Values: NEW, PENDING, UNTRIGGERED, FILLED, CANCELED, CANCELING.
actualOrderIdID of the triggered active order (if any).
actualPriceExecution price (if triggered).
triggerPriceTrigger price.
priceExecution price configured for the triggered order.
tpTriggerPriceLinked take-profit trigger price (if configured).
tpPriceLinked take-profit execution price (if configured).
slTriggerPriceLinked stop-loss trigger price (if configured).
slPriceLinked stop-loss execution price (if configured).
tpOrderTypeTake-profit trigger price source. Values: CONTRACT_PRICE, MARK_PRICE.
workingTypeTrigger price source. Values: CONTRACT_PRICE, MARK_PRICE.
closePositionWhether the triggered order will close the entire position.
reduceOnlyWhether the triggered order is reduce-only.
createTimeCreation time (ms).
updateTimeLast update time (ms).
triggerTimeTrigger time (ms). Returns 0 if the order has not been triggered.
Get Conditional Order History (USER_DATA)
Get Conditional Order History (USER_DATA).
query Parameters
symbolTrading pair filter.
startTimeStart time (ms).
endTimeEnd time (ms). Must be within 90 days of startTime.
limitPage size, 1-1000. Default 500.
Get Conditional Order History (USER_DATA) › Responses
Successful response
Current page of conditional orders. Each element follows the schema described in Get Current Conditional Orders.
hasMoretrue if more data is available.