> ## Documentation Index
> Fetch the complete documentation index at: https://developer.wooxpro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 【私有】仓位频道

仓位变化推送频道

### 推送规则

1. 需用户登录
2. 订阅后有变化才推送

### 请求

> 请求

```json theme={null}
{
    "action":"subscribe",
    "args":["futures/position"]
}
```

消息格式:

`{"action":"subscribe","args":["<channel>"]}`

* action: `subscribe`
* channel: 频道名, 如`futures/position`, 固定值

### 返回

> 返回

```json theme={null}
{
  "group": "futures/position",
  "data": [
    {
      "symbol": "BTCUSDT",
      "hold_volume": "2000",
      "position_type": 1,
      "open_type": 1,
      "frozen_volume": "0",
      "close_volume": "0",
      "hold_avg_price": "19406.2092",
      "close_avg_price": "0",
      "open_avg_price": "19406.2092",
      "liquidate_price": "15621.998406",
      "create_time": 1662692862255,
      "update_time": 1662692862255,
      "position_mode": "hedge_mode"
    }
  ]
}
```

返回data字段说明:

| 字段                | 数据类型   | 描述                                           |
| ----------------- | ------ | -------------------------------------------- |
| symbol            | String | 合约交易对（如 BTCUSDT）                             |
| hold\_volume      | String | 持仓数量                                         |
| position\_type    | Int    | 仓位类型<br />-`1`=多<br />-`2`=空                 |
| open\_type        | Int    | 开仓类型<br />-`1`=逐仓<br />-`2`=全仓               |
| frozen\_volume    | String | 冻结量                                          |
| close\_volume     | String | 平仓量                                          |
| hold\_avg\_price  | String | 持仓均价                                         |
| close\_avg\_price | String | 平仓均价                                         |
| open\_avg\_price  | String | 开仓均价                                         |
| liquidate\_price  | String | 爆仓价格                                         |
| create\_time      | Long   | 仓位创建时间(精确到毫秒)                                |
| update\_time      | Long   | 仓位更新时间(精确到毫秒)                                |
| position\_mode    | String | 仓位模式<br />-`hedge_mode`<br />-`one_way_mode` |
