Paying per request for market data: x402
Paying per request for market data with x402: how the HTTP 402 handshake works, and which licensing rules still apply when a wallet is the subscriber.
Paying per request for market data means buying one HTTP response at a time: no monthly contract, no account, no API key. x402 is the convention that carries the purchase inside an ordinary HTTP exchange. The server answers an unpaid call with status 402 and a machine readable price, the caller signs a stablecoin payment and retries, and the data arrives on the second attempt.
What x402 is
Status code 402, Payment Required, has sat in the HTTP standard since 1997 with a note that it is reserved for future use. x402, published as an open specification by Coinbase in 2025, is one answer to what that use looks like. It pins down the shape of the 402 response and the shape of the client's reply. It also names a new role, the facilitator: a service that checks the signature and submits the transfer on chain on the resource server's behalf. A server may verify and settle by itself instead.
Two features of that design matter before the licensing questions further down. The price travels with the response, so a client that has never seen a route learns the cost from the 402 itself. And nothing in the exchange identifies a person. A wallet address and a signature sit where a user account and an API key normally sit.
The x402 handshake, step by step
What follows is a transcript of two round trips, not a command to copy. The field and header names come from the published specification, and the version 1 names are still what most deployments send as of October 2026.
- The agent sends a plain GET to a data route with no credentials attached.
- The server answers 402 Payment Required. The body carries the terms in an
acceptsarray, one entry per option the server will take. An entry names thescheme(exactpays a fixed amount,uptoauthorizes a ceiling and settles against actual usage), thenetwork, the token contract inasset, the destination wallet inpayTo, the amount, and a timeout. - The agent picks an entry whose scheme and network it supports, then signs an authorization for that amount from its own wallet. Nothing has moved on chain yet.
- The agent repeats the identical request with the base64 payload attached in a header. Version 1 calls that header
X-PAYMENT. The later revision of the spec renames itPAYMENT-SIGNATURE. - The server verifies the payload, either locally or by posting it with the requirements to a facilitator's
/verifyendpoint. On a valid payment it does the work, then settles through/settle. - The answer comes back 200 OK with the data and a base64 settlement receipt in
X-PAYMENT-RESPONSE, namedPAYMENT-RESPONSEin the newer spec.
Two habits keep a client honest. Read the price out of every 402 body instead of hardcoding a rate you saw last month: amounts are quoted in the token's base units, where a USDC value of 10000 is one cent at six decimals. And keep route paths out of your agent's standing instructions. These catalogs are new and the paths move.
What one request actually buys
A per call price means nothing without the payload beside it. The panel below counts what two common request shapes return for 5 household symbols: a year of daily bars, and a single pinned session of one minute bars including extended hours.
| symbol | daily_bars_one_year | minute_bars_one_session |
|---|---|---|
| NVDA | 252 | 941 |
| SPY | 252 | 882 |
| AAPL | 252 | 844 |
| MSFT | 252 | 730 |
| KO | 252 | 487 |
The exact SQL behind every number
SELECT
d.symbol AS symbol,
d.daily_bars AS daily_bars_one_year,
toUInt32(ifNull(m.minute_bars, 0)) AS minute_bars_one_session
FROM
(
SELECT
ticker AS symbol,
count() AS daily_bars
FROM global_markets.stocks_daily_aggs
WHERE ticker IN ('AAPL', 'KO', 'MSFT', 'NVDA', 'SPY')
AND date >= '2025-09-15'
AND date < '2026-09-16'
GROUP BY ticker
) AS d
LEFT JOIN
(
SELECT
ticker AS symbol,
count() AS minute_bars
FROM global_markets.delayed_stocks_minute_aggs
WHERE ticker IN ('AAPL', 'KO', 'MSFT', 'NVDA', 'SPY')
AND window_start >= '2026-09-15 04:00:00'
AND window_start < '2026-09-16 04:00:00'
GROUP BY ticker
) AS m ON m.symbol = d.symbol
ORDER BY minute_bars_one_session DESC, symbolA year of end of day bars for one symbol is 252 rows. That is one page and one payment. The minute grid for a single session runs to 941 rows for NVDA and 487 for KO, since a minute with no trade prints no bar. Pagination is where per request billing bites: each page is its own purchase, so an answer that spans five pages costs five payments.
Paying per request versus a real time market data feed
Real time data is not priced by the call anywhere in this industry. It is priced by entitled user and by message volume. The panel below makes that concrete with one hour of top of book quote updates for the same symbols on the same pinned session.
| symbol | quote_updates | quote_updates_label |
|---|---|---|
| SPY | 463895 | 463.89 thousand |
| NVDA | 294684 | 294.68 thousand |
| AAPL | 135748 | 135.75 thousand |
| KO | 76526 | 76.53 thousand |
| MSFT | 35300 | 35.30 thousand |
The exact SQL behind every number
SELECT
ticker AS symbol,
count() AS quote_updates,
formatReadableQuantity(count()) AS quote_updates_label
FROM global_markets.cache_stocks_quotes
WHERE ticker IN ('AAPL', 'KO', 'MSFT', 'NVDA', 'SPY')
AND sip_timestamp >= '2026-09-15 14:00:00'
AND sip_timestamp < '2026-09-15 15:00:00'
GROUP BY ticker
ORDER BY quote_updates DESCSPY alone printed 463.89 thousand quote updates in that hour, and the quietest name in the group still printed 35.30 thousand. No per call tariff expresses that. A screen refreshing once a second is 3,600 calls an hour for a single symbol, and at a hypothetical cent a call that is $36 an hour to watch one name. The per user and per application lines on a real fee schedule are laid out in what real-time market data costs. Per request purchase suits the opposite shape of demand: an occasional question whose answer is a page of rows. Where the venue's own interface ends and a data vendor's begins is covered in trading API vs market data API.
Is a paying agent a professional subscriber?
Market data agreements do not sort usage by the call. They sort subscribers, and there are two buckets. A non professional subscriber has to be a natural person using the data for personal purposes, not for anyone's business, not registered with a securities regulator or a self regulatory organization, and not acting as an investment adviser. Everyone else pays professional rates, several times higher per user per month. Hold an unattended agent against that definition and the mismatch is immediate: a wallet is not a natural person, and nobody can certify its personal use.
A third category fits the agent better. Non display use covers data consumed by a system that never shows it to a human, from automated trading to research pipelines, and it is billed per firm or per application rather than per screen. What the per request routes sell today keeps them clear of most of that machinery: end of day aggregates, current session snapshots and derived indicators rather than the live quote stream the entitlement rules were written around. The same sorting exercise from a builder's seat is in market data licensing for app developers.
Who carries the display obligation
Display duties travel with the data: attribute the source, show the timestamp and any delay, never present a derived figure as the exchange's own print. Those duties attach to a subscriber, and in a per request flow the subscriber is whoever accepted the terms at the route. The route accepted a signature. A vendor cannot send a usage declaration to an address it cannot resolve to a company.
Two things follow. The obligation lands on the developer who deployed the agent, the only party in the exchange able to put a source line on a screen. And the terms in force are the ones published at that route on the day the payment settled, with no counter signature and no renewal notice on file. None of this is settled practice as of October 2026, since the agreements were drafted with named subscribers in mind. The attribution mechanics themselves have not changed, and they are in the vendor display rule.
What is on offer today, and what is already free
Per request market data catalogs as of October 2026 are narrow and cover US stocks only. The shelf holds bars and aggregates, snapshots of the current session, technical indicators such as moving averages and RSI, reference data for ticker search and company detail, news with summaries, and SEC filing text including risk factors, insider transactions and institutional holdings. Tick level data and other asset classes are absent. How an agent is handed any of this once it has it is covered in market data skills for AI agents.
Part of that shelf answers questions a free public source answers already. Filings are the clearest case. Everything in them arrives through EDGAR at no charge, on the volume counted below.
| month | month_label | filings_indexed |
|---|---|---|
| 2025-10-01 | Oct 2025 | 86374 |
| 2025-11-01 | Nov 2025 | 92964 |
| 2025-12-01 | Dec 2025 | 84255 |
| 2026-01-01 | Jan 2026 | 89633 |
| 2026-02-01 | Feb 2026 | 125504 |
| 2026-03-01 | Mar 2026 | 135169 |
| 2026-04-01 | Apr 2026 | 102628 |
| 2026-05-01 | May 2026 | 131707 |
| 2026-06-01 | Jun 2026 | 102125 |
| 2026-07-01 | Jul 2026 | 94625 |
| 2026-08-01 | Aug 2026 | 123631 |
| 2026-09-01 | Sep 2026 | 83691 |
The exact SQL behind every number
SELECT
toString(toStartOfMonth(filing_date)) AS month,
formatDateTime(toStartOfMonth(filing_date), '%b %Y') AS month_label,
count() AS filings_indexed
FROM global_markets.stocks_sec_edgar_index
WHERE filing_date >= '2025-10-01'
AND filing_date < '2026-10-01'
GROUP BY month, month_label
ORDER BY monthIndexed filings ran 86374 in Oct 2025 and 83691 in Sep 2026. Paying per call for that text buys parsing and structure, not access. Corporate actions sit in the same bracket, and they also move on a slow clock.
| month | month_label | dividend_records | distinct_tickers |
|---|---|---|---|
| 2025-10-01 | Oct 2025 | 3225 | 2835 |
| 2025-11-01 | Nov 2025 | 3733 | 3283 |
| 2025-12-01 | Dec 2025 | 7508 | 6243 |
| 2026-01-01 | Jan 2026 | 2564 | 2023 |
| 2026-02-01 | Feb 2026 | 3575 | 3078 |
| 2026-03-01 | Mar 2026 | 6815 | 6121 |
| 2026-04-01 | Apr 2026 | 3947 | 3305 |
| 2026-05-01 | May 2026 | 4804 | 4160 |
| 2026-06-01 | Jun 2026 | 6651 | 5995 |
| 2026-07-01 | Jul 2026 | 3851 | 3172 |
| 2026-08-01 | Aug 2026 | 4324 | 3685 |
| 2026-09-01 | Sep 2026 | 6760 | 6091 |
The exact SQL behind every number
SELECT
toString(toStartOfMonth(ex_dividend_date)) AS month,
formatDateTime(toStartOfMonth(ex_dividend_date), '%b %Y') AS month_label,
countDistinct(id) AS dividend_records,
countDistinct(ticker) AS distinct_tickers
FROM global_markets.stocks_dividends
WHERE ex_dividend_date >= '2025-10-01'
AND ex_dividend_date < '2026-10-01'
GROUP BY month, month_label
ORDER BY monthSep 2026 carried 6760 dividend records across 6091 symbols, inside a band the 12 months in view stay close to. A dividend calendar bought twice in one week returns the same rows twice. Cache it, and spend the per call budget on the churn heavy corner instead: news published this morning, or a snapshot of a session still in progress.
FAQ
Do you need an account or an API key to buy market data with x402?
No. The payment is the authorization. A caller needs a funded wallet on a network the route accepts, and the 402 response names both the network and the token. No signup step sits in front of the data.
How much does one market data request cost over x402?
Read it from the 402 body, never from an article. Each route quotes its own live price in the amount field, in the token's base units, and the catalogs listing these endpoints label them experimental with pricing subject to change. Published rates have started around a cent a call as of October 2026.
Is an AI agent paying per request a professional or non professional subscriber?
The non professional category requires a natural person using the data for personal purposes, so an unattended wallet does not fit inside it. Automated consumption with no human reader is what exchanges classify as non display use, priced per firm or per application.
Can you buy real time quotes this way?
Not today. The per request market data routes live as of October 2026 are end of day and current session products for US stocks. Tick level data and streaming stay on subscription terms, where entitlement and message counts are what gets billed.
What happens if a payment verifies but the data request fails?
Settlement and delivery are separate steps in the flow, and vendors publish a charging rule for the gap. A common one is to charge only successful responses, with each page of a paginated answer charged on its own. Check the rule at the route before building retry logic around it.
Every panel above ships with the SQL that produced it, so open one and the counting is fully visible. The same questions can be asked in plain English on the Strasmore terminal.