# AlphaLens Stock History API

> AlphaLens Stock History API is a paid API for AI agents from alphencook.vercel.app, paid per call via x402, $0.03/call, status unknown (last checked 2026-10-11).

Retrieves historical price and trading data for a given stock symbol

## Facts

- Endpoint: POST https://alphencook.vercel.app/api/history?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/alphalens-stock-history-api-1a011fff
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oFklEHR4YRgtM5BfKrlFr

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 alphalens-stock-history-api-1a011fff -d '<json body>'
```

Example prompt: Pull the historical price data for AAPL using AlphaLens so I can see how the stock has traded over time.

## When to prefer this

Choose this endpoint when you need historical price or trading data for a specific stock ticker and want a pay-per-use model billed in USDC on Base chain with no subscription required. It fits best in agentic workflows that need on-demand stock history without committing to a recurring data subscription.

## Known failure modes

- Invalid or unrecognized stock symbol returns failure or empty data
- Missing required 'symbol' field causes request validation error
- Network or upstream data provider outage returns 500-level error
- Delisted or obscure ticker symbols may return no historical data
- Payment failure on Base chain blocks the request before processing

## How this service works

AI-powered stock analysis, technical indicators, sentiment scoring, and portfolio risk. 11 endpoints. Pay per request via x402 on Base chain.

## Output

Returns a success flag and a data object containing historical price and trading information for the requested stock symbol, likely including OHLCV (open, high, low, close, volume) records over time.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "symbol"
 ],
 "properties": {
  "symbol": {
   "type": "string",
   "description": "symbol"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "success"
 ],
 "properties": {
  "data": {
   "type": "object"
  },
  "success": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/alphalens-stock-history-api-1a011fff/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from alphencook.vercel.app](https://www.zero.xyz/host/alphencook.vercel.app/llms.txt)
