# Gloom Yield Curve API

> Gloom Yield Curve 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).

Fetches yield curve data (par rates by tenor) for a specified curve such as US Treasuries, returning points like 1M, 3M, 2Y, 10Y yields.

## Facts

- Endpoint: GET https://api.gloom.sh/v1/yield-curves/%7Bcurve%7D?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-yield-curve-api-b60c8a69
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_-9XT8lpW4P_2dTuBuZdyK

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-yield-curve-api-b60c8a69
```

Example prompt: Pull the current US Treasury yield curve from Gloom and show me the par yields across all tenors as of today.

## When to prefer this

Use this endpoint when you need structured, machine-readable yield curve data (par rates by tenor) for a named curve such as US Treasuries, especially when building fixed income analysis, macro dashboards, or monitoring yield curve shape. Prefer this over scraping financial sites when you need clean JSON with tenor-to-yield mappings. It is open-source and priced per-call at $0.06 USDC via x402, making it suitable for on-demand agent queries rather than bulk historical pulls.

## Known failure modes

- Invalid or unsupported curve ID returns an error or empty data
- Future or unavailable date returns null or error response
- Malformed curve path parameter causes 400/404
- Payment not completed (x402 flow) blocks data access
- Rate limiting or quota exceeded returns 402/429

## 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

Returns a JSON object with the curve metadata (id, basis, label, country), an asOf date, an optional requestedDate, and an array of points each containing a tenor label (e.g. '1M', '10Y'), years equivalent, and yield percentage. Example: 1M tenor at 4.04% yield.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "asOf": "2026-09-29",
   "curve": {
    "id": "us",
    "basis": "par",
    "label": "US Treasury",
    "country": "US"
   },
   "points": [
    {
     "tenor": "1M",
     "years": 0.0833333333333,
     "yield": 4.04
    }
   ],
   "requestedDate": null
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/gloom-yield-curve-api-b60c8a69/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)
