Prerequisites
- A wallet on any of 11 supported EVM chains (Ethereum, Base, Arbitrum, Optimism, etc.)
- USDC deposited via Circle Gateway
x402-fetch(Node) orx402-requests(Python) installed
TypeScript example
wrapFetchWithPayment automatically signs, retries, and returns the data.
Python example
Cost math
How much will it actually cost?| Use case | Calls / month | Tier | Cost |
|---|---|---|---|
| Daily funding-rate snapshot | 30 | $0.008 | $0.24 |
| Hourly funding-rate for 10 pairs | 7,200 | $0.008 | $57.60 |
| Crypto screener every 5 min | 8,640 | $0.03 | $259.20 |
Troubleshooting
`Insufficient USDC balance`
`Insufficient USDC balance`
Top up via Circle Gateway. The error response includes the exact amount needed.
`Unsupported chain`
`Unsupported chain`
Nanopayment supports 11 EVM chains. Check your wallet client is on Base, Ethereum, Arbitrum, Optimism, Polygon, or another supported chain.
`Signature invalid`
`Signature invalid`
Make sure your wallet client uses the same account that holds the USDC. EIP-3009 requires the signer == token holder.

