交易所動態

OKX WebSocket 订单 state live 最终性清单

4 分鐘

本文正文暫以英文原文展示,翻譯版本需完成來源複核後再發布。

已验证事实边界

1. OKX published a WebSocket orders channel push behavior adjustment on July 16, 2026. 2. OKX says affected post-only and RPI order types move “state: live” to after successful book entry, with about a one millisecond delay. 3. 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.” 4. 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. 5. OKX API documentation says successful request responses can mean acceptance, while users should refer to order WebSocket updates for amendment or cancellation confirmation.

收起完整分析

决策矩阵

文章表格:可橫向滑動,或聚焦表格區域後使用方向鍵。

CheckWhat it meansPractical actionUnknown to keep explicit
Acknowledgementthe exchange has received or accepted an order messageseparate transport acknowledgement from final order stategateway latency and private matching details
Final statethe last usable order state after validation, book entry, fill or cancellationwait for the explicit state update before reconcilingprivate account event timing
Post-only exceptionan order type that can cancel when it would cross the booktreat live-then-canceled sequences as a special casefuture matching-engine rules
Amend resultthe source field that explains a successful or failed amendmentrecord amend result and source before retryingvenue-specific reject reason depth
Cancel resultconfirmation that an order is canceled rather than merely requestedwait for canceled state before reusing exposurenetwork or session failure timing
Rate-limit modehow requests behave when order-rate limits are hitdesign retry budgets around documented limitsprivate account tier or subaccount limits
WebSocket channelthe feed that carries order-state updatessubscribe and reconcile before trusting UI-only stateconnection drop handling
REST fallbackthe secondary route for order checks or repairuse only with idempotent identifiers and logsvenue incident behavior
Evidence packetnon-secret request id, order id, timestamp and official URLstore operational evidence without API secretssensitive account values
Stop rulewhen the article cannot support actionstop if accepted, live, filled and canceled states are conflatedfuture 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
  1. OKX EuropeOKX WebSocket Orders Channel Push Behavior Adjustment Announcement · okx.com
  2. OKX Technical SupportOKX API guide · okx.com
  3. OKX United StatesOKX API Agreement · okx.com
  4. OKX Help CenterAPI Announcements · okx.com
選擇下一步研究路徑