Cryptocurrency — entry 032 of 53
dYdX
dYdX is a decentralized perpetuals exchange that migrated from its StarkEx-based v3 to a Cosmos-chain v4 architecture, replacing the old exchange API with an open-source Indexer exposing markets, orderbooks, trades, and candles over REST and WebSocket. Anyone can run their own Indexer instance, but the public one at indexer.dydx.trade needs no signup for market-data reads — it's rate-limited rather than API-key gated.
dYdX v4's Indexer is a keyless, read-only REST and WebSocket service that mirrors on-chain state for the dYdX Cosmos appchain — markets, orderbooks, trades, and candles all live here, built by parsing the chain rather than sitting in the trading path itself.
GreatAPIs Score
Auth quickstart
- No API key required — the public Indexer at
indexer.dydx.tradeis a keyless, read-only, eventually-consistent view. Every response carries liveratelimit-limit/ratelimit-remaining/ratelimit-resetheaders (a live response showedratelimit-limit: 100per short rolling per-IP window) rather than a fixed number published in the docs, so track those headers instead of assuming a hardcoded ceiling.
Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.
Endpoints
addresses5
GET/addresses/{address}
| Name | In | Required | Type |
|---|---|---|---|
address | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | AddressResponse |
GET/addresses/{address}/parentSubaccountNumber/{parentSubaccountNumber}
| Name | In | Required | Type |
|---|---|---|---|
address | path | yes | string |
parentSubaccountNumber | path | yes | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | ParentSubaccountResponse |
POST/addresses/{address}/registerToken
| Name | In | Required | Type |
|---|---|---|---|
address | path | yes | string |
application/json (required)
| Status | Description | Schema |
|---|---|---|
204 | No content | — |
GET/addresses/{address}/subaccountNumber/{subaccountNumber}
| Name | In | Required | Type |
|---|---|---|---|
address | path | yes | string |
subaccountNumber | path | yes | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | SubaccountResponseObject |
POST/addresses/{address}/testNotification
| Name | In | Required | Type |
|---|---|---|---|
address | path | yes | string |
| Status | Description | Schema |
|---|---|---|
204 | No content | — |
affiliates5
GET/affiliates/address
| Name | In | Required | Type |
|---|---|---|---|
referralCode | query | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | AffiliateAddressResponse |
GET/affiliates/metadata
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | AffiliateMetadataResponse |
POST/affiliates/referralCode
application/json (required)
| Status | Description | Schema |
|---|---|---|
200 | Ok | CreateReferralCodeResponse |
GET/affiliates/snapshot
| Name | In | Required | Type |
|---|---|---|---|
addressFilter | query | no | array |
offset | query | no | number |
limit | query | no | number |
sortByAffiliateEarning | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Ok | AffiliateSnapshotResponse |
GET/affiliates/total_volume
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | AffiliateTotalVolumeResponse |
assetPositions2
GET/assetPositions
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
subaccountNumber | query | yes | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | AssetPositionResponse |
GET/assetPositions/parentSubaccountNumber
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
parentSubaccountNumber | query | yes | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | AssetPositionResponse |
candles1
GET/candles/perpetualMarkets/{ticker}
| Name | In | Required | Type |
|---|---|---|---|
ticker | path | yes | string |
resolution | query | yes | — |
limit | query | no | number |
fromISO | query | no | string |
toISO | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | CandleResponse |
compliance1
GET/compliance/screen/{address}
| Name | In | Required | Type |
|---|---|---|---|
address | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | ComplianceV2Response |
fills2
GET/fills
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
subaccountNumber | query | yes | number |
market | query | no | string |
marketType | query | no | — |
includeTypes | query | no | array |
excludeTypes | query | no | array |
limit | query | no | number |
createdBeforeOrAtHeight | query | no | number |
createdBeforeOrAt | query | no | — |
page | query | no | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | FillResponse |
GET/fills/parentSubaccount
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
parentSubaccountNumber | query | yes | number |
includeTypes | query | no | array |
excludeTypes | query | no | array |
limit | query | no | number |
page | query | no | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | FillResponse |
fundingPayments2
GET/fundingPayments
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
subaccountNumber | query | yes | number |
limit | query | no | number |
ticker | query | no | string |
afterOrAt | query | no | — |
page | query | no | number |
zeroPayments | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Ok | FundingPaymentResponse |
GET/fundingPayments/parentSubaccount
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
parentSubaccountNumber | query | yes | number |
limit | query | no | number |
afterOrAt | query | no | — |
page | query | no | number |
zeroPayments | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Ok | FundingPaymentResponse |
height1
GET/height
| Status | Description | Schema |
|---|---|---|
200 | Ok | HeightResponse |
historical-pnl2
GET/historical-pnl
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
subaccountNumber | query | yes | number |
limit | query | no | number |
createdBeforeOrAtHeight | query | no | number |
createdBeforeOrAt | query | no | — |
createdOnOrAfterHeight | query | no | number |
createdOnOrAfter | query | no | — |
page | query | no | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | HistoricalPnlResponse |
GET/historical-pnl/parentSubaccountNumber
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
parentSubaccountNumber | query | yes | number |
limit | query | no | number |
createdBeforeOrAtHeight | query | no | number |
createdBeforeOrAt | query | no | — |
createdOnOrAfterHeight | query | no | number |
createdOnOrAfter | query | no | — |
| Status | Description | Schema |
|---|---|---|
200 | Ok | HistoricalPnlResponse |
historicalBlockTradingRewards1
GET/historicalBlockTradingRewards/{address}
| Name | In | Required | Type |
|---|---|---|---|
address | path | yes | string |
limit | query | no | number |
startingBeforeOrAt | query | no | — |
startingBeforeOrAtHeight | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | HistoricalBlockTradingRewardsResponse |
historicalFunding1
GET/historicalFunding/{ticker}
| Name | In | Required | Type |
|---|---|---|---|
ticker | path | yes | string |
limit | query | no | number |
effectiveBeforeOrAtHeight | query | no | number |
effectiveBeforeOrAt | query | no | — |
| Status | Description | Schema |
|---|---|---|
200 | Ok | HistoricalFundingResponse |
historicalTradingRewardAggregations1
GET/historicalTradingRewardAggregations/{address}
| Name | In | Required | Type |
|---|---|---|---|
address | path | yes | string |
period | query | yes | — |
limit | query | no | number |
startingBeforeOrAt | query | no | — |
startingBeforeOrAtHeight | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | HistoricalTradingRewardAggregationsResponse |
orderbooks1
GET/orderbooks/perpetualMarket/{ticker}
| Name | In | Required | Type |
|---|---|---|---|
ticker | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | OrderbookResponseObject |
orders3
GET/orders
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
subaccountNumber | query | yes | number |
limit | query | no | number |
ticker | query | no | string |
side | query | no | — |
type | query | no | — |
includeTypes | query | no | array |
excludeTypes | query | no | array |
status | query | no | array |
goodTilBlockBeforeOrAt | query | no | number |
goodTilBlockAfter | query | no | number |
goodTilBlockTimeBeforeOrAt | query | no | — |
goodTilBlockTimeAfter | query | no | — |
returnLatestOrders | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Ok | — |
GET/orders/parentSubaccountNumber
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
parentSubaccountNumber | query | yes | number |
limit | query | no | number |
ticker | query | no | string |
side | query | no | — |
type | query | no | — |
includeTypes | query | no | array |
excludeTypes | query | no | array |
status | query | no | array |
goodTilBlockBeforeOrAt | query | no | number |
goodTilBlockAfter | query | no | number |
goodTilBlockTimeBeforeOrAt | query | no | — |
goodTilBlockTimeAfter | query | no | — |
returnLatestOrders | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Ok | — |
GET/orders/{orderId}
| Name | In | Required | Type |
|---|---|---|---|
orderId | path | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | OrderResponseObject |
perpetualMarkets1
GET/perpetualMarkets
| Name | In | Required | Type |
|---|---|---|---|
limit | query | no | number |
ticker | query | no | string |
market | query | no | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | PerpetualMarketResponse |
perpetualPositions2
GET/perpetualPositions
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
subaccountNumber | query | yes | number |
status | query | no | array |
limit | query | no | number |
createdBeforeOrAtHeight | query | no | number |
createdBeforeOrAt | query | no | — |
| Status | Description | Schema |
|---|---|---|
200 | Ok | PerpetualPositionResponse |
GET/perpetualPositions/parentSubaccountNumber
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
parentSubaccountNumber | query | yes | number |
status | query | no | array |
limit | query | no | number |
createdBeforeOrAtHeight | query | no | number |
createdBeforeOrAt | query | no | — |
| Status | Description | Schema |
|---|---|---|
200 | Ok | PerpetualPositionResponse |
pnl2
GET/pnl
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
subaccountNumber | query | yes | number |
limit | query | no | number |
createdBeforeOrAtHeight | query | no | number |
createdBeforeOrAt | query | no | — |
createdOnOrAfterHeight | query | no | number |
createdOnOrAfter | query | no | — |
page | query | no | number |
daily | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Ok | PnlResponse |
GET/pnl/parentSubaccountNumber
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
parentSubaccountNumber | query | yes | number |
limit | query | no | number |
createdBeforeOrAtHeight | query | no | number |
createdBeforeOrAt | query | no | — |
createdOnOrAfterHeight | query | no | number |
createdOnOrAfter | query | no | — |
daily | query | no | boolean |
| Status | Description | Schema |
|---|---|---|
200 | Ok | PnlResponse |
screen1
GET/screen
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | ComplianceResponse |
sparklines1
GET/sparklines
| Name | In | Required | Type |
|---|---|---|---|
timePeriod | query | yes | — |
| Status | Description | Schema |
|---|---|---|
200 | Ok | SparklineResponseObject |
time1
GET/time
| Status | Description | Schema |
|---|---|---|
200 | Ok | TimeResponse |
tradeHistory2
GET/tradeHistory
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
subaccountNumber | query | yes | number |
market | query | no | string |
marketType | query | no | — |
limit | query | no | number |
page | query | no | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | TradeHistoryResponse |
GET/tradeHistory/parentSubaccountNumber
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
parentSubaccountNumber | query | yes | number |
market | query | no | string |
marketType | query | no | — |
limit | query | no | number |
page | query | no | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | TradeHistoryResponse |
trader1
GET/trader/search
| Name | In | Required | Type |
|---|---|---|---|
searchParam | query | yes | string |
| Status | Description | Schema |
|---|---|---|
200 | Ok | TraderSearchResponse |
trades1
GET/trades/perpetualMarket/{ticker}
| Name | In | Required | Type |
|---|---|---|---|
ticker | path | yes | string |
limit | query | no | number |
createdBeforeOrAtHeight | query | no | number |
createdBeforeOrAt | query | no | — |
page | query | no | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | TradeResponse |
transfers3
GET/transfers
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
subaccountNumber | query | yes | number |
limit | query | no | number |
createdBeforeOrAtHeight | query | no | number |
createdBeforeOrAt | query | no | — |
page | query | no | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | TransferResponse |
GET/transfers/between
| Name | In | Required | Type |
|---|---|---|---|
sourceAddress | query | yes | string |
sourceSubaccountNumber | query | yes | number |
recipientAddress | query | yes | string |
recipientSubaccountNumber | query | yes | number |
createdBeforeOrAtHeight | query | no | number |
createdBeforeOrAt | query | no | — |
| Status | Description | Schema |
|---|---|---|
200 | Ok | TransferBetweenResponse |
GET/transfers/parentSubaccountNumber
| Name | In | Required | Type |
|---|---|---|---|
address | query | yes | string |
parentSubaccountNumber | query | yes | number |
limit | query | no | number |
createdBeforeOrAtHeight | query | no | number |
createdBeforeOrAt | query | no | — |
page | query | no | number |
| Status | Description | Schema |
|---|---|---|
200 | Ok | ParentSubaccountTransferResponse |
turnkey3
POST/turnkey/appleLoginRedirect
application/json — AppleLoginRedirectRequest (required)
| Status | Description | Schema |
|---|---|---|
200 | Ok | AppleLoginResponse |
POST/turnkey/signin
application/json — SignInRequest (required)
| Status | Description | Schema |
|---|---|---|
200 | Ok | TurnkeyAuthResponse |
POST/turnkey/uploadAddress
application/json (required)
| Status | Description | Schema |
|---|---|---|
200 | Ok | — |
vault3
GET/vault/v1/megavault/historicalPnl
| Name | In | Required | Type |
|---|---|---|---|
resolution | query | no | — |
| Status | Description | Schema |
|---|---|---|
200 | Ok | MegavaultHistoricalPnlResponse |
GET/vault/v1/megavault/positions
| Status | Description | Schema |
|---|---|---|
200 | Ok | MegavaultPositionResponse |
GET/vault/v1/vaults/historicalPnl
| Name | In | Required | Type |
|---|---|---|---|
resolution | query | no | — |
| Status | Description | Schema |
|---|---|---|
200 | Ok | VaultsHistoricalPnlResponse |
Try it
Developer reference
https://indexer.dydx.trade/v4100 requests per short rolling per-IP window, per the live `ratelimit-limit`/`ratelimit-remaining`/`ratelimit-reset` response headers on indexer.dydx.trade — docs.dydx.xyz does not publish a fixed public number itself.
- GET/perpetualMarkets
- GET/time
- GET/height
Gotchas & limits
- The response nests a single market under
markets, keyed by ticker (e.g.markets["BTC-USD"]) — even a?ticker=-filtered request still returns an object, not a flat record or an array. - v3 (the original StarkEx-based exchange API) is gone — v4's open-source Indexer is the only public dYdX market-data API today; v3 endpoint paths and client code won't work against it.
- Almost every numeric-looking field (
oraclePrice,priceChange24H,volume24H, the margin fractions,openInterest) is a JSON string; only a handful liketrades24H,atomicResolution, andstepBaseQuantumscome through as real numbers. - A live response carried a
geo-origin-status: restrictedheader alongsidegeo-origin-country/geo-origin-region— the Indexer geo-tags requests and can restrict access by jurisdiction, so don't assume every caller gets identical responses regardless of origin.
Availability
Changelog
- gained an OpenAPI spec