# x402stock.xyz Open/Close OHLCV

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

Returns a single trading day's open, high, low, close, volume, pre-market, and after-hours prices for a specific US equity ticker.

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/open-close/AAPL
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402stock-xyz-73743788
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9LaMF6TB86uR-A6ndfZg2

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-xyz-73743788
```

Example prompt: What were the open, high, low, close, and volume numbers for AAPL on 2024-11-15, with price adjustment enabled?

## When to prefer this

Use this endpoint when you need precise single-day OHLCV data for a specific US equity ticker, especially when pre-market and after-hours prices are needed alongside standard trading session data. Prefer this over bulk market snapshot endpoints when you only need one ticker for one day.

## Known failure modes

- Invalid date format returns an error — must be YYYY-MM-DD
- Non-trading day (weekend/holiday) may return empty or error response
- Unknown ticker symbol returns 404 or empty data
- Payment failure (x402) if USDC balance is insufficient
- Rate limiting if too many calls are made in a short window

## How this service works

Official open, close, high, low, volume, plus pre-market and after-hours prices for a ticker on a given date. Pass `?date=YYYY-MM-DD` (required). From x402stock, a pay-per-call market & economic data API for AI agents. No API key or account; pay in USDC via x402.

## Output

Returns a JSON object containing ticker symbol, data source, as-of timestamp, and a data object with date, open, high, low, close, volume, pre-market price (nullable), and after-hours price (nullable) for the requested trading day.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "date": "2024-11-15",
   "adjusted": true
  }
 }
}
```

## 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"
    },
    "queryParams": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "date",
      "adjusted"
     ],
     "properties": {
      "date": {
       "type": "string",
       "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "adjusted": {
       "type": "boolean",
       "default": true
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "$schema": "https://json-schema.org/draft/2020-12/schema",
     "required": [
      "ticker",
      "data",
      "source",
      "as_of"
     ],
     "properties": {
      "data": {
       "type": "object",
       "required": [
        "date",
        "open",
        "high",
        "low",
        "close",
        "volume",
        "pre_market",
        "after_hours"
       ],
       "properties": {
        "low": {
         "type": "number"
        },
        "date": {
         "type": "string"
        },
        "high": {
         "type": "number"
        },
        "open": {
         "type": "number"
        },
        "close": {
         "type": "number"
        },
        "volume": {
         "type": "number"
        },
        "pre_market": {
         "anyOf": [
          {
           "type": "number"
          },
          {
           "type": "null"
          }
         ]
        },
        "after_hours": {
         "anyOf": [
          {
           "type": "number"
          },
          {
           "type": "null"
          }
         ]
        }
       },
       "additionalProperties": false
      },
      "as_of": {
       "type": "string"
      },
      "source": {
       "type": "string",
       "const": "x402stock"
      },
      "ticker": {
       "type": "string"
      },
      "feedback": {
       "type": "object",
       "required": [
        "endpoint",
        "method",
        "free",
        "note"
       ],
       "propert
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-xyz-73743788/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)
