dYdX Agent Gateway (local MCP server)
The gateway is deployed on this host, endpoint http://127.0.0.1:8901/mcp
(streamable HTTP, systemd unit dydx-mcp.service; check with
systemctl is-active dydx-mcp). The code lives at the repository root
of https://github.com/alekskram/dydx-agent-gateway
(the skill's source is .agents/skills/dydx-gateway/; after edits,
copy it to ~/.zcode/skills/dydx-gateway/). If the gateway is not
running, start it per the repo README Install section
(uvx --from git+https://github.com/alekskram/dydx-agent-gateway dydx-agent-gateway --http --port 8901).
Background data: the block scanner (dydx-scanner, the address registry
keeps growing), detectors every 5 min (dydx-detectors.timer),
leaderboard every 6 h (dydx-leaderboard.timer), watchdog report on the
1st of each month.
MCP tools (22)
Data: list_markets, market_detail, candles, recent_trades, height
· Analytics: funding_heatmap(min_oi_usd), historical_funding(limit≤500),
market_ta, suggest_stops, trader_profile,
trader_pnl_stats(limit≤5000), fills_review, raw_fills(limit≤200),
cvd(trades_limit), correlation(ticker_a, ticker_b)
· Discovery: market_digest (one-call briefing — start here),
leaderboard, discover_traders, list_traders, registry_stats,
latest_events, usage_stats
Quick path without an MCP client
cd <repo root> && python -c "
import sys; sys.path.insert(0,'.')
from dydx_mcp import server as s
import json; print(json.dumps(s.market_digest(), indent=1, default=str)[:800])"
Full-blown connections (stdio / Claude Desktop, Codex, Cursor configs):
examples/ in the repo.
Important data caveats
Read references/data-gotchas.md (5 documented indexer-API gotchas:
candle ordering, netTransfers, priceChange24H, subticksPerTick, no
liquidation feed). Rule of thumb: funding without an OI ≥ $100k filter
is noise.
Where to look next
- Reports:
reports/ (monthly data-quality watchdog, digests)
1---2name: dydx-gateway3description: Use when the user asks about anything dYdX — markets, prices, funding, OI, volumes, perps — or mentions a perp trader address to vet (equity, PnL curve, day-winrate, maxDD, farmer flag), funding/OI anomalies, liquidation cascades, leaderboards, or wants TA and ATR-based stop plans. Provides dYdX v4 perps analytics via a local read-only MCP gateway: market data, funding heatmap, verified trader PnL, leaderboards, OI and liquidation-cascade anomaly detection.4---56# dYdX Agent Gateway (local MCP server)78The gateway is deployed on this host, endpoint **http://127.0.0.1:8901/mcp**9(streamable HTTP, systemd unit `dydx-mcp.service`; check with10`systemctl is-active dydx-mcp`). The code lives at the repository root11of https://github.com/alekskram/dydx-agent-gateway12(the skill's source is `.agents/skills/dydx-gateway/`; after edits,13copy it to `~/.zcode/skills/dydx-gateway/`). If the gateway is not14running, start it per the repo README Install section15(`uvx --from git+https://github.com/alekskram/dydx-agent-gateway16dydx-agent-gateway --http --port 8901`).1718Background data: the block scanner (`dydx-scanner`, the address registry19keeps growing), detectors every 5 min (`dydx-detectors.timer`),20leaderboard every 6 h (`dydx-leaderboard.timer`), watchdog report on the211st of each month.2223## MCP tools (22)2425Data: `list_markets`, `market_detail`, `candles`, `recent_trades`, `height`26· Analytics: `funding_heatmap(min_oi_usd)`, `historical_funding(limit≤500)`,27`market_ta`, `suggest_stops`, `trader_profile`,28`trader_pnl_stats(limit≤5000)`, `fills_review`, `raw_fills(limit≤200)`,29`cvd(trades_limit)`, `correlation(ticker_a, ticker_b)`30· Discovery: `market_digest` (one-call briefing — start here),31`leaderboard`, `discover_traders`, `list_traders`, `registry_stats`,32`latest_events`, `usage_stats`3334## Quick path without an MCP client3536```bash37cd <repo root> && python -c "38import sys; sys.path.insert(0,'.')39from dydx_mcp import server as s40import json; print(json.dumps(s.market_digest(), indent=1, default=str)[:800])"41```4243Full-blown connections (stdio / Claude Desktop, Codex, Cursor configs):44`examples/` in the repo.4546## Important data caveats4748Read `references/data-gotchas.md` (5 documented indexer-API gotchas:49candle ordering, netTransfers, priceChange24H, subticksPerTick, no50liquidation feed). Rule of thumb: funding without an OI ≥ $100k filter51is noise.5253## Where to look next5455- Reports: `reports/` (monthly data-quality watchdog, digests)