Chain data for AI agents, paid per call.
No API key, no signup. Every endpoint answers HTTP 402 with an x402 payment request; any x402 client pays in USDC on Base and retries. Bad input returns 400 and you are not charged.
Connect
- Base URL
https://plainchain.appin60.com- Prices
- $0.001042 to $0.009942 per call, in USDC
- Discovery
- llms.txt · OpenAPI · /.well-known/x402 · live payment stats (every settlement with its Basescan link)
- Errors
- 400 before payment, never charged
$ curl -i "https://plainchain.appin60.com/v1/gas?chain=base"
HTTP/2 402
payment-required: eyJ4NDAyVmVyc2lvbiI6Miwi…
Plainchain is an HTTP API for AI agents and the developers who build them. There is no web app for people.
Call it
Any x402 client works
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register("eip155:8453", new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)));
const pay = wrapFetchWithPayment(fetch, client);
const r = await pay("https://plainchain.appin60.com/v1/address?chain=base&address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913");
console.log(await r.json());
Agents with an AgentCash or other x402 wallet can call the URLs directly.
Endpoints
16 endpoints in 5 groups, $0.001042 to $0.009942 per call in USDC
Gas, blocks and prices
What a transaction costs right now, the chain head and USD spot prices.
| Endpoint | What it returns | Price (USDC) |
|---|---|---|
| GET/v1/gas | Current gas price on Base, Arbitrum, Ethereum or Optimism, with the USD cost right now of an ETH transfer, ERC-20 transfer, DEX swap and NFT mint. Use before sending a transaction to pick a chain or decide whether to wait.Example: /v1/gas?chain=base | $0.001042 |
| GET/v1/block | Latest block on Base, Arbitrum, Ethereum or Optimism: number, hash, timestamp, age in seconds, base fee, gas used and transaction count. Use to check chain liveness or get a fresh block reference.Example: /v1/block?chain=base | $0.001042 |
| GET/v1/price | USD spot price for up to 10 crypto symbols in one call (ETH, BTC, SOL, USDC, ARB, OP and any symbol listed on Coinbase). Use to value balances or convert amounts.Example: /v1/price?symbols=ETH%2CBTC | $0.001042 |
Wallets and tokens
Balances, token facts, what an address is and what it has approved.
| Endpoint | What it returns | Price (USDC) |
|---|---|---|
| GET/v1/balances | Wallet balances with USD values on Base, Arbitrum, Ethereum or Optimism: native ETH plus USDC, USDT, WETH and the chain's major tokens, plus up to 10 extra token addresses you pass. Returns a USD total. Use before paying, bridging or reporting a portfolio.Example: /v1/balances?chain=base&address=0xB442daCAE60C07bb5dB8f33C8a6c1572d8F24e83 | $0.001942 |
| GET/v1/token | ERC-20 token lookup on Base, Arbitrum, Ethereum or Optimism: name, symbol, decimals, total supply, plus DEX market data (USD price, liquidity across pairs, 24h volume, 24h price change, FDV, oldest pair age). Use before buying, accepting or pricing an unfamiliar token.Example: /v1/token?chain=base&address=0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed | $0.001942 |
| GET/v1/address | What is this address? Classifies any address on Base, Arbitrum, Ethereum or Optimism as a plain wallet (EOA), EIP-7702 delegated wallet, Safe multisig (owners and threshold), upgradeable proxy (implementation and admin), ERC-20 token or other contract, with owner(), nonce and ETH balance. Use before sending funds to or trusting an address.Example: /v1/address?chain=base&address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | $0.001942 |
| GET/v1/allowance | ERC-20 approval check on Base, Arbitrum, Ethereum or Optimism: how much a spender may move from an owner's balance, flagged if unlimited. Use before trading, or when auditing a wallet's open approvals.Example: /v1/allowance?chain=base&owner=0xB442daCAE60C07bb5dB8f33C8a6c1572d8F24e83&token=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&spender=0x000000000022D473030F116dDEE9F6B43aC78BA3 | $0.001042 |
Transactions and receipts
Did it go through, what moved, and was an x402 payment really made.
| Endpoint | What it returns | Price (USDC) |
|---|---|---|
| GET/v1/tx | Transaction status and plain-English details on Base, Arbitrum, Ethereum or Optimism: success or reverted, confirmations, fee in ETH and USD, and every ERC-20 transfer decoded with symbols and amounts. Use to confirm a transfer, swap or payment landed.Example: /v1/tx?chain=base&hash=0x6863ff402c188f6d652c300cf815cdfdf96553a89dfe8457e1099ffc9199582d | $0.002942 |
| GET/v1/x402/receipt | Verify an x402 or USDC payment on-chain from its transaction hash: payer, recipient, amount and token, whether it was an EIP-3009 transferWithAuthorization (x402 exact scheme), the settling facilitator, confirmations, and optional match checks against an expected payTo and minimum amount. Use to prove a payment before delivering, or to audit receipts.Example: /v1/x402/receipt?chain=base&hash=0x6863ff402c188f6d652c300cf815cdfdf96553a89dfe8457e1099ffc9199582d&payTo=0x36c37d1b47737ba2b2a2cf1b5bc38509516b222f&amount=0.01 | $0.002942 |
Tools for x402 builders
Find paid APIs, check your listing, register your origin and debug your client.
| Endpoint | What it returns | Price (USDC) |
|---|---|---|
| GET/v1/bazaar/search | Find x402 APIs that agents actually pay for: keyword search over the whole Coinbase x402 Bazaar (31,000+ paid endpoints), ranked by distinct paying wallets in the last 30 days. Filter by max price and network. Returns URL, method, price, 30-day payers and calls, last paid call. Use to pick a proven seller before spending.Example: /v1/bazaar/search?q=gas+price+base&max_price=0.01 | $0.001942 |
| GET/v1/bazaar/host | Is my x402 API in the Coinbase Bazaar? Give a hostname; get every Bazaar entry for it with price, 30-day distinct payers and calls, and last paid call, or a hint on why it is missing. For x402 sellers checking discovery without crawling 31,000 listings.Example: /v1/bazaar/host?host=api.onesource.io | $0.001042 |
| POST/v1/x402scan/register | Register your x402 origin on x402scan in one paid call, without SIWX code or a GitHub issue. POST {"origin": "https://your-api.example"}; returns x402scan's own result (registered, failed, skipped, reasons). Charged only if at least one resource registers; failures return 4xx and are not charged.Example body: {"origin":"https://plainchain.appin60.com"} | $0.009942 |
| GET/v1/x402/echo | Debug your x402 client on Base mainnet for $0.001: returns the payment payload your client actually signed and sent, decoded: version, header used, scheme, amount, validity window, and whether it echoed extensions.bazaar (needed for Bazaar cataloging) and resource/accepted.Example: /v1/x402/echo | $0.001042 |
Randomness and fun
Verifiable randomness from the latest Base block, and two small treats.
| Endpoint | What it returns | Price (USDC) |
|---|---|---|
| GET/v1/random | Verifiable random coin flip, dice roll and integer from the latest Base block hash (optionally salted), with the formula to recompute it. Use for fair picks, giveaways, tie-breaks and games where anyone must be able to check the result.Example: /v1/random?sides=6&max=100 | $0.001042 |
| GET/v1/fortune | A crypto fortune cookie: one short line of on-chain wisdom, picked by the latest Base block hash so anyone can verify the draw. For agent greetings, daily posts, games and demos of x402 payments.Example: /v1/fortune | $0.001042 |
| GET/v1/fact | A random crypto history fact (Bitcoin genesis, Pizza Day, The Merge, EIP-1559, x402 and HTTP 402, USDC, Base...), picked by the latest Base block hash. For agent small talk, trivia, daily posts and testing an x402 client cheaply.Example: /v1/fact | $0.001042 |
Payment
Settled on-chain before data is returned
- Protocol
- x402 v2, scheme
exact. A request withoutPAYMENT-SIGNATUREgets 402 with aPAYMENT-REQUIREDheader. - Network
- Base eip155:8453
- Facilitator
- Coinbase CDP
- Receiving address
0xB442daCAE60C07bb5dB8f33C8a6c1572d8F24e83- Receipts
- Every price ends in ...42 atomic units (1042, 1942, 2942 or 9942) so Plainchain receipts are identifiable on-chain.
Notes
- Data comes from public RPC nodes, Coinbase spot prices and DexScreener at request time. Gas estimates on L2s exclude the L1 data fee.
/v1/randomis public and verifiable, not secret. Do not use it where a block producer could profit by manipulating it.- Nothing here is financial advice. Contact: [email protected]