Positions
WSProduction
wss://ws.btse.com/ws/futuresTestnetwss://testws.btse.io/ws/futuresPushed when a position changes. Includes a zero-value snapshot when a position is closed.
Requires WebSocket authentication.
Topic: positionsV3
Response structure is the same as All Position with additional raw internal fields.
Response Contentβ
| Name | Type | Required | Description |
|---|---|---|---|
| topic | String | Yes | allPositionV4 or positionsV3 |
| data | Object[] | Yes | Array of data objects |
Data Object:
| Name | Type | Required | Description |
|---|---|---|---|
| marketName | String | Yes | Market name |
| orderType | Integer | Yes | 90: Futures position |
| orderMode | Integer | Yes | 66: BUY Β· 83: SELL |
| entryPrice | Double | Yes | Entry price |
| liquidationPrice | Double | Yes | Liquidation price |
| markPrice | Double | Yes | Mark price |
| unrealizedProfitLoss | Double | Yes | Unrealized P&L |
| totalMaintenanceMargin | Double | Yes | Maintenance margin |
| totalContracts | Double | Yes | Contract size |
| marginType | Integer | Yes | 91: CROSS Β· 92: ISOLATED |
| closeOrder | Boolean | Yes | Whether a close order exists |
| liquidationInProgress | Boolean | Yes | Whether in liquidation |
| currentLeverage | Double | Yes | Current leverage |
| adlScoreBucket | Double | Yes | ADL probability score |
| takeProfitOrder | Object | Yes | Take profit order info |
| stopLossOrder | Object | Yes | Stop loss order info |
| positionMode | String | Yes | ONE_WAY Β· HEDGE Β· ISOLATED |
| positionDirection | String | Yes | Position direction: LONG Β· SHORT (only present in HEDGE/ISOLATED mode) |
| positionId | String | Yes | Position ID |
| contractSize | Double | Yes | The position contract size |
example
Response
{
"topic": "allPositionV4",
"data": [
{
"marketName": "BTC-PERP",
"orderType": 90,
"orderMode": 66,
"entryPrice": 111085.1,
"liquidationPrice": 0,
"markPrice": 111100,
"unrealizedProfitLoss": 0.01,
"totalMaintenanceMargin": 5.5,
"totalContracts": 1,
"marginType": 91,
"closeOrder": false,
"liquidationInProgress": false,
"currentLeverage": 10,
"adlScoreBucket": 2,
"positionMode": "ONE_WAY",
"positionDirection": "LONG",
"positionId": "BTC-PERP-USDT",
"contractSize": 0.0001
}
]
}