# AlphaLens Stock History API

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

Retrieves historical price and trading data for a given stock symbol

## Facts

- Endpoint: POST https://alphacook.vercel.app/api/history
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/alphalens-stock-history-api-a3037c0e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EjQSUiSwpARDP0f6l69Il

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-a3037c0e -d '<json body>'
```

Example prompt: Can you pull up the historical price data for NVDA so I can see how it's been trading?

## When to prefer this

Use this endpoint when you need historical price or trading data for a specific stock ticker, especially for backtesting, charting, or trend analysis. Prefer this over real-time quote endpoints when you need past performance data rather than current prices.

## Known failure modes

- Invalid or unknown stock symbol returns error or empty data
- Missing required 'symbol' field returns validation error
- Network timeout or upstream data provider unavailable
- Payment failure via x402 results in 402 response before data is returned
- Symbol for delisted or non-existent stock may return empty history

## 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 boolean and a data object containing historical price and trading information for the requested stock symbol, such as 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-a3037c0e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from alphacook.vercel.app](https://www.zero.xyz/host/alphacook.vercel.app/llms.txt)
