# x402stock Open/Close OHLCV Endpoint

> x402stock Open/Close OHLCV Endpoint 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 daily open, high, low, close, volume, pre-market, and after-hours price data for a given US stock ticker on a specified date

## Facts

- Endpoint: GET https://x402stock.xyz/api/v1/open-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-open-close-ohlcv-endpoint-4cf57015
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zHx_0o8CqWQ9GppLvbUgk

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-open-close-ohlcv-endpoint-4cf57015
```

Example prompt: What were the open, high, low, close prices and trading volume for AAPL on 2025-06-02, using adjusted prices?

## When to prefer this

Use this endpoint when you need end-of-day OHLCV data (open, high, low, close, volume) plus pre-market and after-hours prices for a specific US stock or ETF ticker on a particular historical date. It is ideal for agents doing financial analysis, backtesting, or reporting that require no API key and can pay per call in USDC via x402 on Base.

## Known failure modes

- Invalid ticker symbol returns error or empty data
- Non-trading day (weekend or holiday) returns no data or error
- Date in wrong format (not YYYY-MM-DD) returns 400-level error
- Future date returns no data
- Payment failure via x402/USDC returns 402 Payment Required
- Rate limiting or network timeout

## 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 symbol, date, open, high, low, close, volume, pre-market price, and after-hours price for the requested trading day, along with an as_of timestamp and data source label.

## 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)
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "low": 200.12,
   "date": "2025-06-02",
   "high": 202.13,
   "open": 200.28,
   "close": 201.7,
   "volume": 35423294,
   "pre_market": 198.52,
   "after_hours": 201.68
  },
  "as_of": "2025-06-02T00:00:00.000Z",
  "source": "x402stock",
  "ticker": "AAPL"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402stock-open-close-ohlcv-endpoint-4cf57015/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)
