# AlphaLens Portfolio Risk Analysis

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

Analyzes a portfolio of stock holdings to compute risk metrics, diversification scores, and AI-powered portfolio-level insights

## Facts

- Endpoint: POST https://alphacook.vercel.app/api/portfolio
- Price: $0.2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/alphalens-portfolio-risk-analysis-ae0b1519
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9v-4snqezPWLyEk3hVvsN

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-portfolio-risk-analysis-ae0b1519 -d '<json body>'
```

Example prompt: Can you analyze the risk of my portfolio? I hold 40% AAPL, 30% NVDA, 20% MSFT, and 10% TSLA — give me an AI-powered breakdown of concentration risk and overall portfolio health.

## When to prefer this

Use this endpoint when you need to evaluate overall portfolio-level risk across multiple stock holdings simultaneously, rather than analyzing a single stock in isolation. Prefer this over individual stock analysis endpoints when the user wants diversification, concentration, or composite risk metrics across their entire investment mix.

## Known failure modes

- Missing or empty holdings array returns validation error
- Malformed holdings entries may cause computation failure
- Payment failure via x402 on Base chain returns 402 status
- Invalid ticker symbols in holdings may yield partial or null results
- Network timeout on Vercel serverless cold start

## 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 JSON object with a success boolean and a data object containing AI-powered portfolio risk metrics, including concentration analysis, diversification scores, and other risk indicators derived from the submitted holdings array.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "holdings"
 ],
 "properties": {
  "holdings": {
   "type": "array",
   "description": "holdings"
  }
 }
}
```

## 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-portfolio-risk-analysis-ae0b1519/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)
