Kraken WebSocket v2 下单与撤单生命周期准备清单
已验证事实边界
- Kraken publishes official Spot WebSocket v2 documentation.
- Kraken documents add_order as a WebSocket v2 order-entry method.
- Kraken documents cancel_order as a WebSocket v2 cancellation method.
- Kraken documents a REST route for getting a WebSockets token used in WebSocket authentication workflows.
- A successful WebSocket command does not by itself prove final order state without acknowledgement and reconciliation evidence.
- Public documentation cannot prove private account permission, final fill state, token freshness, future rate limits or support recovery for a specific trading session.
收起完整分析
决策矩阵
文章表格:可横向滑动,或聚焦表格区域后使用方向键。
| 核对项 | 含义 | 具体做法 | 尚未确认的事项 |
|---|---|---|---|
| Authentication state | private order channels depend on token or authenticated session state | record token source and refresh rule without storing secrets | token expiry, revocation, private account status and future authentication changes |
| Order identifier | client and exchange identifiers serve different reconciliation jobs | log non-secret identifiers and pair them with command timestamps | identifier collision, delayed acknowledgement and private-account filters |
| Acknowledgement | command acceptance is not identical to final execution or cancellation | capture acknowledgement and final order-state evidence separately | partial fills, race conditions and stale client state |
| Backfill | WebSocket state may need REST or private-channel reconciliation after reconnect | write a backfill rule before using the stream for automation | whether every lost event is recoverable from public or private endpoints |
| Stop condition | automation should stop if token state, acknowledgement or final state is missing | pause live order logic until lifecycle evidence is complete | future venue behavior and support-side order reconstruction |
来源地图
- Kraken API Center:Spot WebSocket v2 Documentation(kraken-ws-v2)
- Kraken API Center:Add Order(kraken-add-order)
- Kraken API Center:Cancel Order(kraken-cancel-order)
- Kraken API Center:Get Websockets Token(kraken-ws-token)
控制说明
1. Authentication state
这一项要求读者把公开来源翻译成操作规则。这里的含义是:private order channels depend on token or authenticated session state。可执行动作是:record token source and refresh rule without storing secrets。仍然未知的是:token expiry, revocation, private account status and future authentication changes。因此本文不会把未知部分包装成收益承诺、牌照承诺、审批保证、安全保证、恢复保证、平台排名或价格暗示。
2. Order identifier
这里的含义是:client and exchange identifiers serve different reconciliation jobs。可执行动作是:log non-secret identifiers and pair them with command timestamps。仍然未知的是:identifier collision, delayed acknowledgement and private-account filters。
操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。
3. Acknowledgement
这里的含义是:command acceptance is not identical to final execution or cancellation。可执行动作是:capture acknowledgement and final order-state evidence separately。仍然未知的是:partial fills, race conditions and stale client state。
操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。
4. Backfill
这里的含义是:WebSocket state may need REST or private-channel reconciliation after reconnect。可执行动作是:write a backfill rule before using the stream for automation。仍然未知的是:whether every lost event is recoverable from public or private endpoints。
操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。
5. Stop condition
这里的含义是:automation should stop if token state, acknowledgement or final state is missing。可执行动作是:pause live order logic until lifecycle evidence is complete。仍然未知的是:future venue behavior and support-side order reconstruction。
操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。
仍需明确的未知项
- token expiry, revocation, private account status and future authentication changes
- identifier collision, delayed acknowledgement and private-account filters
- partial fills, race conditions and stale client state
- whether every lost event is recoverable from public or private endpoints
- future venue behavior and support-side order reconstruction
实用结论
Kraken WebSocket v2 订单控制应被视为包含 command、acknowledgement、execution 与 reconciliation 状态的生命周期。Kraken 为 Spot WebSocket v2 API 记录了 add_order、cancel_order 与 private execution surfaces。实用输出是:依赖 WebSocket session 做实时订单控制前,先记录 authentication、client order identifier policy、acknowledgement evidence、execution-report backfill、cancel outcome 与人工暂停条件。 本文停在证据边界内,帮助读者决定下一步核验什么,而不是把公开文档改写成私人账户、钱包、API key、池子路径、稳定币余额、代币化资产或政策框架在任何未来条件下都能成功的承诺。
来源与证据
04- 原文标题Spot WebSocket v2 Documentation · docs.kraken.com
- 原文标题Add Order · docs.kraken.com
- 原文标题Cancel Order · docs.kraken.com
- 原文标题Get Websockets Token · docs.kraken.com
本文提到Kraken。