# Stock Trends Portfolio Comparison

> Stock Trends Portfolio Comparison is a paid API for AI agents from api.stocktrends.com, paid per call via x402, $1.25/call, status unknown (last checked 2026-09-13).

Compares two user-supplied portfolios using Stock Trends decision scoring, signal alignment, and market regime context to identify which portfolio is better positioned.

## Facts

- Endpoint: POST https://api.stocktrends.com/v1/portfolio/compare
- Price: $1.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-stocktrends-com-3ef0c47c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_e-6XQRi9CsFW3OuJyJAAg

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 api-stocktrends-com-3ef0c47c -d '<json body>'
```

Example prompt: Compare my two portfolios using Stock Trends decision scoring — Portfolio A holds AAPL, MSFT, and NVDA, and Portfolio B holds JPM, GS, and BAC — tell me which is better aligned with the current market regime and which has stronger trend signals.

## When to prefer this

Use this endpoint when you need a direct head-to-head comparison of two portfolios using Stock Trends' proprietary multi-decade classification framework. Prefer this over the single-portfolio evaluation endpoint when the user explicitly wants to contrast two sets of holdings. Ideal for rebalancing decisions, strategy comparisons, or evaluating a proposed portfolio against an existing one within the context of current market regime and trend signals.

## Known failure modes

- Invalid or unrecognized ticker symbols return an error indicating which symbols are unsupported
- Empty or malformed portfolio input returns a 400-level validation error
- Symbols with insufficient historical data may be excluded or flagged in results
- Payment failure via x402 returns a 402 response before processing
- Rate limiting may apply for high-frequency callers

## How this service works

Compares two user-supplied portfolios using Stock Trends decision scoring, alignment, and regime context.

## Output

Returns a side-by-side comparison of two portfolios with Stock Trends decision scores for each holding, signal alignment metrics, market regime context, and an overall comparative assessment indicating which portfolio is better positioned relative to current trend and regime conditions.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "left": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "symbol_exchange",
     "weight"
    ],
    "properties": {
     "weight": {
      "type": "number",
      "maximum": 1,
      "minimum": 0
     },
     "symbol_exchange": {
      "type": "string",
      "pattern": "^[A-Z0-9.]+-[A-Z]$"
     }
    },
    "additionalProperties": false
   }
  },
  "right": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "symbol_exchange",
     "weight"
    ],
    "properties": {
     "weight": {
      "type": "number",
      "maximum": 1,
      "minimum": 0
     },
     "symbol_exchange": {
      "type": "string",
      "pattern": "^[A-Z0-9.]+-[A-Z]$"
     }
    },
    "additionalProperties": false
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-stocktrends-com-3ef0c47c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.stocktrends.com](https://www.zero.xyz/host/api.stocktrends.com/llms.txt)
