推送规则
- 需用户登录
- 订阅后有变化才推送
请求
请求
{
"action":"subscribe",
"args":["futures/order"]
}
{"action":"subscribe","args":["<channel>"]}
- action:
subscribe - channel: 频道名, 如
futures/order, 固定值
返回
返回
{
"group": "futures/order",
"data": [
{
"action": 3,
"order": {
"order_id": "220906179895578",
"client_order_id": "BM1234",
"price": "1",
"size": "1000",
"symbol": "BTCUSDT",
"state": 2,
"side": 1,
"type": "limit",
"leverage": "5",
"open_type": "isolated",
"deal_avg_price": "0",
"deal_size": "0",
"create_time": 1662368173000,
"update_time": 1662368173000,
"plan_order_id": "220901412155341",
"last_trade": {
"lastTradeID": 1247592391,
"fillQty": "1",
"fillPrice": "25667.2",
"fee": "-0.00027",
"feeCcy": "USDT"
},
"trigger_price": "-",
"trigger_price_type": "-",
"execution_price": "-",
"activation_price_type": "-",
"activation_price": "-",
"callback_rate": "-",
"position_mode": "hedge_mode"
}
}
]
}
| 字段 | 数据类型 | 描述 |
|---|---|---|
| action | Int | 操作类型 - 1=撮合成交- 2=提交订单- 3=取消订单- 4=强平取消订单- 5=被动ADL取消订单- 6=部分强平- 7=破产委托- 8=被动ADL撮合成交- 9=主动ADL撮合成交 |
| symbol | String | 合约交易对(如BTCUSDT) |
| order_id | String | 订单编号 |
| client_order_id | String | 用户自定义ID |
| side | Int | 订单方向 |
| type | String | 订单类型 - limit=限价单- market=市价单- plan_order=计划委托单- trailing_order=跟踪委托单- take_profit=止盈单- stop_loss=止损单 |
| leverage | String | 杠杆下单倍数 |
| open_type | String | 开仓类型 - cross=全仓- isolated=逐仓 |
| deal_avg_price | String | 成交均价 |
| deal_size | String | 成交数量 |
| price | String | 委托价格 |
| size | String | 委托数量 |
| state | Int | 订单状态 - 1=审批中- 2=委托中- 4=已结束 |
| create_time | Long | 订单创建时间(精确到毫秒) |
| update_time | Long | 订单更新时间(精确到毫秒) |
| plan_order_id | String | 对应触发的计划单id |
| last_trade | Object | 当前订单的最近成交信息,若无则返回null |
| trigger_price | String | 显示止盈止损的触发价格/计划委托的触发价格 |
| trigger_price_type | String | 显示止盈止损的触发价格类型/计划委托的触发价格类型 - last_price- fair_price |
| execution_price | String | 显示止盈止损订单的执行价格/计划委托订单的执行价格 |
| activation_price | String | 显示跟踪委托的激活价格 |
| activation_price_type | String | 显示跟踪委托的激活价格类型 - last_price- fair_price |
| callback_rate | String | 显示跟踪委托的回调幅度 |
| position_mode | String | 仓位模式 - hedge_mode- one_way_mode |
最近成交信息字段last_trade描述: |
| 字段 | 类型 | 描述 |
|---|---|---|
| lastTradeID | Long | 最近成交的成交ID |
| fillQty | String | 最新成交的数量 |
| fillPrice | String | 最新成交的价格 |
| fee | String | 最新成交的手续费 |
| feeCcy | String | 最新成交的手续费币种 |