# x402stock Options OHLCV Historical Bars

> x402stock Options OHLCV Historical Bars is a paid API for AI agents from agents.x402stock.xyz, paid per call via MPP, $0.02/call, status unknown (last checked 2026-09-12).

Returns historical OHLCV price bars for a single options contract over a specified date range at configurable timespans and multipliers.

## Facts

- Endpoint: GET https://agents.x402stock.xyz/api/v1/options-aggregates/{contract}
- Price: $0.02/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-09-12
- Activations on Zero: 0
- Provider: agents.x402stock.xyz
- Website: https://agents.x402stock.xyz
- Canonical page: https://www.zero.xyz/c/agents-x402stock-xyz-x402stock-options-ohlcv-historical-bars-49100778
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pLWDaTBgeo-L8GlYLccdJ

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-options-ohlcv-historical-bars-49100778
```

Example prompt: Pull daily OHLCV bars for the AAPL June 2026 $150 call option (ticker O:AAPL260620C00150000) from January 1 2025 to June 30 2025, sorted ascending, up to 5000 bars.

## When to prefer this

Use this endpoint when you need historical price bar data for a specific, named options contract in OCC/Polygon format. It is ideal for backtesting single-contract options strategies, charting price history, or analyzing volume patterns around events. Prefer this over stock OHLCV endpoints when the asset is specifically an options contract, and over options snapshot endpoints when you need a time series rather than current state.

## Known failure modes

- Invalid or malformed contract ticker (e.g. missing O: prefix) returns an error or empty result
- Date range with no trading data for the contract (expired or not yet active) returns zero bars
- Exceeding the limit of 50000 bars silently truncates or returns an error
- Invalid timespan enum value returns a validation error
- from date after to date returns an error or empty dataset
- Payment failure (insufficient USDC balance) results in 402 response before data is returned

## How this service works

Historical OHLCV price bars for one option contract over any date range. Pass the option contract ticker in the path (e.g. O:AAPL260620C00150000) and tune ?multiplier=, ?timespan=minute|hour|day|week|month, ?from= and ?to= (optional; default to the trailing year), ?adjusted=, ?sort=, and ?limit=. Use for backtesting or charting a single option's price history. From x402stock

## Output

A JSON object containing the option contract ticker, an array of OHLCV bars (each with open, high, low, close, volume, VWAP, trade count, and timestamp), the total bar count, adjustment status, and an as_of timestamp indicating data freshness. The source field confirms data origin as x402stock.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "contract"
 ],
 "properties": {
  "to": {
   "type": "string",
   "default": "2026-07-31",
   "minLength": 1
  },
  "from": {
   "type": "string",
   "default": "2025-07-31",
   "minLength": 1
  },
  "sort": {
   "enum": [
    "asc",
    "desc"
   ],
   "type": "string",
   "default": "asc"
  },
  "limit": {
   "type": "integer",
   "default": 5000,
   "maximum": 50000,
   "exclusiveMinimum": 0
  },
  "adjusted": {
   "type": "boolean",
   "default": true
  },
  "contract": {
   "type": "string",
   "description": "Option contract ticker (OCC/Polygon format), e.g. O:AAPL260620C00150000."
  },
  "timespan": {
   "enum": [
    "minute",
    "hour",
    "day",
    "week",
    "month",
    "quarter",
    "year"
   ],
   "type": "string",
   "default": "day"
  },
  "multiplier": {
   "type": "integer",
   "default": 1,
   "maximum": 50000,
   "exclusiveMinimum": 0
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "ticker",
  "data",
  "source",
  "as_of"
 ],
 "properties": {
  "data": {
   "type": "object",
   "required": [
    "bars",
    "count"
   ],
   "properties": {
    "bars": {
     "type": "array",
     "items": {
      "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
     }
    },
    "count": {
     "type": "number"
    },
    "adjusted": {
     "type": "boolean"
    }
   },
   "additionalProperties": false
  },
  "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-options-ohlcv-historical-bars-49100778/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)
