Binance Spot API WebSocket 重连与 CancelReplace 清单
已验证事实边界
- Binance published the Spot API update notice on 2026-06-25 and updated it the same day.
- Binance said the Spot API infrastructure upgrade was scheduled for 2026-07-09 07:00 UTC with an expected duration of about one hour.
- Binance said WebSocket connections may be disconnected during the update window and users should reconnect to restore the connection.
- Binance REST Spot API documents cancelReplace as a signed endpoint.
- Binance WebSocket Spot API documents the order.cancelReplace method.
收起完整分析
决策矩阵
文章表格:可横向滑动,或聚焦表格区域后使用方向键。
| 核对项 | 含义 | 具体做法 | 尚未确认的事项 |
|---|---|---|---|
| Update window | the official time span where reconnect risk exists | convert UTC into operator timezone | actual completion status |
| Connection loss | WebSocket disconnect during maintenance or infrastructure change | reconnect and resubscribe deterministically | missed messages |
| Subscription replay | restoring market and user data streams after reconnect | keep replay order explicit | stream-specific gaps |
| Private order state | open, canceled, filled or not attempted orders | query after reconnect before sending new orders | fills during disconnect |
| CancelReplace endpoint | replace an order using documented REST or WebSocket flow | treat replace as two outcomes, cancel and new order | partial failure |
| Signed endpoint | request requiring valid timestamp and signature | avoid logging secrets and signatures | clock skew |
| Rate-limit mode | behavior when unfilled order count is exceeded | choose cancel-only fallback intentionally | real-time count |
| Evidence packet | official notice, docs URL and non-secret event log | store without API keys or balances | log retention |
| Rollback action | pause automation or use read-only reconciliation | prefer stop over blind retries | venue incident scope |
| Stop rule | when the update is not decision-quality | stop if reconnect, state or rate-limit behavior is unknown | future changelog edits |
来源地图
- Binance Support:Notice on Binance Spot API Update (2026-06-25)(binance-spot-api-update-20260625)
- Binance Developer Docs:Spot REST API Trade endpoints(binance-rest-trade-docs)
- Binance Developer Docs:Spot WebSocket API trading requests(binance-ws-trade-docs)
- Binance Support:Binance Spot API Service Upgrade (2024-06-06)(binance-2024-upgrade-reference)
控制说明
1. Update window
这一项要求读者先把公开来源翻译成操作规则。这里的含义是:the official time span where reconnect risk exists。可执行动作是:convert UTC into operator timezone。仍然未知的是:actual completion status。因此本文不会把未知部分包装成安全承诺、收益承诺、官方背书、审批保证、可用性保证或注册诱导。
2. Connection loss
这里的含义是:WebSocket disconnect during maintenance or infrastructure change。可执行动作是:reconnect and resubscribe deterministically。仍然未知的是:missed messages。
3. Subscription replay
这里的含义是:restoring market and user data streams after reconnect。可执行动作是:keep replay order explicit。仍然未知的是:stream-specific gaps。
4. Private order state
这里的含义是:open, canceled, filled or not attempted orders。可执行动作是:query after reconnect before sending new orders。仍然未知的是:fills during disconnect。
5. CancelReplace endpoint
这里的含义是:replace an order using documented REST or WebSocket flow。可执行动作是:treat replace as two outcomes, cancel and new order。仍然未知的是:partial failure。
6. Signed endpoint
这里的含义是:request requiring valid timestamp and signature。可执行动作是:avoid logging secrets and signatures。仍然未知的是:clock skew。
7. Rate-limit mode
这里的含义是:behavior when unfilled order count is exceeded。可执行动作是:choose cancel-only fallback intentionally。仍然未知的是:real-time count。
8. Evidence packet
这里的含义是:official notice, docs URL and non-secret event log。可执行动作是:store without API keys or balances。仍然未知的是:log retention。
9. Rollback action
这里的含义是:pause automation or use read-only reconciliation。可执行动作是:prefer stop over blind retries。仍然未知的是:venue incident scope。
10. Stop rule
这里的含义是:when the update is not decision-quality。可执行动作是:stop if reconnect, state or rate-limit behavior is unknown。仍然未知的是:future changelog edits。
仍需明确的未知项
- actual completion status
- missed messages
- stream-specific gaps
- fills during disconnect
- partial failure
- clock skew
- real-time count
- log retention
- venue incident scope
- future changelog edits
实用结论
本文最有价值的地方是克制。Binance 于 2026 年 6 月 25 日发布 Spot API 更新公告,说明 2026 年 7 月 9 日 07:00 UTC 将进行基础设施升级,预计持续约一小时。公告中的行动项很窄:升级窗口内 WebSocket 连接可能断开,用户应重新连接以恢复连接。当前开发者文档补充了操作背景:REST 与 WebSocket 订单流均存在 cancelReplace;REST cancelReplace 是 signed endpoint;过滤器和订单计数会在处理前评估;orderRateLimitExceededMode 会影响超过未成交订单限制时是否仍尝试撤单。因此安全清单应先核验连接恢复、订阅重放、私人订单状态对账、rate-limit 处理和不含秘密的日志,再把该更新视为“无影响”。 用户应获得一个更清楚的核验路径,而不是一个看似肯定、实则无法由公开证据承担的承诺。
来源与证据
04- 原文标题Notice on Binance Spot API Update (2026-06-25)
- 原文标题Spot REST API Trade endpoints · developers.binance.com
- 原文标题Spot WebSocket API trading requests · developers.binance.com
- 原文标题Binance Spot API Service Upgrade (2024-06-06)
选择下一步研究路径
更多研究: Binance
本文提到Binance。