全部仓位
WSProduction
wss://ws.btse.com/ws/futuresTestnetwss://testws.btse.io/ws/futures任何仓位变更时推送。需要 WebSocket 身份验证。
主题: allPositionV4
响应内容
| 名称 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| topic | String | 是 | allPositionV4 或 positionsV3 |
| data | Object[] | 是 | 数据对象数组 |
Data 对象:
| 名称 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| marketName | String | 是 | 市场名称 |
| orderType | Integer | 是 | 90: 合约仓位 |
| orderMode | Integer | 是 | 66: 买入 · 83: 卖出 |
| entryPrice | Double | 是 | 开仓均价 |
| liquidationPrice | Double | 是 | 强平价格 |
| markPrice | Double | 是 | 标记价格 |
| unrealizedProfitLoss | Double | 是 | 未实现盈亏 |
| totalMaintenanceMargin | Double | 是 | 维持保证金 |
| totalContracts | Double | 是 | 合约数量 |
| marginType | Integer | 是 | 91: 全仓 · 92: 逐仓 |
| closeOrder | Boolean | 是 | 是否存在平仓委托 |
| liquidationInProgress | Boolean | 是 | 是否正在强平 |
| currentLeverage | Double | 是 | 当前杠杆倍数 |
| adlScoreBucket | Double | 是 | ADL 概率评分 |
| takeProfitOrder | Object | 是 | 止盈委托信息 |
| stopLossOrder | Object | 是 | 止损委托信息 |
| positionMode | String | 是 | ONE_WAY · HEDGE · ISOLATED |
| positionDirection | String | 是 | 仓位方向:LONG(多头)· SHORT(空头)(仅在 HEDGE/ISOLATED 模式下出现) |
| positionId | String | 是 | 仓位 ID |
| contractSize | Double | 是 | 仓位合约面值 |
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
}
]
}