# x402stock Previous Close Data

> x402stock Previous Close Data is a paid API for AI agents from x402stock.xyz, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns the previous trading day's OHLCV (open, high, low, close, volume, VWAP, trade count) for a given stock or ETF ticker

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/prev-close/%7Bticker%7D
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-previous-close-data-b83dbde0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_UqrdNpqqjR-qtvndPbhgQ

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability x402stock-previous-close-data-b83dbde0
```

Example prompt: What did AAPL close at yesterday — can you pull the full previous-day trading summary including open, high, low, volume, and VWAP?

## When to prefer this

Use this endpoint when you need end-of-day OHLCV summary data for a US stock or ETF for the most recent completed trading session. Prefer this over real-time quote endpoints when you only need prior-close reference data for valuation, comparison, or charting. Ideal for no-account, pay-per-call usage via USDC on Base with no API key setup required.

## Known failure modes

- Invalid or unrecognized ticker symbol returns an error
- Ticker for a non-US or delisted stock may not be found
- Request on a market holiday or weekend may return stale or empty data
- Payment failure via x402/USDC results in 402 Payment Required response
- Network timeout or service unavailability returns 5xx error

## How this service works

Pay-per-call market and economic data API for AI agents: US stocks, ETFs and options, forex, crypto and on-chain perps, energy commodities, US and global macro (Fed, CPI, jobs, GDP, Treasury, World Bank), SEC filings, congressional trades, and market sentiment. No API keys, no accounts. Pay per request in USDC via x402 on Base.

## Output

A JSON object containing the ticker's previous trading session data: open, high, low, close prices, VWAP, total volume, trade count, and timestamp of the session, plus the as_of date and source attribution.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "low": 309.53,
   "high": 315,
   "open": 311.775,
   "vwap": 311.9766,
   "close": 312.06,
   "volume": 70030122,
   "timestamp": "2026-05-28T04:00:00.000Z",
   "trade_count": 764554
  },
  "as_of": "2026-05-28T04:00:00.000Z",
  "source": "x402stock",
  "ticker": "AAPL"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-previous-close-data-b83dbde0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.xyz](https://www.zero.xyz/host/x402stock.xyz/llms.txt)
