Pay per request (x402)
No account, no API key: pay for each request in USDC on Base
Every data endpoint also answers at /x402/v1/..., for agents that pay with x402 instead of an API key. Ask for the data, get a 402 Payment Required with the price, pay it and ask again. A paid request reads the full history (from 2019-01-01, daily and weekly), the same data as the Pro plan.
Price
$0.001 per credit, at least $0.01, rounded up to a whole cent. A request costs the credits the same call costs with an API key (see what each call costs), at ten times the plan rate: plans and credit packs are $0.0001 a credit. For steady use a plan is ten times cheaper.
- Quoted before it runs. The price is worked out from the request as asked: its
limit, date range or fields. A response may hold fewer rows; you pay the quote, never more. - Only success is charged. The payment is settled only when the endpoint answers
2xx. A4xxor5xxanswer takes nothing. - At most $5.00 a request. A larger request answers
400 price_too_high: split it into shorter date ranges, fewer tickers or fields, or a smallerlimit. - Pages. Each page is its own paid request, priced from its own
limit. History is priced as a whole on its first page (itsdry_runprice); its later pages cost the minimum and only work for the wallet that paid for the first.
How it works
- Ask. Call the endpoint at
https://api.tickerdb.com/x402/v1/...with the same parameters as/v1. Without a payment you get402: the terms are in thePAYMENT-REQUIREDheader (base64 JSON, x402 version 2) and in the body, which also showscredits,price_usdandroute. - Pay. Sign the payment for exactly
amount(USDC base units:10000is $0.01) topayTo, schemeexacton Base (eip155:8453), and send the same request again with the payment in thePAYMENT-SIGNATUREheader (X-PAYMENTworks too). - Get the data. We check the payment, run the request, and settle the payment only if it succeeded. The answer carries the receipt (transaction hash, network) in
PAYMENT-RESPONSEandX-PAYMENT-RESPONSE.
Payments go to our Stripe account and show on your wallet's statement as a USDC transfer on Base.
Routes and quotes
Each route takes the same parameters and returns the same JSON as its /v1 twin. The quote is in credits; the price is credits × $0.001, at least $0.01, rounded up to the cent.
| Route | Same as | Quote (credits) | Typical price |
|---|---|---|---|
/x402/v1/summary/{ticker} | /v1/summary/{ticker} | 1 credit; 2 for band events with cross-asset context (context_ticker) | $0.01, also with context |
/x402/v1/ohlcv/{ticker} | /v1/ohlcv/{ticker} | 1 per 100 bars of limit (default 100), or of the start-end span when shorter | $0.01 up to 1,000 bars |
/x402/v1/search | /v1/search | 1 per 100 rows of limit (default 20, at most 250) | $0.01 |
/x402/v1/universe | /v1/universe | 25 per 10 fields | $0.03 per 10 fields, $0.08 for 30 |
/x402/v1/history (GET or POST) | /v1/history | the dry_run price of the request (later pages: the minimum) | $0.025 per date per 10 fields, rounded up to the cent |
/x402/v1/market | /v1/market | 1 for one date; a range: 1 per 100 rows of limit (default 100), or of the span when shorter | $0.01 |
/x402/v1/diff | /v1/diff | 1 for the newest run; between two dates: 1 per ticker | $0.01; $0.05 for 50 tickers between dates |
/x402/v1/funds | /v1/funds | 1 credit | $0.01 |
/x402/v1/funds/holders | /v1/funds/holders | 1 per 100 rows of limit (default 100) | $0.01 |
/x402/v1/funds/holdings | /v1/funds/holdings | 1 per 100 rows of limit (default 500) | $0.01 |
/x402/v1/indexes | /v1/indexes | 1 credit | $0.01 |
/x402/v1/indexes/members | /v1/indexes/members | 1 per 100 of the index's members on the date | $0.01 (S&P 500), $0.02 (Russell 2000) |
/x402/v1/insiders | /v1/insiders | 1 credit | $0.01 |
/x402/v1/insiders/trades | /v1/insiders/trades | 1 per 100 rows of limit (default 100) | $0.01 |
/x402/v1/insiders/holdings | /v1/insiders/holdings | 1 per 100 rows of limit (default 100) | $0.01 |
/x402/v1/models | /v1/models | 1 credit | $0.01 |
/x402/v1/models/holdings | /v1/models/holdings | 1 per 100 rows of limit (default 250) | $0.01 |
/x402/v1/models/{slug} | /v1/models/{slug} | 1 credit | $0.01 |
/x402/v1/models/{slug}/history | /v1/models/{slug}/history | 1 per 100 rows of limit (default 100) | $0.01 |
/x402/v1/models/{slug}/holdings | /v1/models/{slug}/holdings | 1 credit | $0.01 |
/x402/v1/models/{slug}/trades | /v1/models/{slug}/trades | 1 per 100 rows of limit (default 100) | $0.01 |
/x402/v1/statements | /v1/statements | 1 per 100 rows of tickers x limit (default 8 periods); with since: of limit (default 100) | $0.01; $0.02 for 50 tickers x 40 periods |
/x402/v1/statements/{ticker} | /v1/statements/{ticker} | 1 per 100 periods of limit (default 8, at most 40; revisions counted at 10 versions a period) | $0.01 |
Not offered over x402: /v1/account (needs an account), /v1/watchlist (needs an account), /v1/watchlist/diff (needs an account), /v1/schema/fields (free: no payment needed), /v1/status (free: no payment needed), and the routes that change an account (watchlist add and remove, device login).
Limits
- Per wallet: 250 paid requests per 10 seconds per paying wallet (the Pro plan's per-key limit).
- Per client: 250 requests per 10 seconds per client address, paid or not.
Over a limit you get 429 rate_limit_exceeded with Retry-After: 10; nothing is charged.
Errors
| Status | Meaning | Charged |
|---|---|---|
402 | No payment, or the payment was refused (wrong amount, network or address, a bad signature, or settlement failed). The body's error says why; PAYMENT-REQUIRED has the terms to pay. | No |
400 price_too_high | The quote is above $5.00. Split the request. | No |
4xx, 5xx from the endpoint | The same errors as /v1 (see Errors). The payment is not settled. | No |
429 | Over a limit. Retry after Retry-After seconds. | No |
502 settlement_unknown | We could not confirm the settlement, so no data was sent. If USDC left your wallet for it, contact support@tickerdb.com. | Possibly |
503 facilitator_unavailable | The payment could not be checked. Retry with the same payment. | No |
503 x402_unavailable | Pay-per-request is switched off. Use an API key. | No |