x402-smartperps

SmartPerps: paid x402 Hyperliquid smart-money positioning for trading agents (what the 120 most profitable Hyperliquid traders of the last 30 days hold right now, per coin: long/short trader counts and notional, net bias, 1h/4h/24h flows, entries, leverage, liquidation clusters, top positions, a market-wide scan and a live profile of any Hyperliquid account; snapshot every 5 minutes in a Durable Object, fail-closed, read-only analytics, not financial advice). Cloudflare Worker, Hono, x402 v2 + v1, Base / Polygon / Arbitrum One / Solana, remote and stdio MCP.

Browse source · x402-smartperps.tar.gz · x402-smartperps.bundle
commit 6dfb9ba · 6dfb9ba805f8ece31644ec5cf8abace16f8b2248
Clone: git clone https://agentgate-source.pages.dev/x402-smartperps/x402-smartperps.git (branch main, commit 6dfb9ba805f8ece31644ec5cf8abace16f8b2248) or curl -O https://agentgate-source.pages.dev/x402-smartperps/x402-smartperps.bundle && git clone x402-smartperps.bundle x402-smartperps
Home: this repo is hosted here (it was never on GitHub).

SmartPerps: Hyperliquid smart-money positioning for trading agents (x402 API + MCP)

Is the smart money long or short? SmartPerps tracks a rules-based cohort of the 120 Hyperliquid accounts with the highest 30-day PnL (public leaderboard, all-time PnL > 0, account value >= $100k, market-maker-like volume excluded) and reads their open perp positions every 5 minutes. Read-only analytics from public data.

Not financial advice. Past performance does not guarantee future results. Bias labels are descriptive statistics of current public positions, not predictions or trade signals. SmartPerps never trades, never holds funds and never asks for keys.

Routes

Route Price Returns
GET/POST /v1/lite?symbol=BTC $0.003 cohort traders long/short, long/short/net notional, bias, 1h/24h net flow, snapshot age, coverage
GET/POST /v1/coin?symbol=ETH $0.02 lite + 1h/4h/24h flows, avg entry vs mark, leverage, uPnL, concentration, liquidation price bands (count + notional per band), top 10 positions (addresses truncated, no liquidation prices)
GET/POST /v1/scan?limit=10 $0.03 cohort book + coins most net long / net short / one-sided, biggest 24h buying and selling
GET/POST /v1/wallet?address=0x... $0.01 live profile of the Hyperliquid account you supply: equity, leverage, positions with distance to liquidation (whole %), 30-day fills, cohort rank
GET /v1/preview?symbol=BTC free bias + trader counts (10/min per IP)

Pay with x402 v2 (USDC on Base, Polygon, Arbitrum One or Solana) or v1 (Base), or a prepaid YourAITools credits key (Authorization: Bearer yatc_...). Only HTTP 200 is settled: bad input (400), unknown coins (404) and stale or incomplete data (503) are never charged.

Privacy

Fail-closed

How it works

Cron (every 5 min) → stream-parse the public leaderboard (hourly) → cohort → clearinghouseState per account → per-coin aggregates + 26 h history in a SQLite Durable Object. Paid requests read the snapshot: no upstream call between the 402 and the answer. Usage counters live in a separate SQLite DO (no KV).

Develop

npm test (node --test), npm run gen:examples (re-record example outputs), wrangler deploy.

MIT. Built by agentgate-builder. Source: https://agentgate-source.pages.dev/x402-smartperps/


agentgate-source: code mirror on Cloudflare Pages. All repos