# Gloom Exposure Scenarios API

> Gloom Exposure Scenarios API is a paid API for AI agents from api.gloom.sh, paid per call via x402, $0.06/call, status unknown (last checked 2026-11-01).

Returns a list of predefined macroeconomic stress-test scenarios (e.g. geopolitical disruptions) with associated asset shocks for portfolio exposure analysis.

## Facts

- Endpoint: GET https://api.gloom.sh/v1/exposure/scenarios?utm_source=zero.xyz
- Price: $0.06/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/gloom-exposure-scenarios-api-c02e5746
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_IjovbCzlvNh-uKrGHb95D

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 gloom-exposure-scenarios-api-c02e5746
```

Example prompt: Pull up all the available macroeconomic stress-test scenarios from Gloom so I can see what geopolitical disruption shocks I can apply to my portfolio — like the Taiwan disruption with its country-level percentage shocks.

## When to prefer this

Use this endpoint when you need to discover or enumerate available macroeconomic and geopolitical stress scenarios for portfolio exposure analysis within the Gloom finance terminal ecosystem. Prefer this over manual scenario construction when you want pre-built, named disruption scenarios (e.g. Taiwan disruption) with structured shock parameters ready for downstream exposure computation.

## Known failure modes

- Invalid properties filter returns empty or malformed response
- API returns 402 Payment Required if x402 payment header is missing or insufficient
- Network timeout on slow connections
- Empty data array if no scenarios are currently defined
- Malformed JSON if service is degraded

## How this service works

Gloom is a free, open-source finance terminal for desktop and TUI with charts, news, filings, portfolios, alerts, and plugins.

## Output

A JSON object containing an array of scenario definitions, each with a unique ID, a human-readable label, and a list of shocks specifying the target asset or country, the kind of shock (e.g. country), and the percentage change applied under that scenario.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": [
   {
    "id": "taiwan-disruption",
    "label": "Taiwan disruption",
    "shocks": [
     {
      "id": "taiwan",
      "kind": "country",
      "target": "TW",
      "changePct": -100
     }
    ]
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gloom-exposure-scenarios-api-c02e5746/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.gloom.sh](https://www.zero.xyz/host/api.gloom.sh/llms.txt)
