# BlockRun US Stock Historical OHLCV

> BlockRun US Stock Historical OHLCV is a paid API for AI agents from blockrun.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns historical OHLCV (open/high/low/close/volume) bar data for a US-listed stock ticker over a specified time window and resolution, paid per call in USDC via x402.

## Facts

- Endpoint: GET https://blockrun.ai/api/v1/stocks/us/history/AAPL
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockrun-us-stock-historical-ohlcv-6899f0cd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4l6r5CrcAsSXzIJOmtBCb

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 blockrun-us-stock-historical-ohlcv-6899f0cd
```

Example prompt: Pull daily OHLCV bars for AAPL from January 1, 2024 to December 31, 2024 — I need the open, high, low, close, and volume for each trading day.

## When to prefer this

Choose this endpoint when you need historical OHLCV candlestick data for US-listed equities (NYSE, Nasdaq, AMEX) without managing API keys — payment is per-call in USDC via x402. Prefer this over subscription-based data providers when you want pay-as-you-go pricing with crypto settlement. Ideal for agents needing backtesting data, charting, or time-series analysis sourced from Pyth.

## Known failure modes

- Invalid or unrecognized ticker symbol returns an error
- Missing required 'from' or 'to' query parameters returns a 400-level error
- Date range too large for the selected resolution may return incomplete data
- Payment failure or insufficient USDC balance blocks the request via x402
- Invalid resolution enum value returns a validation error
- Pre/post market session data may be sparse or unavailable for some symbols

## How this service works

Pay for the outcome. One endpoint for every model, tool and data source an agent needs — each call priced before it runs, at the best value per dollar. 99 models and 183 data and tool APIs.

## Output

An array of OHLCV bar objects, each containing bar start timestamp (Unix seconds), open, high, low, close prices, and volume, along with the symbol, resolution, and the data source identifier (Pyth). Bars are returned for the requested time window at the specified resolution (1/5/15/60/240 min, daily, weekly, or monthly).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "path": {
     "type": "object",
     "required": [
      "symbol"
     ],
     "properties": {
      "symbol": {
       "type": "string",
       "example": "AAPL",
       "description": "NYSE/Nasdaq/AMEX ticker (AAPL, TSLA, NVDA, CRCL, SPY, …)."
      }
     }
    },
    "query": {
     "type": "object",
     "required": [
      "from",
      "to"
     ],
     "properties": {
      "to": {
       "type": "integer",
       "description": "Window end (Unix seconds)."
      },
      "from": {
       "type": "integer",
       "description": "Window start (Unix seconds)."
      },
      "session": {
       "enum": [
        "pre",
        "post",
        "on"
       ],
       "type": "string",
       "description": "Optional US market session."
      },
      "resolution": {
       "enum": [
        "1",
        "5",
        "15",
        "60",
        "240",
        "D",
        "W",
        "M"
       ],
       "type": "string",
       "default": "D",
       "description": "Bar resolution (TradingView convention): 1/5/15/60/240 min, D day, W week, M month."
      }
     }
    }
   }
  },
  "output": {
   "type": "object",
   "required": [
    "symbol",
    "resolution",
    "bars",
    "source"
   ],
   "properties": {
    "to": {
     "type": "integer"
    },
    "bars": {
     "type": "array",
     "items": {
      "type": "object",
      "required": [
       "t",
       "o",
       "h",
       "l",
       "c",
       "v"
      ],
      "properties": {
       "c": {
        "type": "number",
        "description": "Close"
       },
       "h": {
        "type": "number",
        "description": "High"
       },
       "l": {
        "type": "number",
        "description": "Low"
       },
       "o": {
        "type": "number",
        "description": "Open"
       },
       "t": {
        "type": "integer",
        "description": "Bar start (Unix seconds)"
       },
       "v": {
        "type": "number",
        "description": "Volume"
       }
      }
     }
    },
    "from": {
     "type": "integer"
    },
    "source": {
     "type": "string",
     "const": "pyth"
    },
    "symbol": {
     "type": "string",
     "example": "AAPL"
    },
    "resolution": {
     "type": "string",
     "example": "D"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockrun-us-stock-historical-ohlcv-6899f0cd/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from blockrun.ai](https://www.zero.xyz/host/blockrun.ai/llms.txt)
