dYdX v4 by address: equity, PnL and equity charts, open positions including isolated ones, closed positions, orders and transfers. In the same JSON format as every other Kopyon source.
Trader id A dYdX address (dydx1…). Freshness dYdX's indexer updates these positions every 5 s.
Pick one to see its parameters and a real response.
The address's equity and free collateral across its subaccounts. dYdX has no leaderboard, names or follower counts.
traderIdstringrequiredHourly all-time PnL or equity over the period, oldest first.
traderIdstringrequiredperiodenumrequiredmetricenumoptionalOpen perpetual positions in every subaccount, cross and isolated, marked at dYdX's oracle price.
dYdX's indexer updates these positions every 5 s.
traderIdstringrequiredClosed positions, newest first, with funding and, when the whole position closed, the gross PnL worked out from the average prices. Fees are in orderHistory.
traderIdstringrequiredcursorstringoptionalrowsintoptionalDeposits, withdrawals and transfers to or from other addresses, newest first. Moves between the address's own subaccounts are left out, so a page can hold fewer rows than asked.
traderIdstringrequiredcursorstringoptionalrowsintoptionalFilled perpetual orders, newest first, built from the latest fills (up to 1000): average price, quantity and fees. The oldest order may be missing fills read past the limit. dYdX offers no way to page further back.
traderIdstringrequiredrowsintoptionalSet KOPYON_KEY in your environment. Any address works, active or not.
# One trader's open positions
curl -H "X-API-KEY: $KOPYON_KEY" "https://api.kopyon.com/v5/dydx/openPositions?traderId=TRADER_ID"import os, requests
API = "https://api.kopyon.com/v5/dydx"
HEADERS = {"X-API-KEY": os.environ["KOPYON_KEY"]}
trader_id = "TRADER_ID"
answer = requests.get(f"{API}/openPositions", params={"traderId": trader_id}, headers=HEADERS)
print(answer.json()["data"])const API = "https://api.kopyon.com/v5/dydx";
const headers = { "X-API-KEY": process.env.KOPYON_KEY };
const traderId = "TRADER_ID";
const answer = await fetch(`${API}/openPositions?traderId=${traderId}`, { headers });
console.log((await answer.json()).data);Official SDKs for TypeScript and Python are generated from the same spec. Full reference
Subscribe once and the API polls for you. Hold a WebSocket open, or let signed webhooks POST each change to your server. Both count one request per check, however many of your clients follow the same trader.
const ws = new WebSocket("wss://api.kopyon.com/v5/stream?apiKey=" + KEY);
ws.onopen = () => ws.send(JSON.stringify({
type: "subscribe",
source: "dydx",
topic: "positionEvents",
traderId: TRADER_ID,
}));
ws.onmessage = (m) => console.log(JSON.parse(m.data));{
"type": "events",
"source": "dydx",
"topic": "positionEvents",
"traderId": "TRADER_ID",
"data": {
"events": [
{
"event": "opened",
"symbol": "SOLUSDT",
"side": "LONG",
"size": 620,
"position": {
"symbol": "SOLUSDT",
"side": "LONG",
"size": 620,
"entryPrice": 142.31,
"markPrice": 142.4,
"leverage": 20,
"unrealizedPnl": 55.8
}
}
]
}
}Same route names, same fields, same paging. Code you write for one works on the others.
Every plan reaches every source, and paid plans add the stream and webhooks. The rest is how fast you can call, how many calls you get, and what you may do with the data.
Capacity, uptime and redistribution rights are all negotiated. It's for firms reselling the data, or running it as core infrastructure.
A dYdX address (dydx1…).
As fresh as the exchange publishes it. Each request is read from the source when you make it; identical requests in the same second share one read. Exchanges refresh on their own schedule, from about a second to several minutes, and each route's reference says how often where we know it.
Yes. A free key gets 10,000 requests a month on every source and never asks for a card, and the console has a playground that runs any route or stream with your key. Without a key, each IP gets 10 calls a day per route.
Yes. Every source answers the same routes with the same field names: traders, traderProfile, openPositions, positionHistory and so on. Rates are fractions, sizes are in the base asset, and rankings page with page while histories page with a cursor. What only one exchange sends goes in sourceDetails.
You subscribe to a topic for one trader, and the API polls the exchange for you and sends only what changed: a WebSocket message, or a signed POST to your URL. Each poll counts one request, shared by all your connections and webhooks on the same trader. They come with every paid plan.
The answer says so with hidden: true and an empty list, rather than an empty list you would read as closed, and the stream sends a hidden message instead of closing everything.
No. Kopyon reads what traders share publicly on each exchange or blockchain. A few sources, such as OKX, Hyperliquid and dYdX, publish it through documented APIs; the rest through their websites. An exchange can change what it publishes, and the changelog in the reference says when that affects a route.
Yes. Dedicated plans negotiate limits, capacity and the right to redistribute the data. Tell us the volume you need on Telegram at @nunnito, or by email.
The free tier is 10,000 requests a month. That is enough to build a whole integration and test it against live data before you pay anything.
Usually answered within a day · [email protected] ·