# x402stock OHLC Aggregates

> x402stock OHLC Aggregates is a paid API for AI agents from x402stock.vercel.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-12-01).

Returns historical OHLC bar data (open, high, low, close, volume, VWAP) for a given US-listed stock ticker, paid per request in USDC via x402.

## Facts

- Endpoint: GET https://x402stock.vercel.app/api/v1/aggregates/%7Bticker%7D?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-12-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-ohlc-aggregates-16622dcd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zF3HKFBzflM-DF5O0aQRM

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-ohlc-aggregates-16622dcd
```

Example prompt: Can you pull the daily OHLC bars for AAPL over the past 5 trading days, including volume and VWAP?

## When to prefer this

Use this endpoint when you need structured historical OHLC candlestick data for a specific US-listed equity, especially for quantitative analysis, charting, or backtesting. Prefer it over a snapshot endpoint when you need multiple bars over time rather than just the latest price. It is pay-per-call with no account setup required, making it ideal for ad-hoc or agent-driven queries.

## Known failure modes

- Invalid or unrecognized ticker symbol returns an error or empty bars array
- Date range outside available history returns empty results
- Payment failure (insufficient USDC balance or x402 protocol error) blocks the request
- Network or upstream data provider outage causes timeout or 5xx error
- Requesting data for non-trading days (weekends/holidays) may return empty bars

## How this service works

US stock prices, snapshots, OHLC bars, fundamentals, corporate actions, technical indicators and news for AI agents. No API keys. No accounts. Pay per request in USDC via x402.

## Output

A JSON object containing an array of OHLC bar objects for the requested ticker, each with open, high, low, close, VWAP, volume, trade count, and timestamp fields; plus metadata including bar count, an adjusted flag, the as-of date, and the data source name.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "bars": [
    {
     "low": 192.5,
     "high": 196,
     "open": 193,
     "vwap": 194.8,
     "close": 195.12,
     "volume": 50000000,
     "timestamp": "2026-05-28T04:00:00.000Z",
     "trade_count": 450000
    }
   ],
   "count": 1,
   "adjusted": true
  },
  "as_of": "2026-05-29T20:00:00.000Z",
  "source": "massive",
  "ticker": "AAPL"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-ohlc-aggregates-16622dcd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402stock.vercel.app](https://www.zero.xyz/host/x402stock.vercel.app/llms.txt)
