Skip to main content

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

ParameterRequiredTypeDescription
eventYesStringOperation: subscribe, unsubscribe
channelYesArraypositions
symbolsYesArraytrading pair array

Request Response

ParameterTypeDescription
eventStringOperation: subscribe, unsubscribe
channelStringpositions
symbolsArraytrading pair array
messageStringError message

Push Data

ParameterTypeDescription
channelStringpositions
dataArrayThe subscribed data
> symbolStringA trading pair
> posSideStringPosition side LONG SHORT BOTH
> sideStringEnumerate: BUY, SELL
> mgnModeStringMargin Mode, Enumerate: ISOLATED, CROSS
> openAvgPxStringAverage entry price
> qtyStringConts of positions (Position size after execution)
> oldQtyString
> availQtyStringConts available to close
> leverStringLeverage, from 1 to 75.
> feeStringPosition closing fee
> adlStringADL (Auto-Deleveraging)
> liqPxStringEst. liquidation price
> mgnStringIsolated margin
> imStringInitial margin
> mmStringMaintenance margin
> uplStringUnrealized PnL (calculated based on mark price)
> uplRatioStringUnrealized PnL% (calculated based on mark price)
> fPnlString
> pnlStringRealized PnL
> fFeeStringfunding fee
> markPxStringMark price
> mgnRatioStringMargin rate
> stateStringPosition Status: NORMAL, LIQ, and ADL
> cTimeLongCreation Time
> uTimeLongUpdate time
> tsLongPush 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
}
]
}