订单更新
#
事件描述订单通过executionReport
事件进行更新。
执行类型:
- NEW - 新订单已被引擎接受。
- CANCELED - 订单被用户取消。
- REPLACED - (保留字段,当前未使用)
- REJECTED - 新订单被拒绝 (这信息只会在撤消挂单再下单中发生,下新订单被拒绝但撤消挂单请求成功)。
- TRADE - 订单有新成交。
- EXPIRED - 订单已根据 Time In Force 参数的规则取消(e.g. 没有成交的 LIMIT FOK 订单或部分成交的 LIMIT IOC 订单)或者被交易所取消(e.g. 强平或维护期间取消的订单)。
- TRADE_PREVENTION - 订单因 STP 触发而过期。
请查阅公开API参数文档获取更多枚举定义。
备注: 通过将Z
除以z
可以找到平均价格。
如果订单是OCO,则除了显示executionReport
事件外,还将显示一个名为ListStatus
的事件。
executionReport
中的仅在满足特定条件时才会出现的字段:#
字段 | 名称 | 描述 | 示例 |
---|---|---|---|
d | Trailing Delta | 出现在追踪止损订单中。 | "d": 4 |
D | Trailing Time | "D": 1668680518494 | |
j | Strategy Id | 如果在请求中添加了strategyId 参数,则会出现。 | "j": 1 |
J | Strategy Type | 如果在请求中添加了strategyType 参数,则会出现。 | "J": 1000000 |
v | Prevented Match Id | 只有在因为 STP 导致订单失效时可见。 | "v": 3 |
A | Prevented Quantity | "A":"3.000000" | |
B | Last Prevented Quantity | "B":"3.000000" | |
u | Trade Group Id | "u":1 | |
U | Counter Order Id | "U":37 | |
Cs | Counter Symbol | "Cs": "BTCUSDT" | |
pl | Prevented Execution Quantity | "pl":"2.123456" | |
pL | Prevented Execution Price | "pL":"0.10000001" | |
pY | Prevented Execution Quote Qty | "pY":"0.21234562" | |
W | Working Time | 只有在订单在订单簿上时可见 | "W": 1668683798379 |
b | Match Type | 只有在订单有分配时可见 | "b":"ONE_PARTY_TRADE_REPORT" |
a | Allocation ID | "a":1234 | |
k | Working Floor | 只有在订单可能有分配时可见 | "k":"SOR" |
uS | UsedSor | 只有在订单使用 SOR 时可见 | "uS":true |
#
事件类型executionReport
#
响应示例如果订单是OCO,则除了显示executionReport
事件外,还将显示一个名为ListStatus
的事件。