# x402stock Previous Close Bar

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

Returns OHLCV and VWAP data for a stock ticker's most recent completed trading day as a single price bar.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/prev-close/:ticker
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-previous-close-bar-9e62a821
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NxGyambrf_kZXuMOb3flN

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-bar-9e62a821
```

Example prompt: What was the open, high, low, close, volume, and VWAP for AAPL on its most recent completed trading day?

## When to prefer this

Use this endpoint when you need a quick prior-close reference for a single ticker without specifying a date range. It is ideal for agents that need end-of-day context (close price, VWAP, volume) as a baseline before market open or for portfolio snapshots. Prefer it over range-based endpoints when only the last completed bar matters and you want minimal payload and cost ($0.01 USDC per call). No API key setup required — payment is handled seamlessly via x402 USDC.

## Known failure modes

- Invalid or unrecognized ticker symbol returns an error or empty result
- Non-trading days (weekends, holidays) may affect which session is returned as 'most recent'
- Payment failure via x402/USDC will block the response
- Delisted or OTC tickers may not be supported
- Rate limits or upstream data provider outages could cause temporary failures

## How this service works

Open, high, low, close, volume, and VWAP for a ticker's most recent completed trading day. One call returns one bar, handy for prior-close reference without setting a date range. From x402stock, a pay-per-call market & economic data API for AI agents. No API key or account; pay in USDC via x402.

## Output

A single OHLCV+VWAP price bar for the requested ticker covering its most recently completed trading session, including open, high, low, close prices, total volume traded, and volume-weighted average price (VWAP), along with the date of the session.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "pathParams": {
     "type": "object",
     "ticker": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

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