OKX RPI 与只挂单订单:WebSocket“state: live”推送变更
简短回答: OKX 于 2026 年 7 月 16 日调整 WebSocket 订单频道:post_only、mmp_and_post_only 和 rpi 订单的“state: live”改为在订单成功进入订单簿后才推送,大约晚 1 毫秒;会穿越最优买卖价而下单失败的只挂单订单,现在只推送“state: canceled”。
已验证事实边界
- OKX published a WebSocket orders channel push behavior adjustment on July 16, 2026.
- OKX says affected post-only and RPI order types move “state: live” to after successful book entry, with about a one millisecond delay.
- OKX says failed post-only order placement caused by crossing the BBO now produces only “state: canceled” rather than “state: live” followed by “state: canceled.”
- OKX says the affected order types are post_only, mmp_and_post_only and rpi, while regular limit, market, ioc and fok behavior remains unchanged.
- OKX API documentation says successful request responses can mean acceptance, while users should refer to order WebSocket updates for amendment or cancellation confirmation.
收起完整分析
决策矩阵
文章表格:可横向滑动,或聚焦表格区域后使用方向键。
| 核对项 | 含义 | 具体做法 | 尚未确认的事项 |
|---|---|---|---|
| Acknowledgement | the exchange has received or accepted an order message | separate transport acknowledgement from final order state | gateway latency and private matching details |
| Final state | the last usable order state after validation, book entry, fill or cancellation | wait for the explicit state update before reconciling | private account event timing |
| Post-only exception | an order type that can cancel when it would cross the book | treat live-then-canceled sequences as a special case | future matching-engine rules |
| Amend result | the source field that explains a successful or failed amendment | record amend result and source before retrying | venue-specific reject reason depth |
| Cancel result | confirmation that an order is canceled rather than merely requested | wait for canceled state before reusing exposure | network or session failure timing |
| Rate-limit mode | how requests behave when order-rate limits are hit | design retry budgets around documented limits | private account tier or subaccount limits |
| WebSocket channel | the feed that carries order-state updates | subscribe and reconcile before trusting UI-only state | connection drop handling |
| REST fallback | the secondary route for order checks or repair | use only with idempotent identifiers and logs | venue incident behavior |
| Evidence packet | non-secret request id, order id, timestamp and official URL | store operational evidence without API secrets | sensitive account values |
| Stop rule | when the article cannot support action | stop if accepted, live, filled and canceled states are conflated | future API changes |
来源地图
- OKX Europe:OKX WebSocket Orders Channel Push Behavior Adjustment Announcement(okx-websocket-orders)
- OKX Technical Support:OKX API guide(okx-api-guide)
- OKX United States:OKX API Agreement(okx-api-agreement)
- OKX Help Center:API Announcements(okx-api-announcements)
控制说明
1. Acknowledgement
这一项要求读者把公开来源转换成操作规则。这里的含义是:the exchange has received or accepted an order message。可执行动作是:separate transport acknowledgement from final order state。仍然未知的是:gateway latency and private matching details。因此本文不会把未知部分包装成安全承诺、收益承诺、官方背书、审批保证、可用性保证或注册诱导。
2. Final state
这里的含义是:the last usable order state after validation, book entry, fill or cancellation。可执行动作是:wait for the explicit state update before reconciling。仍然未知的是:private account event timing。
3. Post-only exception
这里的含义是:an order type that can cancel when it would cross the book。可执行动作是:treat live-then-canceled sequences as a special case。仍然未知的是:future matching-engine rules。
4. Amend result
这里的含义是:the source field that explains a successful or failed amendment。可执行动作是:record amend result and source before retrying。仍然未知的是:venue-specific reject reason depth。
5. Cancel result
这里的含义是:confirmation that an order is canceled rather than merely requested。可执行动作是:wait for canceled state before reusing exposure。仍然未知的是:network or session failure timing。
6. Rate-limit mode
这里的含义是:how requests behave when order-rate limits are hit。可执行动作是:design retry budgets around documented limits。仍然未知的是:private account tier or subaccount limits。
7. WebSocket channel
这里的含义是:the feed that carries order-state updates。可执行动作是:subscribe and reconcile before trusting UI-only state。仍然未知的是:connection drop handling。
8. REST fallback
这里的含义是:the secondary route for order checks or repair。可执行动作是:use only with idempotent identifiers and logs。仍然未知的是:venue incident behavior。
9. Evidence packet
这里的含义是:non-secret request id, order id, timestamp and official URL。可执行动作是:store operational evidence without API secrets。仍然未知的是:sensitive account values。
10. Stop rule
这里的含义是:when the article cannot support action。可执行动作是:stop if accepted, live, filled and canceled states are conflated。仍然未知的是:future API changes。
实用结论
本文最有价值的地方是克制。OKX 调整了 WebSocket 订单状态信号在 post-only 与 RPI 工作流中的实际含义。其 2026 年 7 月 16 日公告说明,受影响订单的 “state: live” 事件会在订单成功进入订单簿后才推送,约延迟 1 毫秒;失败的 post-only 或 RPI 下单场景将只推送 “state: canceled”,不再先推送 “state: live” 再推送 “state: canceled”。可执行结论不是 OKX 订单没有风险,而是 API 用户必须区分请求确认、入簿确认、改单结果、撤单结果和最终对账,然后再重试或报告敞口。 用户应获得一个更清楚的核验路径,而不是一个看似肯定、实则无法由公开证据承担的承诺。
来源与证据
04- 原文标题OKX WebSocket Orders Channel Push Behavior Adjustment Announcement · okx.com
- 原文标题OKX API guide · okx.com
- 原文标题OKX API Agreement · okx.com
- 原文标题API Announcements · okx.com
选择下一步研究路径
更多研究: OKX
本文提到OKX。