Close Positions

Rate Limit: 3 requests per 10 seconds

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Closes positions at market and automatically cancels all open reduceOnly=true orders for the target symbols. Non-reduce-only orders remain active.

Limits: symList ≤20 symbols when closeAllPos=false; total reduce-only open orders ≤100 in either mode. Exceeding either applicable limit returns 401129; no positions are closed and no orders are canceled.

Request Parameters

FieldTypeNecessaryDescription
symListStringNComma-separated list of trading pair identifiers to close. e.g.BINANCE_PERP_BTC_USDT,BINANCE_PERP_ETH_USDT.
Required when closeAllPos is false; Supports up to 20 pairs, exceeding the limit returns 401129.
positionSideStringNNONE / LONG / SHORT. NONE closes both sides in two-way mode. In one-way mode, LONG / SHORT are ignored.
closeAllPosStringNtrue / false. Default false. When true, closes all positions (filtered by exchangeType).
exchangeTypeStringNBINANCE or OKX. Required when closeAllPos is true; cannot be omitted.

Response Fields

Each item in the response array represents one symbol:

FieldTypeDescription
symStringTrading pair unique identifier. e.g. BINANCE_PERP_BTC_USDT.
orderIdStringOrder ID for the close request. Not present if the position could not be closed.
positionSideStringPosition side of the submitted close order.
successStringWhether the close request for this symbol succeeded: true or false.
errorMsgStringReason for failure if success is false.

Example Response

{
  "code": 200000,
  "message": "Success",
  "data": [
    {
      "sym": "BINANCE_PERP_DOGE_USDT",
      "positionSide": "NONE",
      "orderId": "2154643761198660",
      "success": "true",
      "errorMsg": ""
    }
  ]
}
Body Params
string

BINANCE_PERP_BTC_USDT,BINANCE_PERP_ETH_USDT

string

LONG/SHORT

string

true/false

string
Response

Language
LoadingLoading…
Response
Choose an example:
application/json