byte_buy_data
Purchase a single data packet from any PayPerByte feed with USDC payment. No subscription needed; each request settles on-chain via x402 gateway.
Instructions
Buy a single data packet from any PayPerByte feed via the x402 payment gateway. No subscription, no allowance, no prior on-chain setup — pay-per-call USDC settlement. The MCP server signs an EIP-3009 transferWithAuthorization on behalf of the wallet whose PRIVATE_KEY is configured, the x402 facilitator submits the tx, and the data comes back inline with the on-chain settlement tx hash. Use byte_subscribe instead if you want a continuous stream of broadcasts from a publisher. The catalog of available feed slugs lives at https://x402.payperbyte.io/feeds (free GET). GET data feeds (weather, earthquakes, …) need only feed; the 9 POST oracles — address-reputation, sanctions-screen, pkg-verdict, reasoning-verdict, evidence-pack, liquidation-stream, positioning-snapshot, runtime-eol, threat-intel — additionally require a JSON body (the query) — supplying body switches this call to POST. Requires PRIVATE_KEY env var on the MCP server and USDC on the configured wallet. NOTE: paid feeds settle REAL USDC on Base mainnet (eip155:8453) — the exact price is quoted in the 402 challenge (flagship address-reputation: $0.10/verdict). Use a dedicated wallet holding only what you intend to spend.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Optional JSON query body for POST oracles. Supplying it switches the call from GET to POST. Required by the verdict oracles, e.g. address-reputation {domain,address[,amount,chain]}, sanctions-screen {address|name}, pkg-verdict {ecosystem,package[,version]}, reasoning-verdict {subject}. Omit for GET data feeds (weather, earthquakes, …). | |
| feed | Yes | Feed slug — one of: weather ($0.0050), earthquakes ($0.0030), runtime-eol ($0.020), threat-intel ($0.050), evidence-pack ($0.100), address-reputation ($0.100), pkg-verdict ($0.100), sanctions-screen ($0.100), reasoning-verdict ($0.100), liquidation-stream ($0.030), positioning-snapshot ($0.030). Full catalog: https://x402.payperbyte.io/feeds (free GET). (For fact-oracle Q&A use byte_query_fact instead — it uses a different request-response flow.) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Decoded feed payload returned by the publisher | |
| feed | No | Echoed feed slug | |
| paid | No | True if an x402 payment was made (false on free/cached feeds) | |
| error | No | Error message if the buy failed | |
| payer | No | Wallet that signed the EIP-3009 authorization | |
| price | No | USDC paid for this packet (e.g. '$0.003000'); omitted on free feeds | |
| detail | No | Additional error detail, if any | |
| status | No | HTTP status of the (post-payment) gateway response | |
| txHash | No | x402 settlement transaction hash | |
| verification | No | Two-leg verify-before-act result: {gatewayVerified, hashMatch, signerMatch, recovered, attester, embeddedAttestation, reason, note}. gatewayVerified=true means the GATEWAY delivered these exact bytes (signed by the pinned gateway attester) — it does NOT verify the per-feed publisher's embedded attestation (answer.attestation). When embeddedAttestation==='present', verify that leg before trusting the data (see note). |