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 (
authrequired)
Authentication
Use the standard HmacSHA256 WebSocket login request described in Common Module · WebSocket Interface.
After successful authentication,
order,balance, andpositionare 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
| Field | Type | Description |
|---|---|---|
i | number | Position ID |
s | string | Trading pair |
ps | number | Position side: 1=long, 2=short |
mm | number | Margin mode: 1=isolated, 2=cross |
l | number | Leverage |
q | string | Position quantity |
ep | string | Average entry price |
mp | string | Mark price (real-time) |
pv | string | Position value (real-time = quantity × mark price) |
im | string | Initial margin |
m | string | Maintenance margin |
mr | string | Margin ratio (real-time) |
up | string | Unrealized PnL (real-time) |
upp | string | Unrealized PnL ratio (real-time, percentage) |
roe | string | Return on equity (ROE, real-time) |
lp | string | Liquidation price |
of | string | Opening fee |
cf | string | Closing fee |
ct | number | Creation time (milliseconds) |
ut | number | Update time (milliseconds) |
ts | number | Push 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.