成交明细
描述
订阅成交明细信息
请求参数
参数名 | 参数类型 | 是否必须 | 描述 |
---|---|---|---|
event | String | 是 | 操作, subscribe unsubscribe |
channel | String | 是 | 频道名 |
请求示例
{
"event": "subscribe",
"channel": "fill"
}
返回参数
返回字段 | 参数类型 | 字段说明 |
---|---|---|
event | String | 操作, subscribed unsubscribed |
channel | String | 频道名 |
订阅返回示例
{
"event": "subscribed",
"channel": "fill"
}
推送数据参数
返回字段 | 参数类型 | 字段说明 |
---|---|---|
id | String | 唯一标识 |
coinId | String | 所属抵押品币种id |
contractId | String | 所属合约id |
orderId | String | 所属委托单id |
marginMode | String | 保证金模式 |
separatedMode | String | 分仓模式 |
separatedOpenOrderId | String | 分仓仓位创建委托单id,仅 separated_mode=SEPARATED 时存在 |
positionSide | String | 仓位方向 (单向持仓必为UNKNOWN) |
orderSide | String | 买卖方向 |
fillSize | String | 实际成交数量 |
fillValue | String | 实际成交价值 |
fillFee | String | 实际成交费用 (精确值) |
liquidateFee | String | 如果是清算(强平)成交,此字段为清算费用 |
realizePnl | String | 实际已实现盈亏(成交包含平仓才会有值) |
direction | String | 实际成交方向 |
createdTime | String | 创建时间 |
updatedTime | String | 更新时间 |
推送返回示例
{
"type": "trade-event",
"channel": "fill",
"event": "payload",
"msg": {
"msgEvent": "OrderUpdate",
"version": 46655,
"data": {
"orderFillTransaction": [
{
"id": "617414920887075482",
"coinId": "USDT",
"contractId": "cmt_btcusdt",
"orderId": "617414920861909658",
"marginMode": "SHARED",
"separatedMode": "COMBINED",
"separatedOpenOrderId": "0",
"positionSide": "LONG",
"orderSide": "BUY",
"fillSize": "0.10000",
"fillValue": "10381.270000",
"fillFee": "6.228762",
"liquidateFee": "0",
"realizePnl": "0",
"direction": "TAKER",
"createdTime": "1747203188154",
"updatedTime": "1747203188154"
}
]
},
"time": 1747203188154
}
}