# AlphaLens Portfolio Risk Analysis

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

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

## Facts

- Endpoint: POST https://alphencook.vercel.app/api/portfolio?utm_source=zero.xyz
- Price: $0.2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/alphalens-portfolio-risk-analysis-fb55640c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xl9M_IPi-cMGpNls4-eQy

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

Example prompt: Can you run a risk analysis on my portfolio — I hold 40% AAPL, 25% NVDA, 20% MSFT, and 15% TSLA — and tell me how concentrated and risky that mix is?

## When to prefer this

Choose this endpoint when you need a holistic, AI-powered risk and diversification assessment of a multi-stock portfolio rather than analysis of a single stock. It is ideal for evaluating concentration risk, sector exposure, and overall portfolio health in one call, rather than aggregating individual stock analyses manually.

## Known failure modes

- Missing or empty holdings array returns a 400 validation error
- Invalid ticker symbols may result in incomplete or null data for those positions
- Payment failure on Base chain returns 402 before the request is processed
- Malformed position weights or missing size data may cause computation errors
- Server errors on the Vercel deployment return a 500 with success: false

## 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 flag and a data object containing portfolio risk scores, concentration metrics, diversification analysis, and AI-generated insights about the input holdings.

## 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-fb55640c/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)
