dYdX API logo

dYdX API

dYdX API

UpFreefinancial

dYdX is a decentralized derivatives exchange (perpetuals DEX) API — runs on StarkEx Layer 2, offering low-fee + on-chain settlement derivatives trading.

Visit site ↗Documentation ↗Health checked 9h ago
Use it when

Decentralized (funds stay on-chain, non-custodial)

Watch for

UX more complex than CEX (wallet signatures)

First check

Login at dydx.exchange with wallet to create sub-account. Python SDK: dydx-v3-python (v3) or dydx-v4-client (v4).

Auth
api_key
CORS
?
HTTPS
Yes
Signup
?
Latency
1046 ms
Protocol
REST, WebSocket
Pricing
free

Uptime · 30-day window

Probes: 1Uptime: 100%Avg latency: 1046ms
01

About this API

dYdX is a decentralized exchange founded 2017, the leader in DEX derivatives (perpetuals) since 2021. Like Uniswap (spot DEX), dYdX is a derivatives DEX — non-custodial (your funds stay in your own wallet, not given to a centralized entity) but supports perpetuals. Technically: v3 runs on StarkEx Layer 2 (zk-rollup) for lower gas fees; v4 (2023+) migrated to dYdX's own Cosmos chain. API design borrows CEX experience — uses REST + WebSocket, order placement similar to Binance, but actually generates wallet-signed on-chain orders. Most friendly for traders wanting DEX but CEX-like experience.

02

What you can build

  • 1DEX perpetuals trading
  • 2Decentralized arbitrage
  • 3On-chain margin trading
  • 4Derivatives traders avoiding CEX regulation
03

Strengths & limitations

Strengths

  • Decentralized (funds stay on-chain, non-custodial)
  • Layer 2 — cheap and fast
  • Deepest derivatives liquidity among DEXs

Limitations

  • UX more complex than CEX (wallet signatures)
  • v3 on StarkEx; v4 migrated to own Cosmos chain (dual API during migration)
  • Some markets less complete than Binance
04

Example request

Generic template — replace <endpoint> with the real path from the docs.
curl https://dydx.exchange/<endpoint> \
  -H "Authorization: Bearer $API_KEY"
# Some providers use X-Api-Key instead — verify in the docs.
05

Getting started

Login at dydx.exchange with wallet to create sub-account. Python SDK: dydx-v3-python (v3) or dydx-v4-client (v4).

06

FAQ

v3 or v4?+

v3 still maintained but v4 is the future. New projects use v4; dual API works during migration.

07

Technical details

CORS: ?HTTPS: YesSignup: ?Open source: No
Auth type
api_key
Pricing
free
Rate limit
public 100 req/10s; authenticated 175 req/10s
Protocols
REST, WebSocket
SDKs
python, typescript
Response time
1046 ms
Last health check
5/12/2026, 7:37:20 AM
08

Tags