dYdX Indexer WebSocket 与子账户准备清单
本文正文暫以英文原文展示,翻譯版本需完成來源複核後再發布。
已验证事实边界
1. dYdX IndexerClient documentation shows initialization with IndexerConfig and public indexer HTTP/WebSocket endpoints. 2. The dYdX v4-chain indexer README documents WebSocket subscriptions including v4_markets, v4_orderbook and v4_subaccounts. 3. The public dYdX Indexer API documentation exposes account, subaccount, market, orderbook, fill, funding and compliance-screen routes. 4. Indexer availability does not prove a wallet's legal eligibility, compliance state, margin sufficiency or order execution outcome. 5. A connected websocket should be paired with REST backfill for gap recovery and incident evidence. 6. The safe rollout record keeps endpoint, channel, subaccount identifier, compliance-screen result and fallback route separate.
收起完整分析
决策矩阵
文章表格:可橫向滑動,或聚焦表格區域後使用方向鍵。
| Check | What it means | Practical action | Unknown to keep explicit |
|---|---|---|---|
| Endpoint selection | client code must use the intended network endpoint rather than a stale testnet or staging URL | record HTTP and WebSocket base URLs before integration | future endpoint migration outside the local config |
| Subaccount identity | subaccount data depends on address and subaccount number mapping | verify address, subaccountNumber and parentSubaccountNumber before display | wallets linked through a route not represented in the local model |
| WebSocket channels | different channels answer market, orderbook and account questions | subscribe only to the channel needed for the decision | message gaps during reconnect |
| REST backfill | REST routes can be used to check state after stream loss | backfill fills, positions and orderbook state after reconnect | whether historical windows cover the entire outage |
| Compliance screen | screening endpoints are decision inputs, not guarantees of permission | treat screen results as a stop/go evidence item | jurisdiction-specific account treatment |
| Evidence hygiene | public endpoint tests should not expose wallet private data | store route, network, channel and non-secret status labels | retention rules for account-level logs |
来源地图
- dYdX Documentation:Indexer Client(dydx-indexer-client)
- dYdX Protocol GitHub:v4-chain Indexer README(dydx-v4-indexer-readme)
- dYdX Indexer:Indexer API OpenAPI documentation(dydx-indexer-api)
控制说明
1. Endpoint selection
这一项要求读者先把公开来源翻译成操作规则。这里的含义是:client code must use the intended network endpoint rather than a stale testnet or staging URL。可执行动作是:record HTTP and WebSocket base URLs before integration。仍然未知的是:future endpoint migration outside the local config。因此本文不会把未知部分包装成收益承诺、牌照承诺、审批保证、恢复保证、结算保证、可用性保证、价格暗示或平台排名。
2. Subaccount identity
这里的含义是:subaccount data depends on address and subaccount number mapping。可执行动作是:verify address, subaccountNumber and parentSubaccountNumber before display。仍然未知的是:wallets linked through a route not represented in the local model。
操作测试也必须很窄。这就是本节保留边界的原因。
3. WebSocket channels
这里的含义是:different channels answer market, orderbook and account questions。可执行动作是:subscribe only to the channel needed for the decision。仍然未知的是:message gaps during reconnect。
操作测试也必须很窄。这就是本节保留边界的原因。
4. REST backfill
这里的含义是:REST routes can be used to check state after stream loss。可执行动作是:backfill fills, positions and orderbook state after reconnect。仍然未知的是:whether historical windows cover the entire outage。
操作测试也必须很窄。这就是本节保留边界的原因。
5. Compliance screen
这里的含义是:screening endpoints are decision inputs, not guarantees of permission。可执行动作是:treat screen results as a stop/go evidence item。仍然未知的是:jurisdiction-specific account treatment。
操作测试也必须很窄。这就是本节保留边界的原因。
6. Evidence hygiene
这里的含义是:public endpoint tests should not expose wallet private data。可执行动作是:store route, network, channel and non-secret status labels。仍然未知的是:retention rules for account-level logs。
操作测试也必须很窄。这就是本节保留边界的原因。
仍需明确的未知项
- future endpoint migration outside the local config
- wallets linked through a route not represented in the local model
- message gaps during reconnect
- whether historical windows cover the entire outage
- jurisdiction-specific account treatment
- retention rules for account-level logs
实用结论
dYdX v4 indexer 证据应被视为应用数据准备问题,而不是钱包已获批或交易安全的证明。官方 dYdX client 文档展示了如何用 indexer HTTP 与 WebSocket endpoint 初始化 IndexerClient,v4-chain indexer README 记录了 v4_markets、v4_orderbook、v4_subaccounts 等 websocket channel 示例,公开 Indexer API 暴露 account、market、fill 与 compliance-screen 路由。实用结论是:在交易流程依赖 indexer 数据前,应测试 endpoint selection、subaccount identity、websocket subscription、REST backfill 与 compliance-screen handling。 本文停在证据边界内,帮助读者决定下一步核验什么,而不是把公开文档改写成私人账户、钱包、回调、政策框架、结算路径或流动性头寸在任何未来条件下都能成功的承诺。
相關專題與工具:交易所 API 與行情資料核查