Positions
Description
When position details change, such as opening, adding to, or closing positions, or adjusting isolated margin, the following information will be pushed.
Pushing Frequency
Real Time
Channel
positions
Request Parameters
Parameter | Required | Type | Description |
---|---|---|---|
event | Yes | String | Operation: subscribe , unsubscribe |
channel | Yes | Array | positions |
symbols | Yes | Array | trading pair array |
Request Response
Parameter | Type | Description |
---|---|---|
event | String | Operation: subscribe , unsubscribe |
channel | String | positions |
symbols | Array | trading pair array |
message | String | Error message |
Push Data
Parameter | Type | Description |
---|---|---|
channel | String | positions |
data | Array | The subscribed data |
> symbol | String | A trading pair |
> posSide | String | Position side LONG SHORT BOTH |
> side | String | Enumerate: BUY , SELL |
> mgnMode | String | Margin Mode, Enumerate: ISOLATED , CROSS |
> openAvgPx | String | Average entry price |
> qty | String | Conts of positions (Position size after execution) |
> oldQty | String | |
> availQty | String | Conts available to close |
> lever | String | Leverage, from 1 to 75 . |
> fee | String | Position closing fee |
> adl | String | ADL (Auto-Deleveraging) |
> liqPx | String | Est. liquidation price |
> mgn | String | Isolated margin |
> im | String | Initial margin |
> mm | String | Maintenance margin |
> upl | String | Unrealized PnL (calculated based on mark price) |
> uplRatio | String | Unrealized PnL% (calculated based on mark price) |
> fPnl | String | |
> pnl | String | Realized PnL |
> fFee | String | funding fee |
> markPx | String | Mark price |
> mgnRatio | String | Margin rate |
> state | String | Position Status: NORMAL , LIQ , and ADL |
> cTime | Long | Creation Time |
> uTime | Long | Update time |
> ts | Long | Push time (millisecond) |
Request Example
{
"event": "subscribe",
"channel": ["positions"],
"symbols": ["BTC_USDT_PERP"]
}
Push Data Example
{
"channel": "positions",
"data": [
{
"symbol": "BTC_USDT_PERP",
"posSide": "BOTH",
"side": "buy",
"mgnMode": "CROSS",
"openAvgPx": "64999",
"qty": "1",
"oldQty": "0",
"availQty": "1",
"lever": 1,
"fee": "-0.259996",
"adl": "0",
"liqPx": "-965678126.114070339063390145",
"mgn": "604.99",
"im": "604.99",
"mm": "3.327445",
"upl": "-45",
"uplRatio": "-0.0743",
"pnl": "0",
"markPx": "60499",
"mgnRatio": "0.000007195006959591",
"state": "NORMAL",
"ffee": "0",
"fpnl": "0",
"cTime": 1723459553457,
"uTime": 1725330697439
}
]
}