x402.dexpaprika.com serves the DexPaprika REST endpoints for a payment per request, in USDC on Base. There is no API key, account or signup: the endpoint answers your first request with HTTP 402 Payment Required, your client signs a USDC payment, sends the request again, and gets the data.
It is built for AI agents and scripts that hold a wallet and call now and then, and for reaching endpoints that need a paid plan on the REST API, such as token OHLCV, token indicators and pool transactions, without a subscription. If you call DexPaprika every day, a free API key or a plan fits better. To pay on Tempo instead of Base, see MPP.
What you need
- A wallet with USDC on Base. You don’t need ETH for gas: you sign a USDC transfer authorization and the facilitator submits it on chain.
- Node.js 18 or later for the TypeScript example.
Endpoints and price
The paths, parameters and JSON responses are the same as onapi.dexpaprika.com, so every tutorial and the API reference apply. Swap the host and the payment replaces the key.
Paid endpoints
Paid endpoints
GET /networksGET /searchGET /statsGET /pools/searchGET /tokens/searchGET /networks/{network}/dexesGET /networks/{network}/multi/pricesGET /networks/{network}/pools/searchGET /networks/{network}/pools/{pool_address}GET /networks/{network}/pools/{pool_address}/ohlcvGET /networks/{network}/pools/{pool_address}/transactionsGET /networks/{network}/pools/{pool_address}/indicatorsGET /networks/{network}/tokens/searchGET /networks/{network}/tokens/{token_address}GET /networks/{network}/tokens/{token_address}/ohlcvGET /networks/{network}/tokens/{token_address}/indicators
/openapi.json: the OpenAPI spec with a price on every operation/.well-known/x402: the list of paid resources/.well-known/agent-payments: price, asset and network per endpoint
Step 1: read the challenge
Request any paid endpoint without paying. The payment terms come back base64-encoded in thePAYMENT-REQUIRED header:
The same header carries a
resource object with a description of what the endpoint returns, and a bazaar extension with the input and output schema. Agents can use both to decide whether the call is worth paying for.
Step 2: pay from TypeScript
Install the x402 client packages and viem:pay.mjs:
payment-response header on the paid response holds the settlement: transaction is the USDC transfer on Base, which you can look up on BaseScan.
spendControls is the safety net. If an endpoint asks for more than maxAmountPerPayment, the client throws before it signs anything. With the cap set to $0.001, below the price:
Errors you don’t pay for
A request with a bad parameter or for something that doesn’t exist is refused before the payment challenge, so your client never pays for it. A parameter value that isn’t allowed gets400:
404:
bazaar schema of the 402.
Next steps
Pay with MPP on Tempo
The same endpoints, paid with the Machine Payments Protocol on Tempo.
Get an API key
For daily use, a free key in the DexPaprika console, with plans on the pricing page.