> For the complete documentation index, see [llms.txt](https://bluegamma.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bluegamma.io/documentation/integrations/api/how-to-guides/fetching-an-inflation-curve.md).

# Fetching Inflation Curves

The `/inflation_curve` endpoint returns zero-coupon inflation rates for tenors from 1Y to 50Y, derived from inflation swap market data. Use this when you need to **price inflation-linked instruments**, calculate **real rates**, or analyse **breakeven inflation**.

***

## When to Use Inflation Curves

| Use Case                           | Why Inflation Curves?                                        |
| ---------------------------------- | ------------------------------------------------------------ |
| **Real rate calculation**          | Subtract inflation from nominal swap rates to get real rates |
| **Inflation-linked bond analysis** | Price or value index-linked gilts and linkers                |
| **Breakeven inflation**            | Compare implied inflation expectations across tenors         |
| **Inflation hedging**              | Size and value inflation swap positions                      |

***

## Basic Example

```python
import requests

url = "https://api.bluegamma.io/v1/inflation_curve"
headers = {"x-api-key": "your_api_key"}

params = {
    "index": "UK RPI"
}

response = requests.get(url, headers=headers, params=params)
data = response.json()

for point in data["rates"]:
    print(f"{point['tenor']}: {point['zc_rate']:.2f}%")
```

```bash
curl -X GET "https://api.bluegamma.io/v1/inflation_curve?index=UK%20RPI" \
  -H "x-api-key: your_api_key_here"
```

**Response:**

```json
{
  "index": "UK RPI",
  "discount_index": "SONIA",
  "rates": [
    {"tenor": "1Y", "zc_rate": 4.96},
    {"tenor": "2Y", "zc_rate": 4.32},
    {"tenor": "3Y", "zc_rate": 4.12},
    {"tenor": "5Y", "zc_rate": 3.76},
    {"tenor": "10Y", "zc_rate": 3.44},
    {"tenor": "20Y", "zc_rate": 3.35},
    {"tenor": "30Y", "zc_rate": 3.31},
    {"tenor": "50Y", "zc_rate": 3.36}
  ],
  "timestamp": "2026-04-16"
}
```

| Field            | Description                                         |
| ---------------- | --------------------------------------------------- |
| `rates`          | Array of zero-coupon inflation rate points by tenor |
| `zc_rate`        | The zero-coupon inflation rate as a percentage      |
| `tenor`          | The maturity point on the curve (1Y to 50Y)         |
| `discount_index` | The nominal rate index used for discounting         |
| `timestamp`      | When the underlying market data was captured        |

{% hint style="info" %}
**Full curve:** The API returns rates for every year from 1Y to 50Y. The response above is abbreviated for clarity.
{% endhint %}

***

## Use Case: Calculating Real Rates

Subtract the implied inflation rate from nominal swap rates to get the real rate at each tenor:

```python
import requests

headers = {"x-api-key": "your_api_key"}

# Fetch the nominal SONIA swap curve
swap_response = requests.get(
    "https://api.bluegamma.io/v1/get_swap_curve",
    headers=headers,
    params={"index": "SONIA"}
)
swap_curve = {p["tenor"]: p["swap_rate"] for p in swap_response.json()["curve"]}

# Fetch the UK RPI inflation curve
inflation_response = requests.get(
    "https://api.bluegamma.io/v1/inflation_curve",
    headers=headers,
    params={"index": "UK RPI"}
)
inflation_curve = {p["tenor"]: p["zc_rate"] for p in inflation_response.json()["rates"]}

# Calculate real rates for common tenors
for tenor in ["2Y", "5Y", "10Y", "20Y", "30Y"]:
    if tenor in swap_curve and tenor in inflation_curve:
        real_rate = swap_curve[tenor] - inflation_curve[tenor]
        print(f"{tenor}: Nominal {swap_curve[tenor]:.2f}% - Inflation {inflation_curve[tenor]:.2f}% = Real {real_rate:.2f}%")
```

***

## Use Case: Comparing UK and Eurozone Inflation

```python
import requests

headers = {"x-api-key": "your_api_key"}
url = "https://api.bluegamma.io/v1/inflation_curve"

uk_rpi = requests.get(url, headers=headers, params={"index": "UK RPI"}).json()
eu_hicp = requests.get(url, headers=headers, params={"index": "EU HICP"}).json()

uk_rates = {p["tenor"]: p["zc_rate"] for p in uk_rpi["rates"]}
eu_rates = {p["tenor"]: p["zc_rate"] for p in eu_hicp["rates"]}

for tenor in ["1Y", "2Y", "5Y", "10Y", "30Y"]:
    spread = uk_rates[tenor] - eu_rates[tenor]
    print(f"{tenor}: UK RPI {uk_rates[tenor]:.2f}% | EU HICP {eu_rates[tenor]:.2f}% | Spread {spread:+.0f}bps")
```

**Output (April 2026):**

```
1Y: UK RPI 4.96% | EU HICP 3.20% | Spread +176bps
2Y: UK RPI 4.32% | EU HICP 2.68% | Spread +164bps
5Y: UK RPI 3.76% | EU HICP 2.28% | Spread +148bps
10Y: UK RPI 3.44% | EU HICP 2.22% | Spread +121bps
30Y: UK RPI 3.31% | EU HICP 2.35% | Spread +96bps
```

UK implied inflation runs 100-175bps above Eurozone across the curve, with the spread narrowing at longer tenors.

***

## Current Inflation Curves (April 2026)

| Tenor | UK RPI | EU HICP |
| ----- | ------ | ------- |
| 1Y    | 4.96%  | 3.20%   |
| 2Y    | 4.32%  | 2.68%   |
| 3Y    | 4.12%  | 2.48%   |
| 5Y    | 3.76%  | 2.28%   |
| 7Y    | 3.55%  | 2.22%   |
| 10Y   | 3.44%  | 2.22%   |
| 15Y   | 3.38%  | 2.26%   |
| 20Y   | 3.35%  | 2.28%   |
| 30Y   | 3.31%  | 2.35%   |
| 50Y   | 3.36%  | 2.55%   |

***

## Parameters

| Parameter        | Required | Description                                         |
| ---------------- | -------- | --------------------------------------------------- |
| `index`          | Yes      | Inflation index: `UK RPI` or `EU HICP`              |
| `valuation_time` | No       | Historical timestamp (ISO 8601) for reproducibility |

***

## Supported Indices

| Index     | Region         | Discount Index | Description                         |
| --------- | -------------- | -------------- | ----------------------------------- |
| `UK RPI`  | United Kingdom | SONIA          | Retail Prices Index                 |
| `EU HICP` | Eurozone       | 6M EURIBOR     | Harmonised Index of Consumer Prices |

***

## Reproducibility with `valuation_time`

Lock in the inflation curve at a specific point in time:

```python
params = {
    "index": "UK RPI",
    "valuation_time": "2026-03-31T16:00:00Z"
}

response = requests.get(url, headers=headers, params=params)
```

```bash
curl -X GET "https://api.bluegamma.io/v1/inflation_curve?index=UK%20RPI&valuation_time=2026-03-31T16%3A00%3A00Z" \
  -H "x-api-key: your_api_key_here"
```

***

## Related Endpoints

| If you need...             | Use                                                                                               |
| -------------------------- | ------------------------------------------------------------------------------------------------- |
| Nominal swap rates         | [`/get_swap_curve`](/documentation/integrations/api/how-to-guides/fetching-a-swap-curve.md)       |
| Government bond yields     | [`/gov_yield`](/documentation/integrations/api/how-to-guides/fetching-a-government-bond-curve.md) |
| Forward rates              | [`/forward_curve`](/documentation/integrations/api/how-to-guides/getting-a-forward-curve.md)      |
| Zero rates for discounting | [`/zero_rate`](/documentation/integrations/api/how-to-guides/fetching-zero-rates.md)              |

***

**Need an API key?** 📩 <support@bluegamma.io> | 📅 [Book a call](https://app.lemcal.com/@alivohra/website-demo?back=1)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bluegamma.io/documentation/integrations/api/how-to-guides/fetching-an-inflation-curve.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
