delete https://api.connex.trade/api/v1/trading/positions
Permission
- Primary API Key:
TRADE
, batch close positions of main portfolio - Sub-Portfolio API Key:
TRADE
, batch close positions of current portfolio
Need to cancel all open orders before calling this endpoint to batch close existing positions.
Rate Limit
- 3 requests per 10 seconds
Request
Name | Type | Mandatory | Description |
---|---|---|---|
sym | String | N | Trading pair unique identifier , separated by ',' example: BINANCE_PERP_BTC_USDT, OKX_PERP_BTC_USDT. symList can't be empty if closeAllPos=false. |
positionSide | String | N | NONE / LONG / SHORT . Unable to close positions if NONE passed , when the account mode is two-ways (BOTH) mode. |
closeAllPos | String | N | true / false . default false. true to ignore symList and close all open positions in specific exchange |
exchangeType | String | N | OKX / BINANCE |
List# Response
Field name | Type | Remarks |
---|---|---|
sym | String | Trading pair unique identifier , example: BINANCE_PERP_BTC_USDT, OKX_PERP_BTC_USDT |
positionSide | String | NONE / LONG / SHORT |
orderId | String | order id to close the current sym |
success | String | true / false . where it is able to issue an order to close the current sym |
errorMsg | String | error message if unable to issue an order to close the current sym |