Macro and positioning

# Yield curves and macro series

Economic series observations, scheduled releases and government yield curves by date

4 endpoints From 1 credit

## Try it

**curl**

```
curl https://api.gloom.sh/v1/macro/curves \
  -H "Authorization: Bearer $GLOOM_DATASETS_KEY"
```

**Python**

```
import os
import requests

response = requests.get(
    "https://api.gloom.sh/v1/macro/curves",
    headers={"Authorization": f"Bearer {os.environ['GLOOM_DATASETS_KEY']}"},
)
response.raise_for_status()
print(response.json())
```

**TypeScript**

```
const response = await fetch(
  "https://api.gloom.sh/v1/macro/curves",
  { headers: { Authorization: `Bearer ${process.env.GLOOM_DATASETS_KEY}` } },
)
if (!response.ok) throw new Error(await response.text())
console.log(await response.json())
```

Response

```
{
  "data": {
    "curves": [
      {
        "curve": {
          "id": "us",
          "label": "US Treasury",
          "country": "US",
          "basis": "par",
          "couponsPerYear": 2
        },
        "asOf": "2026-09-29",
        "points": [
          {
            "tenor": "1M",
            "years": 0.0833333333333,
            "yield": 4.04
          },
          {
            "tenor": "6W",
            "years": 0.125,
            "yield": 4.14
          },
          // … 12 more items
        ],
        "previous": null,
        "checkedAt": "2026-09-30T12:00:00.000Z"
      }
    ]
  },
  "meta": {
    "dataset": "macro",
    "requestId": "sample-request",
    "asOf": null,
    "dataThrough": "2026-09-29",
    "historyStart": null,
    "updatedAt": "2026-09-30T12:00:00.000Z",
    "page": null,
    "next": null,
    "coverage": {
      "curves": 1
    },
    "source": [
      {
        "attribution": "Government and central bank publications"
      },
      {
        "attribution": "Government and economic data providers"
      },
      // … 1 more items
    ]
  }
}
```

Trimmed · 2026-09-29

[Run it without a key: `GET /v1/datasets/macro/sample`](https://api.gloom.sh/v1/datasets/macro/sample)

## Endpoints

**GET `/v1/macro/curves` 1 credit (Government yield curves by country)**

### Parameters

No parameters.

**GET `/v1/macro/curves/{curve}` 2 credits (Yield curve with dated lookbacks, spreads and ranked moves)**

### Parameters

- **`curve` string required**: `us` `us-real` `us-breakeven` `eu-aaa` `de` `gb` `jp` `ca`
- **`date` string**: Calendar date: `YYYY-MM-DD`.

**GET `/v1/macro/series/{seriesId}` 2 credits (Stored economic series observations and metadata)**

### Parameters

- **`seriesId` string required**
- **`from` string**: Calendar date: `YYYY-MM-DD`.
- **`to` string**: Calendar date: `YYYY-MM-DD`.
- **`limit` integer**: 1 to 1000.
- **`sortOrder` string**: `asc` `desc`

`from` must be on or before `to`.

**GET `/v1/macro/calendar` 1 credit (Economic releases, forecasts and reported actuals)**

### Parameters

No parameters.

## Good to know

`/macro/curves/{curve}` `moves`: each tenor's 1D and 1W change in percentage points, ranked by size against every move of that horizon since `since` (midrank percentile, 0 to 100; null under 250 moves).

## Sources

Government and central bank publications, Government and economic data providers, Public economic release calendars

Use subject to [Gloom Datasets terms](https://gloom.sh/datasets/terms).

[Errors](https://gloom.sh/datasets/docs/errors) 304 · 400 · 401 · 402 · 403 · 404 · 429 · 503

- [Previous Congress trades](https://gloom.sh/datasets/docs/datasets/congress)
- [Next Central bank rates](https://gloom.sh/datasets/docs/datasets/central-bank-rates)
