How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

dYdX

Decentralized cryptocurrency exchange

This event API exposes 14 operations across 7 channels, and defines 61 schemas. It is described by AsyncAPI 2.6.0, at version 4.0.0.

The API connects through 2 servers: indexer.dydx.trade/v4/ws (wss), indexer.v4testnet.dydx.exchange/v4/ws (wss).

14 operations 7 channels 61 schemas

Metadata

The identity and technical contract details declared by the specification.

Specification
AsyncAPI 2.6.0
API Version
4.0.0
Base URL
https://docs.dydx.exchange/
License
Resource Areas
1

Channels & Operations 14

Across 7 channels, the API surfaces 14 operations. Each is listed below with its action, channel, parameters, and response codes.

Channels 14
SUB
v4_markets
Receive market snapshots and updates.
receiveMarkets body
PUB
v4_markets
Send subscribe/unsubscribe envelopes for the markets channel.
sendMarketsSubscription body
SUB
v4_trades
Receive trade snapshots and incremental fills.
receiveTrades body
PUB
v4_trades
Send subscribe/unsubscribe envelopes for the trades channel.
sendTradesSubscription body
SUB
v4_orderbook
Receive orderbook snapshot and price-level updates.
receiveOrderbook body
PUB
v4_orderbook
Send subscribe/unsubscribe envelopes for the orderbook channel.
sendOrderbookSubscription body
SUB
v4_subaccounts
Receive subaccount snapshots and incremental updates.
receiveSubaccounts body
PUB
v4_subaccounts
Send subscribe/unsubscribe envelopes for the subaccounts channel.
sendSubaccountsSubscription body
SUB
v4_candles
Receive candle snapshots and updates.
receiveCandles body
PUB
v4_candles
Send subscribe/unsubscribe envelopes for the candles channel.
sendCandlesSubscription body
SUB
v4_parent_subaccounts
Receive parent-subaccount snapshots and incremental updates.
receiveParentSubaccounts body
PUB
v4_parent_subaccounts
Send subscribe/unsubscribe envelopes for the parent subaccounts channel.
sendParentSubaccountsSubscription body
SUB
v4_block_height
Receive block-height snapshots and updates.
receiveBlockHeight body
PUB
v4_block_height
Send subscribe/unsubscribe envelopes for the blockheight channel.
sendBlockHeightSubscription body

Messages & Schemas 61

The contract defines 61 schemas that model the data carried by its messages. The most detailed are OrderMessageObject (23 properties), PerpetualMarket (21 properties), CandleResponseObject (13 properties), SubaccountMessageObject (9 properties). Each schema is shown below with its type and property counts.

SubscribeMarkets
message
Subscribe to all market parameter and oracle-price updates.
UnsubscribeMarkets
message
SubscribeMarketScoped
message
UnsubscribeMarketScoped
message
SubscribeSubaccounts
message
UnsubscribeSubaccounts
message
SubscribeCandles
message
UnsubscribeCandles
message
SubscribeBlockHeight
message
UnsubscribeBlockHeight
message
Unsubscribed
message
SubscribedMarkets
message
ChannelDataMarkets
message
ChannelBatchDataMarkets
message
SubscribedTrades
message
ChannelDataTrades
message
ChannelBatchDataTrades
message
SubscribedOrderbook
message
ChannelDataOrderbook
message
ChannelBatchDataOrderbook
message
SubscribedSubaccounts
message
ChannelDataSubaccounts
message
ChannelBatchDataSubaccounts
message
SubscribedCandles
message
ChannelDataCandles
message
ChannelBatchDataCandles
message
SubscribedParentSubaccounts
message
ChannelDataParentSubaccounts
message
ChannelBatchDataParentSubaccounts
message
SubscribedBlockHeight
message
ChannelDataBlockHeight
message
SubscribeWithId
object
4 properties 3 required
SubscribeNoId
object
3 properties 2 required
UnsubscribeWithId
object
3 properties 3 required
UnsubscribeNoId
object
2 properties 2 required
SubscribedEnvelopeBase
object
6 properties 5 required
ChannelDataEnvelopeBase
object
7 properties 6 required
ChannelBatchDataEnvelopeBase
object
7 properties 6 required
UnsubscribedEnvelope
object
5 properties 4 required
MarketsInitialMessage
object
Initial message received on the v4markets channel.
1 property
MarketsUpdateMessage
object
Update message on the v4markets channel.
2 properties
TradesInitialMessage
object
Initial message received on the v4trades channel.
1 property
TradesUpdateMessage
object
Update message on the v4trades channel.
1 property
OrderbookInitialMessage
object
Initial message received on the v4orderbook channel.
2 properties
OrderbookUpdateMessage
object
Update message on the v4orderbook channel.
2 properties
SubaccountsInitialMessage
object
Initial message received on the v4subaccounts channel.
3 properties
SubaccountsUpdateMessage
object
Update message on the v4subaccounts channel.
7 properties
CandlesInitialMessage
object
Initial message received on the v4candles channel.
1 property
CandlesUpdateMessage
object
Update message on the v4candles channel.
ParentSubaccountsInitialMessage
object
Initial message received on the v4parentsubaccounts channel.
3 properties
ParentSubaccountsUpdateMessage
object
Update message on the v4parentsubaccounts channel.
6 properties
PerpetualMarket
object
Perpetual market metadata. See https://docs.dydx.xyz/types/perpetualmarket for the full field list.
21 properties
TradeResponseObject
object
Single trade record. See https://docs.dydx.xyz/types/traderesponseobject.
7 properties
OrderbookResponsePriceLevel
object
Single orderbook price level. See https://docs.dydx.xyz/types/orderbookresponsepricelevel.
2 properties
SubaccountMessageObject
object
Subaccount state snapshot. See https://docs.dydx.xyz/types/subaccountmessageobject.
9 properties
OrderMessageObject
object
Order delta as delivered over the v4subaccounts / v4parentsubaccounts channels.
23 properties
CandleResponseObject
object
OHLCV candle. See https://docs.dydx.xyz/types/candleresponseobject.
13 properties
CandlesResolution
string
Candle resolution accepted by the v4candles channel.
ParentSubaccountResponseObject
object
Rolled-up parent subaccount aggregating child subaccounts 0-127.
5 properties
HeightResponse
object
Latest block height observed by the Indexer. See https://docs.dydx.xyz/types/heightresponse.
2 properties
Height
string
Cosmos block height as a decimal string.

Specification

The full machine-readable AsyncAPI contract behind this narrative.

Source

dydx-asyncapi.yml Raw ↑
Where this information came from

This is an independent, third-party profile of dYdX, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.