AI agents can't use API keys. They can't sign up for accounts, pass KYC, or enter credit card numbers. But they can hold a crypto wallet — and with the x402 protocol, that's all they need to pay for an API call.
I built LatAm P2P Data: a paid API that sells real-time P2P order book data for USDT across 15 Latin American currencies. Agents pay $0.002 USDC per call on Base. No API keys, no accounts, no signup. The payment IS the auth.
Live: https://latamp2papi.dpdns.org
Why this data?
In Latin America, the P2P market IS the financial system. In Argentina, Venezuela, Nicaragua and most of the region, Binance P2P is how people actually move between local currency and dollars. The USDT/NIO or USDT/ARS rate is the real exchange rate — not the official one.
That data is valuable to trading agents, remittance tools, and market research bots. And nobody was selling it machine-to-machine. So I did.
How it works
The x402 protocol revives HTTP status code 402 Payment Required:
- Agent calls
GET /p2p/nio - Server responds
402with payment requirements (price, token, network, recipient) - Agent signs a USDC payment authorization (EIP-3009, gasless)
- Agent retries with the
X-PAYMENTheader - The Coinbase CDP facilitator verifies and settles on-chain (~2 seconds)
- Agent gets the data
Total human involvement: zero.
What a call returns
GET /p2p/nio — $0.002 USDC:
json
{
"par": "USDT/NIO",
"fuente": "Binance P2P",
"mejor_venta_usdt": 36.42,
"mejor_compra_usdt": 37.10,
"spread": 0.68,
"profundidad_anuncios": {"compra_usdt": 10, "venta_usdt": 10},
"compra_usdt": [
{
"precio_nio": 36.42,
"min_nio": 500,
"max_nio": 50000,
"disponible_usdt": 1372.5,
"bancos": ["BAC", "Banpro", "Lafise"],
"comerciante": "CryptoNica",
"ordenes_mes": 421,
"tasa_completado": 0.98
}
]
}
Best buy/sell prices, spread, market depth, payment methods (local banks), and merchant reputation — for each of 15 currencies:
NIO · GTQ · HNL · CRC · PAB · DOP · MXN · COP · PEN · ARS · BOB · PYG · UYU · CLP · VES
There's also GET /p2p/latam ($0.01) that returns a regional summary of all 15 in one call.
The stack
- FastAPI + the official Python x402 SDK (PaymentMiddlewareASGI)
- Coinbase CDP facilitator for verification/settlement (accepts Base mainnet AND Base Sepolia for testing)
- Cloudflare Tunnel for a permanent public URL
- Binance P2P public API upstream, cached 60s per currency
The paid-route config is basically:
routes["GET /p2p/nio"] = RouteConfig(
accepts=[
PaymentOption(scheme="exact", pay_to=WALLET, price="$0.002", network="eip155:8453"),
PaymentOption(scheme="exact", pay_to=WALLET, price="$0.002", network="eip155:84532"),
],
mime_type="application/json",
description="USDT/NIO P2P order book: best prices, spread, banks, depth",
)
One lesson: agent discovery directories don't understand path parameters. My first version used /p2p/{fiat} and x402scan rejected it with a 405. Explicit routes (/p2p/nio, /p2p/mxn, ...) with declared query-param input schemas fixed everything.
Try it
- Base URL: https://latamp2papi.dpdns.org
- OpenAPI: https://latamp2papi.dpdns.org/openapi.json
- Listing: find "LatAm P2P Data" on x402scan
- Testnet works: point your buyer at Base Sepolia (eip155:84532) with faucet USDC and you can test the full paid flow for free
If you're building a trading/remittance/research agent that touches Latin America, this is the missing data feed. And if you're building your own x402 API — do it. The whole thing took an afternoon, and the agent economy needs more than weather APIs.
Top comments (0)