delete https://api.liquiditytech.com/api/v1/trading/positions
Rate Limit: 3 requests per 10 seconds
Close position batch, this api is asynchronous. Returning success only means that the request is successful. The final result needs to be confirmed through websocket subscription and order query.
Request
Field name | Type | Necessary | Remarks |
---|---|---|---|
symList | String | N | Trading Pair Unique Identifier, e.g: BINANCE_PERP_BTC_USDT, OKX_PERP_BTC_USDT。 Support up to 20 pairs, separated by "," . |
positionSide | String | N | NONE / LONG / SHORT, NONE stands for one-way mode position. When current position mode: Two-way: NONE to close both sides. One-way: LONG/SHORT will be ignored. |
closeAllPos | String | N | true/false。default false。In false case, symList mustn't be empty. |
exchangeType | String | N | OKX / BINANCE. empty to close all exchange positions. Only applies to closeAllPos = true. |
Response
Field | Type | Remark |
---|---|---|
sym | String | Trading Pair Unique Identifier, e.g: BINANCE_PERP_BTC_USDT |
orderId | String | orderId, if cannot close position, it don't have orderId |
positionSide | String | order positionSide |
success | String | can close or not, true/false |
errorMsg | String | if cannot close position, errorMsg is reason |