Close Positions

Rate Limit: 3 requests per 10 seconds

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

If a reduceOnly open order exists for a symbol, it is automatically cancelled before the market close. If the total count of reduceOnly open orders across the requested symbols exceeds the limit, the request is rejected with 401129.

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