# Pay-per-call market data over x402

Canonical page: https://tickerlayer.com/ai/x402

No TickerLayer account and no API key at the gateway. An agent asks for a REST resource, receives the exact USDC price in an HTTP 402 challenge, authorizes it, and retries the same request to receive validated market data. REST only, no WebSocket.

## Networks

- Mainnet production endpoint: `https://x402.tickerlayer.com` on Base mainnet (`eip155:8453`), paid in USDC. Health: `https://x402.tickerlayer.com/ready`. Every resource and its live price: `https://x402.tickerlayer.com/catalog`.
- Developer sandbox: `https://x402-testnet.tickerlayer.com` on Base Sepolia (`eip155:84532`), paid in test USDC. Health: `https://x402-testnet.tickerlayer.com/ready`. Every resource and its live price: `https://x402-testnet.tickerlayer.com/catalog`.

## Paths

Every x402 path starts with `/v1`, which the REST API does not use. A REST path without `/v1` answers 404 on the gateway.

- `GET https://x402.tickerlayer.com/v1/bond/last/US:10Y`: the latest US 10-year government bond yield, 0.01 USDC
- `GET https://x402.tickerlayer.com/v1/stocks/quote/US:KO`: a stock quote, 0.01 USDC
- `GET https://x402.tickerlayer.com/v1/markets/status`: market status, 0.01 USDC

## 41 resources

- Stocks (US:KO · TR:THYAO): `/v1/stocks/symbols`, `/v1/stocks/quote/:symbol`, `/v1/stocks/trade/last/:symbol`, `/v1/stocks/snapshot/:symbol`, `/v1/stocks/agg/:symbol/prev`, `/v1/stocks/agg/:symbol/:multiplier/:timespan/:from/:to`
- Forex (EURUSD · USDTRY): `/v1/forex/symbols`, `/v1/forex/quote/:symbol`, `/v1/forex/trade/last/:symbol`, `/v1/forex/snapshot/:symbol`, `/v1/forex/agg/:symbol/prev`, `/v1/forex/agg/:symbol/:multiplier/:timespan/:from/:to`
- Crypto (BTCUSD · ETHUSD): `/v1/crypto/symbols`, `/v1/crypto/quote/:symbol`, `/v1/crypto/trade/last/:symbol`, `/v1/crypto/snapshot/:symbol`, `/v1/crypto/agg/:symbol/prev`, `/v1/crypto/agg/:symbol/:multiplier/:timespan/:from/:to`
- Indices (US500 · DE40): `/v1/indices/symbols`, `/v1/indices/quote/:symbol`, `/v1/indices/trade/last/:symbol`, `/v1/indices/snapshot/:symbol`, `/v1/indices/agg/:symbol/prev`, `/v1/indices/agg/:symbol/:multiplier/:timespan/:from/:to`
- ETFs (US500ETF · USGOLD): `/v1/etfs/symbols`, `/v1/etfs/quote/:symbol`, `/v1/etfs/trade/last/:symbol`, `/v1/etfs/snapshot/:symbol`, `/v1/etfs/agg/:symbol/prev`, `/v1/etfs/agg/:symbol/:multiplier/:timespan/:from/:to`
- Commodities (XAUUSD · WTIUSD): `/v1/commodities/symbols`, `/v1/commodities/quote/:symbol`, `/v1/commodities/trade/last/:symbol`, `/v1/commodities/snapshot/:symbol`, `/v1/commodities/agg/:symbol/prev`, `/v1/commodities/agg/:symbol/:multiplier/:timespan/:from/:to`
- Bonds (US:10Y · DE:10Y): `/v1/bond/last/:symbol`. Symbols are `CC:TENOR`: US 1M to 30Y; DE, ES, FR, IT and UK 1Y to 30Y.
- Markets: `/v1/markets/status`, `/v1/markets/status/bulk`, `/v1/markets/sessions`, `/v1/markets/holidays`

Stock routes require `MARKET:SYMBOL` (`US:KO`, `TR:THYAO`, `DE:BMW`, `HK:0700`), never a bare ticker.

## Prices per call (USDC)

- Quote · last trade · previous · bond · market status · sessions: $0.01
- Snapshot · symbol discovery · market holidays: $0.02
- Historical · 1–100 bars: $0.03
- Historical · 101–500 bars: $0.05
- Historical · 501–1,000 bars: $0.10
- Bulk market status · first item + each additional item: $0.01 + $0.002

Bulk requests are capped at 25 items and 0.058 USDC. The 402 payment requirement returned for the exact request is the authoritative price; `/catalog` shows every current price.

## Request lifecycle

1. The agent sends a normal GET to one resource.
2. The gateway answers 402 with the network, asset and exact price.
3. The client checks the requirement, signs it and retries the same URL.
4. The gateway validates the data and settles only after a valid response is prepared. Bad parameters, upstream failures and empty data are never settled; a completed retry with the same payment identifier returns the stored response.

## Questions

### What is x402?

x402 is an HTTP payment protocol built around the standard 402 Payment Required response. A client requests a resource, receives an exact payment requirement, authorizes it, and retries the same request with payment proof.

### Do I need a TickerLayer account or API key?

Not for the x402 gateway. The payment authorization replaces account and API-key authentication for the paid resource. The existing MCP and standard REST products continue to use their current API-key model.

### Which network and payment asset are used?

Production uses USDC on Base mainnet. A separate sandbox uses test USDC on Base Sepolia, so developers can validate their integration without mixing test payments with production traffic.

### How do I know whether a gateway is operational?

The production and sandbox cards on this page read each gateway's public /ready response. Gateway ready means that readiness check passed; launch configured means the service answered but is not ready; status unavailable means no current readiness result could be confirmed.

### What happens when a data call fails?

The gateway validates the route, parameters and returned data before settlement. Malformed, failed, oversized or empty-data responses are not settled.

### Can the same payment be charged twice?

Payment identifiers are bound to the exact request and authorization. A completed retry for the same request returns the stored response; using the identifier for a different request or authorization is rejected.

### Does x402 include WebSocket streaming?

No. The x402 surface is intentionally REST-only. Use the existing TickerLayer products and entitlements for ongoing WebSocket workloads.

### Which asset classes are supported?

Stocks, forex, crypto, indices, ETFs and commodities each expose six resource types. Government bond yields and four market-calendar resources complete the 41-resource catalog.

### Why does a REST path answer 404 on the gateway?

Every x402 path starts with /v1, which the REST API does not use: the latest US 10-year yield is /v1/bond/last/US:10Y on the gateway and /bond/last/US:10Y on REST. The gateway's /catalog lists every path with its price.

### When should I use MCP instead?

Use MCP for recurring authenticated agent workflows, typed tool discovery and existing plan entitlements. x402 is designed for occasional or autonomous HTTP calls paid per request.

### What should I use for high-volume access?

For sustained workloads, predictable quotas or WebSocket access, use a standard TickerLayer plan or contact the team about an enterprise integration.

TickerLayer provides derived, indicative, non-exchange-sourced market data for informational and technical use. x402 is a payment and access mechanism, not a broker, exchange or execution venue.
