dYdX Chain (v4)
dYdX Chain (v4) perpetual markets: tickers, L2 order books, candles, funding history, trades, vaults, positions and WebSocket streams.
Independent service, not affiliated with dYdX Chain (v4). dYdX Chain (v4) is a trademark of its owner.
What you can get
- Perpetual market snapshots with oracle price, funding rate, open interest and 24h volume
- L2 order books, OHLCV candles, recent trades and historical funding series
- Subaccount equity, positions, fills, orders, transfers, historical PnL and MegaVault metrics
- 6 real-time WebSocket feeds (trades, orderbook, markets, candles, block height)
First request
Example: GET /v4/perpetualMarkets. Send your key in the X-Hub-Key header.
curl -sS -H "X-Hub-Key: $API_HUB_KEY" \
"https://openapihub.dev/run/dydx/v4/perpetualMarkets?market=BTC-USD"Response
The provider's JSON arrives unchanged in data. Abridged example; values change with the market.
{
"source": "dydx",
"status": 200,
"data": {
"markets": {
"BTC-USD": {
"ticker": "BTC-USD", "status": "ACTIVE",
"oraclePrice": "91410.00", "nextFundingRate": "0.0000125",
"openInterest": "412.85", "volume24H": "185420100.0"
}
}
}
}Limits and key
80 requests per second per key, bursts up to 160, 60 requests in flight. On 429, wait for Retry-After. Limits · Pricing · OpenAPI JSON
Get a free key in the Telegram bot: one key per account, issued in a few seconds.
Use cases
- Perpetuals and options API: Hyperliquid, dYdX v4 & Deribit
- Real-time crypto WebSockets and WebSocket RPC
All endpoints
WebSocket streams
GET
/ws/dydx/trades/{market} [WS] — Live public trade feed for one dYdX market (WebSocket).GET
/ws/dydx/orderbook/{market} [WS] — Live public order-book updates for one dYdX market (WebSocket).GET
/ws/dydx/markets [WS] — Live public dYdX market metadata/oracle update feed (WebSocket).GET
/ws/dydx/candles/{market}/{resolution} [WS] — Live OHLCV candle stream for one dYdX market and resolution (WebSocket).GET
/ws/dydx/block_height [WS] — Live dYdX Chain block height stream (WebSocket).GET
/ws/dydx/subaccounts/{address}/{subaccountNumber} [WS] — Live public on-chain subaccount state, orders, fills, and positions stream (WebSocket).Affiliates
GET
/v4/affiliates/snapshot — Affiliate leaderboard snapshot with referral codes, volume, and earnings.Compliance
GET
/v4/screen — Compliance screening result for one address: whether the address is restricted and the reason, if any.GET
/v4/compliance/screen/{address} — Compliance screening detail for one address: status, reason and last update time.Markets
GET
/v4/perpetualMarkets — Perpetual market map: ticker, clobPairId, status, oracle and indexer prices, funding rate, open interest, volume, tick size and margin parameters.GET
/v4/orderbooks/perpetualMarket/{market} — L2 order book for one perpetual market with bid/ask price, size and offsetting order counts.GET
/v4/trades/perpetualMarket/{market} — Recent public trades for one perpetual market, newest first, with side, price, size and block height.GET
/v4/candles/perpetualMarkets/{market} — OHLCV candles for one perpetual market at a chosen resolution, optionally bounded by ISO timestamps.GET
/v4/historicalFunding/{market} — Historical funding rates for one perpetual market, newest first, with the effective time and block height.GET
/v4/sparklines — Sparkline price series for every perpetual market over the last day or seven days.Utility
Vaults
GET
/v4/vault/v1/vaults/historicalPnl — Historical PnL for every vault at day or hour resolution. Heavy: the response is several megabytes.GET
/v4/vault/v1/megavault/positions — Current MegaVault positions: market, side, size, entry price, realized and unrealized PnL.