说明
获取订单信息,首次订阅不推送。 以下事件发生时将推送数据: 挂单、订单成交、 撤单、 订单修改
频道名: orders
订阅请求:
{
"op": "subscribe",
"args": [
{
"instType": "SPOT",
"channel": "orders",
"instId": "default"
}
]
}推送数据格式:
{
"action": "snapshot",
"arg": {
"instType": "SPOT",
"channel": "orders",
"instId": "default"
},
"data": [
{
"instId": "BTCUSDT",
"orderId": "1234567890",
"clientOid": "client-order-123",
"price": "45000.00",
"size": "2.0",
"notional": "90000.00",
"orderType": "limit",
"force": "gtc",
"side": "buy",
"fillPrice": "45000.50",
"tradeId": 9876543210,
"baseVolume": "1.5",
"fillTime": 1640000001000,
"fillFee": "10.125",
"fillFeeCoin": "USDT",
"tradeScope": "taker",
"accBaseVolume": "1.5",
"priceAvg": "45000.50",
"status": "full-fill",
"cTime": "1640000000000",
"uTime": "1640000001000",
"feeDetail": [
{
"feeCcy": "USDT",
"fee": "10.125"
}
],
"enterPointSource": "API",
"newSize": "0"
}
]
}字段说明:
| 字段 | 类型 | 说明 |
|---|---|---|
| instId | String | 产品ID |
| orderId | String | 订单ID |
| clientOid | String | 客户端订单ID |
| price | String | 委托价格 |
| size | String | 委托数量 |
| notional | String | 委托金额(市价买入时) |
| orderType | String | 订单类型:limit/market |
| force | String | 订单有效期:gtc/ioc/fok |
| side | String | 买卖方向:buy/sell |
| fillPrice | String | 最新成交价 |
| tradeId | Long | 最新成交ID |
| baseVolume | String | 最新成交数量 |
| fillTime | Long | 最新成交时间戳(毫秒) |
| fillFee | String | 最新成交手续费 |
| fillFeeCoin | String | 手续费币种 |
| tradeScope | String | 流动性方向:taker/maker |
| accBaseVolume | String | 累计成交数量 |
| priceAvg | String | 成交均价 |
| status | String | 订单状态:new/partial-fill/full-fill/canceled |
| cTime | String | 创建时间戳(毫秒) |
| uTime | String | 更新时间戳(毫秒) |
| feeDetail | Array | 手续费详情 |
| enterPointSource | String | 订单来源 |
| newSize | String | 新的委托数量 |
推送频率: 实时推送(订单状态变化时)