x402: Pay-per-Request for Agents
Buy Arkham API responses one request at a time with USDC — no account, no API key, no subscription. Built for AI agents that need blockchain intelligence on demand, priced by the same credit weights as the classic API.
Base URL: https://api.arkm.com/x402 — agent instructions at /skill.md, machine-readable catalog with prices at /openapi.json, full API docs for agents at arkm.com/llms-full.txt
How It Works
Every endpoint speaks the x402 protocol (v2): an unauthenticated request returns HTTP 402 Payment Required with a signed price quote, the client pays in USDC on Base or Solana, and the same request succeeds.
- Request —
POSTthe endpoint with a JSON body (all parameters, including path parameters, go in the body). - Quote — the response is
402with aPAYMENT-REQUIREDheader: a base64 JSON challenge carrying the price, the receiving address, and the exact resource URL. - Pay — the client signs the payment for whichever network it picked from the challenge: an EIP-3009 USDC transfer authorization on Base, or a USDC payment transaction on Solana. No gas needed on your side; the facilitator broadcasts and pays gas.
- Response — the request is retried with the payment header, Arkham serves the data, and settlement happens on-chain only after a successful response.
Any x402-compatible client handles steps 2–4 automatically (the @x402/* SDKs among others); your agent code just makes HTTP calls with a funded wallet.
Try It
Inspect a price quote without paying — request any endpoint and decode the challenge:
curl -s -X POST https://api.arkm.com/x402/balances/address \
-H "Content-Type: application/json" \
-d '{"address": "0x28C6c06298d514Db089934071355E5743bf21d60"}' \
-D - -o /dev/null | tr -d '\r' | grep -i payment-required | cut -d' ' -f2 | base64 -dThe decoded challenge lists every accepted network (eip155:8453 — Base mainnet, solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp — Solana mainnet), each with its USDC asset address, the amount, and the payTo treasury address.
Pricing
Prices use the classic API's credit weights at $0.20 per credit. A subscription prices credits differently: its tier includes a set number each month and bills any beyond that at the tier's overage rate.
limit you request (default 20 if omitted), whether or not that many rows come backFor per-row endpoints, pass the smallest limit that covers what you need: you pay for the limit you request, not the rows returned.
Per-endpoint prices are published in the catalog: every operation in /openapi.json carries an x-payment-info block, and /skill.md lists them in a table.
Free Discovery Endpoints
Three endpoints cost nothing so agents can orient before spending: chains, networks/status, and arkm/circulating. Instead of payment they ask for a Sign-In-With-X wallet signature (the 402 carries a sign-in-with-x challenge; sign it to prove wallet ownership — no funds move).
Rate Limits
Enforced per paying wallet, per endpoint: 100 requests/second by default, 5 requests/second on heavy endpoints (transfers, swaps, flow, counterparties, intelligence search, token leaderboards). The full list is in /skill.md.
Differences from the Classic API
| Classic API | x402 | |
|---|---|---|
| Auth | API key header | none — payment is the auth |
| Method | mostly GET | always POST, parameters in the JSON body |
| Billing | monthly credits | USDC per request, settled on-chain |
| Coverage | full API | public read catalog (~90 endpoints) |
Response schemas are identical — data comes from the same API.
When to Use Which
Use x402 for autonomous agents, one-off lookups, and integrations where provisioning an API key is impractical. Use the classic API for sustained volume — a subscription with monthly credits is cheaper at scale and covers endpoints outside the public read catalog.