Positions Channel
Get the current open positions
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| op | string | Yes | Operation, subscribe unsubscribe |
| args | list | Yes | List of channels to request subscription |
| > instType | string | Yes | Product type: USDT-FUTURES |
| > channel | string | Yes | Channel name: positions |
| > instId | string | No | Product ID (optional, omit for all positions) |
Request Example
{
"op": "subscribe",
"args": [
{
"instType": "USDT-FUTURES",
"channel": "positions",
"instId": "BTCUSDT"
}
]
}
Response Example
{
"event": "subscribe",
"arg": {
"instType": "USDT-FUTURES",
"channel": "positions",
"instId": "BTCUSDT"
}
}
Push Parameters
| Parameter | Type | Description |
|---|---|---|
| action | string | Push data action |
| arg | object | Channels with successful subscription |
| > instType | string | Product type |
| > channel | string | Channel name |
| > instId | string | Product ID |
| data | list | Position data list |
| > marginCoin | string | Margin coin (USDT) |
| > symbol | string | Symbol |
| > holdSide | string | Position side: long / short |
| > openDelegateSize | string | Position size |
| > marginSize | string | Position margin |
| > available | string | Available size for close |
| > locked | string | Locked size (pending close orders) |
| > total | string | Total position size |
| > leverage | string | Leverage |
| > achievedProfits | string | Realized profits |
| > openPriceAvg | string | Average entry price |
| > marginMode | string | Margin mode: isolated / cross |
| > unrealizedPL | string | Unrealized profit and loss |
| > liquidationPrice | string | Liquidation price |
| > keepMarginRate | string | Maintenance margin rate |
| > markPrice | string | Current mark price |
| > breakEvenPrice | string | Break-even price |
| > totalFee | string | Total fees |
| > uTime | number | Update time |
| > cTime | number | Create time |
| ts | number | Push timestamp |
Push Data
{
"action": "snapshot",
"arg": {
"instType": "USDT-FUTURES",
"channel": "positions",
"instId": "BTCUSDT"
},
"data": [
{
"marginCoin": "USDT",
"symbol": "BTCUSDT",
"holdSide": "long",
"openDelegateSize": "0.1",
"marginSize": "270.05",
"available": "0.1",
"locked": "0",
"total": "0.1",
"leverage": "10",
"achievedProfits": "0",
"openPriceAvg": "27005.0",
"marginMode": "isolated",
"unrealizedPL": "15.50",
"liquidationPrice": "24500.0",
"keepMarginRate": "0.004",
"markPrice": "27160.5",
"breakEvenPrice": "27015.5",
"totalFee": "10.50",
"uTime": 1695716760565,
"cTime": 1695716700000
}
],
"ts": 1695716761589
}