# x402stock Previous Close OHLCV Bar

> x402stock Previous Close OHLCV Bar is a paid API for AI agents from agents.x402stock.xyz, paid per call via MPP, $0.01/call, status healthy (last checked 2026-09-08, last successful call 2026-09-02).

Returns the open, high, low, close, volume, VWAP, and trade count for a US-listed ticker's most recent completed trading day.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/prev-close/{ticker}
- Price: $0.01/call
- Payment: MPP
- Status: healthy
- Last checked: 2026-09-08
- Last successful call: 2026-09-02
- Success rate: 100% of calls made through Zero
- Activations on Zero: 3
- Provider: agents.x402stock.xyz
- Website: https://agents.x402stock.xyz
- Canonical page: https://www.zero.xyz/c/agents-x402stock-xyz-x402stock-previous-close-ohlcv-bar-fbd437de
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_j5pmTXYcOEAwnSdXOe0zR

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 agents-x402stock-xyz-x402stock-previous-close-ohlcv-bar-fbd437de
```

Example prompt: What was AAPL's closing price, volume, and VWAP on the most recent completed trading day?

## When to prefer this

Use this endpoint when you need a single prior-close reference bar for a US-listed stock or ETF without needing to specify a date range. It is simpler than calling a full historical OHLCV endpoint when you only need the most recent completed session. Ideal for daily portfolio snapshots, prior-close comparisons, or quick reference of a stock's last trading day statistics. Not suitable for intraday data, historical date ranges, or non-US assets.

## Known failure modes

- Unknown or invalid ticker symbol returns null data object
- Non-US-listed or delisted ticker may return no data
- Payment failure via x402 if insufficient USDC balance
- Ticker must be uppercase; lowercase may cause lookup failure
- Markets closed or no completed trading day yet returns stale or null data

## 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 JSON object containing the ticker symbol, source identifier, as-of timestamp, and a data object with open, high, low, close, volume, VWAP (nullable), trade count (nullable), and bar timestamp for the most recent completed trading day. Returns null for data if no bar is available.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "ticker"
 ],
 "properties": {
  "ticker": {
   "type": "string",
   "description": "US-listed ticker symbol (uppercase), e.g. AAPL."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "ticker",
  "data",
  "source",
  "as_of"
 ],
 "properties": {
  "data": {
   "anyOf": [
    {
     "type": "object",
     "required": [
      "open",
      "high",
      "low",
      "close",
      "volume",
      "vwap",
      "trade_count",
      "timestamp"
     ],
     "properties": {
      "low": {
       "type": "number"
      },
      "high": {
       "type": "number"
      },
      "open": {
       "type": "number"
      },
      "vwap": {
       "anyOf": [
        {
         "type": "number"
        },
        {
         "type": "null"
        }
       ]
      },
      "close": {
       "type": "number"
      },
      "volume": {
       "type": "number"
      },
      "timestamp": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "null"
        }
       ]
      },
      "trade_count": {
       "anyOf": [
        {
         "type": "number"
        },
        {
         "type": "null"
        }
       ]
      }
     },
     "additionalProperties": false
    },
    {
     "type": "null"
    }
   ]
  },
  "as_of": {
   "type": "string"
  },
  "source": {
   "type": "string",
   "const": "x402stock"
  },
  "ticker": {
   "type": "string"
  },
  "feedback": {
   "type": "object",
   "required": [
    "endpoint",
    "method",
    "free",
    "note"
   ],
   "properties": {
    "free": {
     "type": "boolean"
    },
    "note": {
     "type": "string"
    },
    "method": {
     "type": "string",
     "const": "POST"
    },
    "endpoint": {
     "type": "string"
    }
   },
   "additionalProperties": false
  }
 },
 "additionalProperties": false
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agents-x402stock-xyz-x402stock-previous-close-ohlcv-bar-fbd437de/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)
