订单频道
描述
订阅订单频道
请求参数
参数名 | 参数类型 | 是否必须 | 描述 |
---|---|---|---|
event | String | 是 | 操作, subscribe unsubscribe |
channel | String | 是 | 频道名 |
请求示例
{
"event": "subscribe",
"channel": "orders"
}
返回参数
返回字段 | 参数类型 | 字段说明 |
---|---|---|
event | String | 操作, subscribed unsubscribed |
channel | String | 频道名 |
订阅返回示例
{
"event": "subscribed",
"channel": "orders"
}
推送数据参数
返回字段 | 参数类型 | 字段说明 |
---|---|---|
id | String | 订单id。取值大于0 |
symbolName | String | 币对名 |
baseCoin | String | 交易币种 |
quoteCoin | String | 计价币种 |
orderSide | String | 买卖方向 |
price | String | 委托价格(最差可接受的价格) |
size | String | 委托数量 |
value | String | 委托价值 |
clientOrderId | String | 客户自定义id,用于幂等校验 |
type | String | 委托单类型 |
timeInForce | String | 委托单执行策略。type为 LIMIT/STOP_LIMIT/TAKE_PROFIT_LIMIT 时有意义 |
reduceOnly | String | 是否是只减仓委托 |
triggerPrice | String | 触发价格。type为 STOP_LIMIT/STOP_MARKET/TAKE_PROFIT_LIMIT/TAKE_PROFIT_MARKET 时有意义。如果为0代表字段为空。 |
orderSource | String | 订单来源 |
openTpslParentOrderId | String | 开仓止盈单,止损单的开仓单orderId |
isSetOpenTp | String | 是否设置开仓止盈 |
openTpParam | String | 开仓止盈参数 |
isSetOpenSl | String | 是否设置开仓止损 |
openSlParam | String | 开仓止损参数 |
takerFeeRate | String | 下单时taker手续费率 |
makerFeeRate | String | 下单时maker手续费率 |
feeDiscount | String | 下单时手续费折扣率 |
liquidateFeeRate | String | 下单时清算手续费率 |
status | String | 委托单状态 |
triggerTime | String | 条件单触发时间 |
triggerPriceTime | String | 条件单触发价格时间 |
triggerPriceValue | String | 条件单触发价格值 |
cancelReason | String | 委托单取消原因 |
latestFillPrice | String | 当前委托单最新成交价格 |
maxFillPrice | String | 当前委托单最高成交价格 |
minFillPrice | String | 当前委托单最低成交价格 |
cumFillSize | String | 累计撮合后成交数量 |
cumFillValue | String | 累计撮合后成交价值 |
cumFillFee | String | 累计撮合后成交手续费 |
createdTime | String | 创建时间 |
updatedTime | String | 更新时间 |
推送返回示例
{
"type": "trade-event",
"msg": {
"msgEvent": "OrderUpdate",
"version": 38,
"data": {
"order": [
{
"id": "625138763307155610",
"symbolName": "BTCUSDT_SPBL",
"baseCoin": "BTC",
"quoteCoin": "USDT",
"orderSide": "BUY",
"price": "0",
"size": "0",
"value": "100.0000000",
"clientOrderId": "1749044695347g1xrdKa2xuDzbDHgTTkbubUoRd3x7s9c2I2mdtdj5qt7M6Evz5m",
"type": "MARKET",
"timeInForce": "IMMEDIATE_OR_CANCEL",
"reduceOnly": false,
"triggerPrice": "0",
"orderSource": "UNKNOWN_ORDER_SOURCE",
"openTpslParentOrderId": "0",
"isSetOpenTp": false,
"isSetOpenSl": false,
"takerFeeRate": "0.001",
"makerFeeRate": "0",
"feeDiscount": "1",
"takerFeeDiscount": "1",
"makerFeeDiscount": "1",
"status": "FILLED",
"triggerTime": "0",
"triggerPriceTime": "0",
"triggerPriceValue": "0",
"cancelReason": "UNKNOWN_ORDER_CANCEL_REASON",
"latestFillPrice": "105008.0",
"maxFillPrice": "105008.0",
"minFillPrice": "105008.0",
"cumFillSize": "0.000952",
"cumFillValue": "99.9676160",
"cumFillFee": "0.00000095",
"createdTime": "1749044695689",
"updatedTime": "1749044695720"
}
]
},
"time": 1749044695720
},
"channel": "orders",
"event": "payload"
}