x402 Payments
x402 Payments
Section titled “x402 Payments”Cerebrus Pulse uses the x402 protocol for payments — an open standard for HTTP-native micropayments built on the 402 Payment Required status code.
How It Works
Section titled “How It Works”Client (x402 v2 SDK) Pulse Gateway Facilitator (Coinbase CDP) | | | | GET /pulse/BTC | | |----------------------------------->| | | 402 Payment Required | | | PAYMENT-REQUIRED: terms | | | (price, Base + Solana, payTo) | | |<-----------------------------------| | | | | | Sign a USDC payment authorization | | | (nothing is sent on-chain yet) | | | | | | GET /pulse/BTC | | | PAYMENT-SIGNATURE: signed payload | | |----------------------------------->| verify | | |------------------------------------>| | |<------------------------------------| | | run the analysis, then settle | | |------------------------------------>| submits the | |<------------------------------------| USDC transfer | 200 OK + analysis data | | | PAYMENT-RESPONSE: receipt | | |<-----------------------------------| |An x402 v2 client handles everything after the first request: it reads the terms from the base64
PAYMENT-REQUIRED header, signs, and retries with PAYMENT-SIGNATURE. The gateway settles only after it has
an answer; a request refused with a 4xx or failing with a 5xx is not charged. From your side it is a normal
HTTP request that costs $0.01–$0.06. The 402 offers both Base and Solana; the SDK pays on a network you
registered.
The 402 JSON body repeats the Base terms in the older x402 v1 shape for crawlers and directories. It is
informational: v1 clients, which pay with an X-PAYMENT header, are not accepted.
Supported Networks
Section titled “Supported Networks”Cerebrus Pulse accepts USDC payments on two chains. The 402 response includes payment options for both — your x402 SDK picks the right one based on your wallet.
| Property | Base (EVM) | Solana |
|---|---|---|
| Network ID | eip155:8453 | solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp |
| Currency | USDC | USDC |
| USDC Address | 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
| Scheme | Exact EVM | Exact SVM |
| Facilitator | Coinbase CDP | Coinbase CDP |
| Payer gas | None: you sign an EIP-3009 authorization and the facilitator submits it | None: the facilitator is the fee payer |
Payment Details by Endpoint
Section titled “Payment Details by Endpoint”| Endpoint | Price | Description |
|---|---|---|
/screener | $0.06 USDC | Market-wide scan of 50+ coins |
/bundle/{coin} | $0.05 USDC | /pulse, 24h /funding and /sentiment in one request |
/correlation | $0.05 USDC | BTC-alt correlation matrix |
/liquidations/{coin} | $0.03 USDC | Liquidation heatmap by leverage tier |
/pulse/{coin} | $0.025 USDC | Multi-timeframe technical analysis |
/arb | $0.02 USDC | Market Stress Index |
/basis/{coin} | $0.02 USDC | Hyperliquid vs Chainlink basis |
/cex-dex/{token} | $0.02 USDC | CEX-DEX price divergence |
/oi/{coin} | $0.015 USDC | Open interest analysis |
/spread/{coin} | $0.015 USDC | Spread & liquidity analysis |
/depeg | $0.01 USDC | USDC collateral health monitor |
/funding/{coin} | $0.01 USDC | Funding rate analysis |
/sentiment | $0.01 USDC | Market sentiment labels |
/health | Free | Gateway status |
/coins | Free | List available coins |
Why x402?
Section titled “Why x402?”- No API keys — Your wallet address is your identity. No registration, no accounts.
- No subscriptions — Pay only for what you use. One query = one micropayment.
- Instant settlement — Payments settle on Base (fast, cheap L2) or Solana (sub-second finality).
- Open standard — x402 is an open protocol. Any x402-compatible client works.
- Transparent pricing — The 402 response includes exact payment details before you pay.
Wallet Requirements
Section titled “Wallet Requirements”You need a wallet with USDC on either chain, and nothing else: no ETH and no SOL. The payer only signs; the facilitator submits the transfer and pays its network fee. Use a dedicated wallet holding a few dollars of USDC, not a main wallet.
There is no card or account-based way to pay: every paid call needs a USDC wallet. The free
/demo/{coin} endpoint needs none.
Option A: Base (EVM)
Section titled “Option A: Base (EVM)”- USDC on Base: each call costs $0.01–$0.06
- No ETH needed: the Base payment is an EIP-3009
transferWithAuthorizationthat you sign off-chain and the facilitator submits
Getting USDC on Base:
- Bridge from Ethereum mainnet via the Base Bridge
- Purchase directly on exchanges that support Base withdrawals (Coinbase, Binance)
- Use a cross-chain bridge (Across, Stargate)
Option B: Solana
Section titled “Option B: Solana”- USDC on Solana — Same pricing, same endpoints
- No SOL needed: the CDP facilitator is the fee payer for the transaction
Getting USDC on Solana:
- Purchase directly on exchanges that support Solana withdrawals (Coinbase, Phantom, Jupiter)
- Swap on Jupiter or Raydium
SDK Options
Section titled “SDK Options”Python
Section titled “Python”pip install "x402[evm]" httpx eth-account # For Basepip install "x402[svm]" "solana>=0.36,<0.37" "solders>=0.27,<0.28" httpx # For SolanaThe Solana pins are needed: solana 0.40 removed a module x402’s Solana signer imports. See the Python SDK Guide for full integration details.
TypeScript / Node.js
Section titled “TypeScript / Node.js”npm install @x402/fetch @x402/evm viem # For Basenpm install @x402/fetch @x402/svm @solana/kit @scure/base # For SolanaThese are the x402 v2 packages. The older x402-fetch 1.x pays with an X-PAYMENT header, which this
API does not accept.
See the TypeScript SDK Guide for full integration details.
Budget Controls
Section titled “Budget Controls”Both official x402 clients refuse a payment above a per-payment cap, which defaults to $1. Set it lower:
// TypeScript (@x402/fetch)wrapFetchWithPaymentFromConfig(fetch, { schemes, spendControls: { maxAmountPerPayment: "$0.10" } });# Python (x402)x402.set_spend_controls({"max_amount_per_payment": "$0.10"})Each call costs $0.01–$0.06; set the cap just above the most expensive endpoint you call.
Security
Section titled “Security”- Payments use EVM or SVM signatures — your private key never leaves your machine
- The x402 facilitator (Coinbase CDP) verifies payments on-chain for both Base and Solana
- Pulse never sees your private key — only the signed payment proof
- All paid endpoints are rate-limited to prevent abuse
- The payer never needs gas: no ETH on Base, no SOL on Solana
Related
Section titled “Related”- Quickstart — End-to-end first API call in 5 minutes
- Python SDK Guide — Full Python integration with async patterns
- TypeScript SDK Guide — Full TypeScript/Node.js integration
- Rate Limits — Request limits and throttling behavior