Skip to main content

Position Updates (Private)

Futures-specific private channel, automatically subscribed after authentication. Short field names are used to optimize payload size.

  • Channel: position
  • Push Frequency: Real-time, unthrottled
  • Access: Private (auth required)

Authentication

Use the standard HmacSHA256 WebSocket login request described in Common Module · WebSocket Interface.

After successful authentication, order, balance, and position are subscribed automatically.

Push Example

{
"ch": "position",
"d": {
"i": 12345,
"s": "BTC_USDT",
"ps": 1,
"mm": 2,
"l": 10,
"q": "0.5",
"ep": "49000",
"mp": "49500",
"pv": "24750",
"im": "2475",
"m": "247.5",
"mr": "0.01",
"up": "250",
"upp": "10.10",
"roe": "10.10",
"lp": "44550",
"of": "12.25",
"cf": "0",
"ct": 1768205315166,
"ut": 1768205315166,
"ts": 1768205315166
}
}

Push Fields

FieldTypeDescription
inumberPosition ID
sstringTrading pair
psnumberPosition side: 1=long, 2=short
mmnumberMargin mode: 1=isolated, 2=cross
lnumberLeverage
qstringPosition quantity
epstringAverage entry price
mpstringMark price (real-time)
pvstringPosition value (real-time = quantity × mark price)
imstringInitial margin
mstringMaintenance margin
mrstringMargin ratio (real-time)
upstringUnrealized PnL (real-time)
uppstringUnrealized PnL ratio (real-time, percentage)
roestringReturn on equity (ROE, real-time)
lpstringLiquidation price
ofstringOpening fee
cfstringClosing fee
ctnumberCreation time (milliseconds)
utnumberUpdate time (milliseconds)
tsnumberPush timestamp (milliseconds)

Notes

  • Updates are pushed when the mark price changes, which affects position value, margin ratio, unrealized PnL, and similar fields.
  • Updates are also pushed when position quantity, leverage, margin mode, and related values change.
  • Short field names are used to optimize transmission performance.