POST /onchain-x402/address is the cheap reputation primitive: hand it any Base address and get back its full x402 footprint — total payments sent and received, USDC volume, recent activity in each direction, and (if the address is a facilitator) facilitator-level metadata. Pulled live from the decentralized x402 Base subgraph on The Graph Network, so the answer is verifiable, not vendor-derived.
What you get
| Endpoint | Cost | Returns |
|---|---|---|
POST /onchain-x402/address | $0.01 | { as_recipient, as_payer, facilitator, recent_received[10], recent_sent[10], is_in_index, indexed_through_block } |
Why derived over raw
You can read the same subgraph directly via the Graph gateway, but it would take three GraphQL queries plus a_meta call to assemble what this endpoint returns in one shot — and you still wouldn’t get the is_in_index boolean or the freshness indicators baked in. For agents using x402 footprint as a counterparty signal (“has this address ever been paid for anything?”, “is the wallet I’m about to interact with a known facilitator?”) this collapses the lookup into a single decision-grade call.
Request body
Response shape
Decision-grade fields
| Field | What an agent does with it |
|---|---|
is_in_index | Boolean gate. false means this address has never sent or received an x402 payment — useful as an “unknown counterparty” flag. |
as_recipient.totalPayments | Throughput score. Weight rankings or surface “paid agent vs untested” tiers. |
as_recipient.totalVolumeDecimal | Trust signal. Higher cumulative USDC received → more economic skin. |
facilitator | If non-null, the address is a known x402 facilitator (CDP, etc.). Different treatment than a regular recipient. |
indexed_through_block | Freshness audit. If your decision needs recent activity, check this against current Base tip (gap = indexer lag). |
indexer_has_errors | Don’t trust the row counts if true. |
Sample: reputation gate
as_recipient && as_recipient.totalPayments > 5 → “this address has been paid for things, treat as a real agent.”
Sample: facilitator detection
facilitator is non-null, the address routes settlements for other agents. Use this to skip rep-scoring (facilitators always pass) or to apply distinct trust rules.
Errors
| Code | Meaning | Action |
|---|---|---|
400 invalid_address | Body missing or malformed address. | Send { "address": "0x…" }. |
503 service_unconfigured | Server lacks GRAPH_API_KEY. | Operator issue, not caller. |
504 upstream_timeout | Graph gateway didn’t respond in 20s. | Retry per retry_after_seconds. |
502 upstream_unavailable | Graph gateway returned an error. | Retry per retry_after_seconds. |
Why on-chain over a centralized DB
The data is the same as what powers/ask, but the read path is different. /ask reads a Cloudflare R2 parquet snapshot — cheap, fast, indexed by Graph Advocate. /onchain-x402/address reads the canonical Graph Network subgraph deployment Cb56epg3EvQ6JRpPfknbkM54QxpzTvLa7mwKNQQfUyoj directly. If your agent needs decentralization-grade verifiability for the answer (a counterparty check, an attestation, a reputation claim it will later defend), this is the right endpoint. If it just needs the number, /ask is cheaper for aggregate questions.
Free tier
There is no free tier for/onchain-x402/address. To inspect routing without paying, send the plain-English question to POST / (A2A JSON-RPC) and Graph Advocate will name this endpoint and hand back the exact paid curl, without charging.