跳转到主要内容

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. 订阅后有变化才推送

请求

请求
{
    "action":"subscribe",
    "args":["futures/position"]
}
消息格式: {"action":"subscribe","args":["<channel>"]}
  • action: subscribe
  • channel: 频道名, 如futures/position, 固定值

返回

返回
{
  "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字段说明:
字段数据类型描述
symbolString合约交易对(如 BTCUSDT)
hold_volumeString持仓数量
position_typeInt仓位类型
-1=多
-2=空
open_typeInt开仓类型
-1=逐仓
-2=全仓
frozen_volumeString冻结量
close_volumeString平仓量
hold_avg_priceString持仓均价
close_avg_priceString平仓均价
open_avg_priceString开仓均价
liquidate_priceString爆仓价格
create_timeLong仓位创建时间(精确到毫秒)
update_timeLong仓位更新时间(精确到毫秒)
position_modeString仓位模式
-hedge_mode
-one_way_mode