Deribit 心跳与断线撤单准备清单
已验证事实边界
- Deribit public API documentation describes setheartbeat as a WebSocket-only endpoint that sends heartbeat and test_request messages.
- Deribit public API documentation says software should respond to test_request messages and that the API server closes the connection if the software fails to do so.
- Deribit public API documentation says orders opened over the connection will be cancelled if the account is configured to cancel on disconnect.
- Deribit FIX API documentation describes a CancelOnDisconnect Logon tag that controls Close on Disconnect, with account defaults used when the tag is not provided.
- Deribit HTTP API documentation separately lists private cancel behavior, so explicit cancels and disconnect-triggered cancels should not be treated as the same control.
- A venue update does not prove a private account's cancel-on-disconnect default, FIX entitlement, order scope or session behavior without account-specific testing.
收起完整分析
决策矩阵
文章表格:可横向滑动,或聚焦表格区域后使用方向键。
| 核对项 | 含义 | 具体做法 | 尚未确认的事项 |
|---|---|---|---|
| Heartbeat response | heartbeat is an application-level liveness contract for WebSocket automation | test the exact response path and alert on missed test_request messages | whether a reconnect library hides missed heartbeat failures |
| Account default | Deribit documentation ties cancel-on-disconnect behavior to account configuration or FIX tag selection | record the account default in a non-secret operations note before live orders | whether different subaccounts inherit the same default |
| FIX tag override | CancelOnDisconnect can be sent at FIX Logon while absent tags fall back to account default | test Logon settings in a controlled session before production rollout | whether FIX and WebSocket sessions should share the same rule |
| Graceful logout | logout, abnormal closure and heartbeat timeout are distinct session endings | document which closure path is expected during deployments | whether a clean shutdown accidentally leaves orders open |
| Explicit cancel fallback | private cancel endpoints still matter when disconnect automation is not enough | keep a separate manual or automated cancel route and reconcile final state | whether a lost response after explicit cancel races with disconnect cancellation |
| Evidence scope | liveness evidence can prove session behavior but not exchange-wide safety | store timestamps, session id, non-secret order id, event and final query result | whether logs expose strategy, balance or position data |
来源地图
- Deribit API Documentation:Public API endpoints: heartbeat and cancelheartbeat(deribit-public-api)
- Deribit API Documentation:FIX API session and CancelOnDisconnect(deribit-fix-api)
- Deribit API Documentation:HTTP RPC and private cancel endpoint context(deribit-http-api)
- Deribit API Documentation:Deribit API documentation home(deribit-docs-home)
- NexuAlpha Official Source Registry:Official source registry policy for venue evidence(nexualpha-official-source-registry)
控制说明
1. Heartbeat response
这一项要求读者把公开来源翻译成操作规则。这里的含义是:heartbeat is an application-level liveness contract for WebSocket automation。可执行动作是:test the exact response path and alert on missed test_request messages。仍然未知的是:whether a reconnect library hides missed heartbeat failures。因此本文不会把未知部分包装成收益承诺、牌照承诺、审批保证、安全保证、恢复保证、平台排名或价格暗示。
2. Account default
这里的含义是:Deribit documentation ties cancel-on-disconnect behavior to account configuration or FIX tag selection。可执行动作是:record the account default in a non-secret operations note before live orders。仍然未知的是:whether different subaccounts inherit the same default。
操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。
3. FIX tag override
这里的含义是:CancelOnDisconnect can be sent at FIX Logon while absent tags fall back to account default。可执行动作是:test Logon settings in a controlled session before production rollout。仍然未知的是:whether FIX and WebSocket sessions should share the same rule。
操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。
4. Graceful logout
这里的含义是:logout, abnormal closure and heartbeat timeout are distinct session endings。可执行动作是:document which closure path is expected during deployments。仍然未知的是:whether a clean shutdown accidentally leaves orders open。
操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。
5. Explicit cancel fallback
这里的含义是:private cancel endpoints still matter when disconnect automation is not enough。可执行动作是:keep a separate manual or automated cancel route and reconcile final state。仍然未知的是:whether a lost response after explicit cancel races with disconnect cancellation。
操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。
6. Evidence scope
这里的含义是:liveness evidence can prove session behavior but not exchange-wide safety。可执行动作是:store timestamps, session id, non-secret order id, event and final query result。仍然未知的是:whether logs expose strategy, balance or position data。
操作测试也必须很窄。这就是本文坚持以清单形式呈现的原因。
仍需明确的未知项
- whether a reconnect library hides missed heartbeat failures
- whether different subaccounts inherit the same default
- whether FIX and WebSocket sessions should share the same rule
- whether a clean shutdown accidentally leaves orders open
- whether a lost response after explicit cancel races with disconnect cancellation
- whether logs expose strategy, balance or position data
实用结论
Deribit 文档把连接活性变成了订单风险控制,而不是后台网络细节。公开 API 文档描述 WebSocket heartbeat 与 test_request 行为,并说明若账户配置了 cancel on disconnect,连接未通过 heartbeat 流程时该连接打开的订单可能被取消。FIX API 文档描述 Logon 时的 CancelOnDisconnect 标签,并指出异常或登出相关的 session 行为会根据该设置影响订单取消。准备决策是:依赖 Deribit 自动化前,先测试 heartbeat response、disconnect handling、account default、FIX tag use、graceful logout 与 post-disconnect order state。 本文停在证据边界内,帮助读者决定下一步核验什么,而不是把公开文档改写成私人账户、钱包、API key、池子路径、稳定币余额、代币化资产或政策框架在任何未来条件下都能成功的承诺。
来源与证据
04- 原文标题Public API endpoints: heartbeat and cancelheartbeat
- 原文标题FIX API session and CancelOnDisconnect
- 原文标题HTTP RPC and private cancel endpoint context
- 原文标题Deribit API documentation home · docs.deribit.com
本文提到Deribit。