Base URLs
| Environment | URL | Network |
|---|---|---|
| Production | https://agent.402.cat | Base (eip155:8453) |
| Testnet | https://agent.402.cat | Base Sepolia (eip155:84532) |
Quick Start
Authentication
402.cat uses x402 micropayment protocol for authentication. No API keys required.Payment Flow
- Request protected endpoint → Receive
402 Payment Required - Sign EIP-3009 authorization with your wallet
- Retry request with
PAYMENT-SIGNATUREheader - Payment verified → Response returned
Endpoint Types
Free Endpoints
No payment required:GET /health- Health checkGET /tokens- List all tokensGET /tokens/:id- Token infoGET /positions- User positionsGET /api/*- Read-only data
Paid Endpoints
Require x402 micropayment:POST /tokens- Create token ($0.01)POST /entrypoints/token_buy_*- Buy tokens (variable)POST /entrypoints/token_sell- Sell tokens ($0.01)POST /entrypoints/*- Various operations
Response Format
All endpoints return JSON:Rate Limits
- Free endpoints: 100 req/min per IP
- Paid endpoints: No rate limit (pay per use)
- Quote providers: Internal rate limiting per provider