交易所动态

dYdX Indexer WebSocket 与子账户准备清单

4 分钟

已验证事实边界

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.

收起完整分析

决策矩阵

文章表格:可横向滑动,或聚焦表格区域后使用方向键。

CheckWhat it meansPractical actionUnknown to keep explicit
Endpoint selectionclient code must use the intended network endpoint rather than a stale testnet or staging URLrecord HTTP and WebSocket base URLs before integrationfuture endpoint migration outside the local config
Subaccount identitysubaccount data depends on address and subaccount number mappingverify address, subaccountNumber and parentSubaccountNumber before displaywallets linked through a route not represented in the local model
WebSocket channelsdifferent channels answer market, orderbook and account questionssubscribe only to the channel needed for the decisionmessage gaps during reconnect
REST backfillREST routes can be used to check state after stream lossbackfill fills, positions and orderbook state after reconnectwhether historical windows cover the entire outage
Compliance screenscreening endpoints are decision inputs, not guarantees of permissiontreat screen results as a stop/go evidence itemjurisdiction-specific account treatment
Evidence hygienepublic endpoint tests should not expose wallet private datastore route, network, channel and non-secret status labelsretention rules for account-level logs

来源地图

控制说明

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。 本文停在证据边界内,帮助读者决定下一步核验什么,而不是把公开文档改写成私人账户、钱包、回调、政策框架、结算路径或流动性头寸在任何未来条件下都能成功的承诺。

来源与证据

03
  1. dYdX DocumentationIndexer Client
  2. dYdX Protocol GitHubv4-chain Indexer README
  3. dYdX IndexerIndexer API OpenAPI documentation