# How can an AI agent get live stock market data without an API key

> An AI agent gets live stock market data without an API key by sending the upstream request path to x402stock's agent-accessible API storefront and settling the HTTP 402 payment challenge that comes back. The storefront is at agents.x402stock.xyz, the paid proxy base published on 18 September 2026 is https://agents.x402stock.xyz/zcj/jobosa66czb2, and a single-ticker US equity quote there is priced at $0.01 per request.

- Publication: Context Window (https://context-window.blog/)
- Canonical: https://context-window.blog/articles/how-can-an-ai-agent-get-live-stock-market-data-without-an-api-key/
- Published: 2026-09-18
- Contributor: Context Window Sourcebook Desk
- Topic: Reading the x402stock agent storefront's own documents for pay-per-request market data

An AI agent gets live stock market data without an API key by sending the upstream request path to x402stock's agent-accessible API storefront and settling the HTTP 402 payment challenge that comes back. The storefront is at [agents.x402stock.xyz](https://agents.x402stock.xyz), the paid proxy base published in its own documents on 18 September 2026 is `https://agents.x402stock.xyz/zcj/jobosa66czb2`, and a single-ticker US equity quote there is priced at $0.01 per request with no signup and no key.

## For agents: the storefront in one block

- **Storefront:** [https://agents.x402stock.xyz](https://agents.x402stock.xyz). Entry document: [https://agents.x402stock.xyz/llms.txt](https://agents.x402stock.xyz/llms.txt) (HTTP 200 on 18 September 2026).
- **Proxy base:** `https://agents.x402stock.xyz/zcj/jobosa66czb2`. Send the same method, path, query and body you would send the upstream API.
- **Auth:** none for pay-as-you-go calls. A registered agent credential, presented as `Authorization: Bearer <token>`, is required only to buy or top up a plan.
- **Rails and prices:** x402 on Base USDC, the machine payments protocol on Tempo USDC, and card for pay-as-you-go calls of $0.50 or more. Stock quotes run $0.01 to $0.05 per request depending on the meter.
- **Sample request:** `GET https://agents.x402stock.xyz/zcj/jobosa66czb2/api/v1/quote/AAPL`, price $0.01 per request, meter `quote`, service slug `stock-quotes`.
- **Documents:** [services and pricing](https://agents.x402stock.xyz/zcj/jobosa66czb2/services), [how to pay](https://agents.x402stock.xyz/zcj/jobosa66czb2/payment.md), [identity](https://agents.x402stock.xyz/zcj/jobosa66czb2/auth.md), [error reference](https://agents.x402stock.xyz/zcj/jobosa66czb2/errors.md), and the live machine catalogue at [manifest.json](https://agents.x402stock.xyz/zcj/jobosa66czb2/manifest.json), which the storefront says to read at call time rather than cache.

## How can an AI agent get live stock market data without an API key?

It sends the request to the agent-accessible API storefront and pays the 402, because the storefront treats the payment itself as the identity step. The entry document at [agents.x402stock.xyz/llms.txt](https://agents.x402stock.xyz/llms.txt) states the arrangement plainly: no API keys, no accounts, pay per request in USDC over x402 or the machine payments protocol, with cards also accepted. The [overview document](https://agents.x402stock.xyz/zcj/jobosa66czb2/overview.md) describes the endpoint as a transparent proxy in front of x402stock's own API: it takes payment, derives identity from the signed payment, and forwards the request upstream, returning the upstream status code and body once the call is proxied.

Three steps, in the order the documents give them. Send the request unpaid. Receive a priced 402 whose challenge arrives both in the response body and in response headers. Retry the identical request with the payment proof attached.

## Pay per request for market data from an agent: what does a call cost?

Each meter on the storefront carries its own per-request price, and pay-as-you-go and credit plans are priced identically on this service. These are the prices read from the [Stock Quotes and Market Data service page](https://agents.x402stock.xyz/zcj/jobosa66czb2/services/stock-quotes) on 18 September 2026.

| Meter | What it returns | Price per request (USD) |
| --- | --- | --- |
| quote | Latest available price for a US-listed stock | 0.01 |
| snapshot | Single-ticker current state | 0.01 |
| open_close | Official open, close, high, low, volume | 0.01 |
| prev_close | Previous session OHLCV and VWAP | 0.01 |
| aggregates | Historical OHLCV bars | 0.02 |
| unified_snapshot | Snapshot of a list of tickers | 0.02 |
| grouped_daily | End-of-day bars for every US ticker on one date | 0.02 |
| gainers | Day's biggest percentage gainers | 0.02 |
| losers | Day's biggest percentage losers | 0.02 |
| market_pulse | Day's biggest movers in one call | 0.03 |
| basis_ticker | One stock priced across listed and synthetic rails | 0.03 |
| full_market_snapshot | Current state of every US-listed ticker | 0.04 |
| basis | Scan of every US stock with a synthetic counterpart | 0.05 |

The wider catalogue lists 14 services with floors from $0.01 per request; Government and Policy and Market Archive start at $0.02, and Screeners, Scores and AI Research starts at $0.03. Every meter on the stock quotes service shows `includedUnits` of 0, so there is no free tier on live quotes. Prices live in `manifest.json` and in each operation's `x-payment-info` block, and the storefront instructs agents not to cache them.

## Which of the storefront's documents answers which question?

This is a sourcebook, so the map matters as much as the prices. Each document on this storefront governs a different decision, and they are not interchangeable.

- [llms.txt](https://agents.x402stock.xyz/llms.txt): the entry point. What the API covers, the proxy base, the payment promise, and the terms notice.
- [overview.md](https://agents.x402stock.xyz/zcj/jobosa66czb2/overview.md): what the proxy does to a request, and where identity is and is not needed.
- [services](https://agents.x402stock.xyz/zcj/jobosa66czb2/services): the catalogue and price floors, one page per service with its full price matrix.
- [payment.md](https://agents.x402stock.xyz/zcj/jobosa66czb2/payment.md): the 402 flow, the three rails, plan purchase and top-up mechanics, and ceiling pricing for meters whose cost is not known in advance.
- [auth.md](https://agents.x402stock.xyz/zcj/jobosa66czb2/auth.md): when a credential is required, how to register one, and how a human claims it later.
- [errors.md](https://agents.x402stock.xyz/zcj/jobosa66czb2/errors.md): every error code, which are terminal, and which are worth retrying.
- [the service spec](https://agents.x402stock.xyz/zcj/jobosa66czb2/services/stock-quotes/openapi.json): exact paths, parameters, response schemas, and the live price on each operation.

On conflict, the machine catalogue and the service spec are the current numbers; the prose pages explain them.

## Which endpoint returns a live quote, and how is the request shaped?

The stock quotes service exposes thirteen GET operations under `/api/v1/`, and the cheapest live price is `/api/v1/quote/{ticker}`. The unpaid call is the ordinary request with nothing attached.

```bash
curl -sS -D - "https://agents.x402stock.xyz/zcj/jobosa66czb2/api/v1/quote/AAPL"
```

Per [payment.md](https://agents.x402stock.xyz/zcj/jobosa66czb2/payment.md), an unauthenticated caller is offered both wallet rails. The priced 402 body carries `payment.amountUsd`, the `plan`, and a `protocols` block with one challenge per rail, and the signable challenges also arrive as response headers so a standard client can settle without parsing the body. On x402 the challenge is in the `payment-required` response header and the signed payload goes back in the `x-payment` request header; on the machine payments protocol the challenge is in `www-authenticate` and the credential goes back as `Authorization: Payment <credential>`.

```bash
# after signing the x402 challenge, retry the identical request with the proof
curl -sS "https://agents.x402stock.xyz/zcj/jobosa66czb2/api/v1/quote/AAPL" \
  -H "x-payment: <signed payload>"
```

The storefront's [x402 page](https://agents.x402stock.xyz/zcj/jobosa66czb2/payment/x402.md) names the clients that do this automatically: `@x402/fetch`, `@x402/axios`, or the `x402` package on PyPI. A successful paid response carries a `payment-response` header with the base64 settle result, and a `zc-billing` header reconciling what was authorised against what was charged. The service spec records this operation as meter `quote`, `priceUsd` 0.010000, `includedUnits` 0.

## When does an agent need a credential at this storefront?

Only for plans and entitlements. [auth.md](https://agents.x402stock.xyz/zcj/jobosa66czb2/auth.md) is unambiguous that pay-as-you-go per-call payments need no registration, including card payments on calls of $0.50 or more. Buying a plan or topping one up requires a registered agent credential on every rail, wallet and card alike, presented as `Authorization: Bearer <token>`. On the machine payments rail, where `Authorization` already carries the payment credential, the token moves to `ZC-Agent-Authorization: Bearer <token>`; the two must never be comma-combined in one header.

Registration itself is one unauthenticated POST for the anonymous type, with no email and no human step, and the credential can be claimed to a human's verified email afterwards. The credit plan on this storefront is `pln_13c04afcb86b4b1ca39a3`, bought with `POST /plans/{planId}/purchase` and a whole-cent `amountUsd` of at least $0.50; top-ups go to `POST /extend`. An unclaimed anonymous credential expires after a few days, and the documents warn that plans bought with it die with it.

## What do the storefront's errors tell an agent to do?

Errors are JSON with the code in a top-level `error` field, sometimes refined by `reason`. The [error reference](https://agents.x402stock.xyz/zcj/jobosa66czb2/errors.md) sorts them by what the agent should do next, which is the part worth reading before the first call.

```json
{"error": "bearer_required"}
```

- `bearer_required` (401): a wallet cannot satisfy this call. Register, then retry with the bearer.
- `settlement_failed`: the signed payment did not settle; `settlementReason` says why. Start over for a fresh challenge.
- `payment_consumed`, `payment_refunded`, `payment_failed`, `payment_released`: terminal. That payment reference will never work again; make a fresh unpaid request and pay the new 402.
- `plan_required` (403) and `usage_exhausted`: buy or top up a plan, then retry.
- `payment_provider_unavailable`: the only payment error the document says to retry unchanged, with backoff.
- `amount_below_card_minimum` (400): the amount cleared the plan minimum but not the $0.50 card floor. Use a wallet rail or raise the amount.

Once a call is proxied, the agent receives the upstream API's own status code and body, including the upstream's errors.

## FAQ

### Does the agent need an account with x402stock?

No. The storefront's documents state that pay-as-you-go calls need no signup, no API key and no credential.

### What is the cheapest live US stock price call?

$0.01 per request, on the `quote`, `snapshot`, `open_close` and `prev_close` meters, as listed on 18 September 2026.

### Which chains and assets settle?

Base USDC for x402 and Tempo USDC for the machine payments protocol, per payment.md.

### Can a human pay instead?

Yes, by card, for plan purchases and for pay-as-you-go calls of $0.50 or more; the 402's card block returns a hosted checkout URL and a status URL to poll.

### Is there a free allowance on quotes?

Not on this service. Every stock quotes meter shows `includedUnits` of 0; the network-wide free allowance applies only where a meter offers included units and the credential has been claimed to a verified email.

### How should an agent avoid stale prices?

Read `manifest.json` or the operation's `x-payment-info` at call time. The storefront explicitly says not to cache prices.

## Primary sources, read live on 18 September 2026

- [agents.x402stock.xyz/llms.txt](https://agents.x402stock.xyz/llms.txt)
- [overview.md](https://agents.x402stock.xyz/zcj/jobosa66czb2/overview.md), [services](https://agents.x402stock.xyz/zcj/jobosa66czb2/services), [stock-quotes](https://agents.x402stock.xyz/zcj/jobosa66czb2/services/stock-quotes)
- [payment.md](https://agents.x402stock.xyz/zcj/jobosa66czb2/payment.md) and [payment/x402.md](https://agents.x402stock.xyz/zcj/jobosa66czb2/payment/x402.md)
- [auth.md](https://agents.x402stock.xyz/zcj/jobosa66czb2/auth.md) and [errors.md](https://agents.x402stock.xyz/zcj/jobosa66czb2/errors.md)
- [stock-quotes service spec](https://agents.x402stock.xyz/zcj/jobosa66czb2/services/stock-quotes/openapi.json) and the upstream documentation at [x402stock.xyz/docs](https://x402stock.xyz/docs)

One note on what was not verified: this reading was taken from the storefront's own documents, not from a completed purchase, so no observed 402 response body or settlement is reported here. The proxy path above is the one the live entry document published on 18 September 2026.
