> 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-forward-starting-swap-rates.md).

# Fetching Forward Starting Swap Rates

A forward starting swap is an interest rate swap where the effective date is set in the future rather than starting immediately (spot). This allows hedging of future interest rate exposure.

***

## Basic Example

Use `0D` for spot, or a tenor like `6M`, `1Y` for forward starts:

```python
import requests

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

params = {
    "index": "6M EURIBOR",
    "start_date": "1Y",           # Forward start in 1 year
    "maturity_date": "5Y",        # 5 year swap from start
    "fixed_leg_frequency": "6M"
}

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

```bash
curl -X GET "https://api.bluegamma.io/v1/swap_rate?index=6M%20EURIBOR&start_date=1Y&maturity_date=5Y&fixed_leg_frequency=6M" \
  -H "x-api-key: your_api_key_here"
```

**Response:**

```json
{
  "index": "6M EURIBOR",
  "start_date": "2027-01-14",
  "maturity_date": "2032-01-14",
  "fixed_leg_first_payment_date": "2027-07-14",
  "floating_leg_first_payment_date": "2027-07-14",
  "floating_leg_frequency": "6M",
  "floating_leg_day_count": "Actual360",
  "fixed_leg_frequency": "6M",
  "fixed_leg_day_count": "Actual360",
  "swap_rate": 2.6083
}
```

***

## Using Specific Dates

You can also specify exact dates:

```python
params = {
    "index": "6M EURIBOR",
    "start_date": "2026-06-15",      # Specific forward start
    "maturity_date": "2031-06-15",   # Specific maturity
    "fixed_leg_frequency": "6M"
}
```

```bash
curl -X GET "https://api.bluegamma.io/v1/swap_rate?index=6M%20EURIBOR&start_date=2026-06-15&maturity_date=2031-06-15&fixed_leg_frequency=6M" \
  -H "x-api-key: your_api_key_here"
```

***

## Fetching Multiple Forward Starts with asyncio

Use `asyncio` to fetch multiple forward starting rates efficiently:

```python
import asyncio
import aiohttp

API_KEY = "your_api_key"
BASE_URL = "https://api.bluegamma.io/v1"

async def fetch_swap_rate(session, start_date, maturity):
    params = {
        "index": "6M EURIBOR",
        "start_date": start_date,
        "maturity_date": maturity,
        "fixed_leg_frequency": "6M"
    }
    async with session.get(f"{BASE_URL}/swap_rate", params=params) as resp:
        data = await resp.json()
        return start_date, maturity, data.get("swap_rate")

async def main():
    headers = {"x-api-key": API_KEY}
    forward_starts = ["0D", "3M", "6M", "1Y", "2Y", "3Y"]
    maturities = ["5Y", "7Y", "10Y"]
    
    async with aiohttp.ClientSession(headers=headers) as session:
        tasks = [
            fetch_swap_rate(session, fwd, mat)
            for fwd in forward_starts
            for mat in maturities
        ]
        results = await asyncio.gather(*tasks)
    
    return results

results = asyncio.run(main())
```

**Results (6M EURIBOR, Jan 2026):**

| Forward Start | 5Y Swap | 7Y Swap | 10Y Swap |
| ------------- | ------- | ------- | -------- |
| 0D (Spot)     | 2.4491% | 2.5925% | 2.7751%  |
| 3M            | 2.4864% | 2.6277% | 2.8069%  |
| 6M            | 2.5245% | 2.6641% | 2.8388%  |
| 1Y            | 2.6083% | 2.7424% | 2.9062%  |
| 2Y            | 2.7687% | 2.8896% | 3.0329%  |
| 3Y            | 2.9121% | 3.0181% | 3.1417%  |

<figure><img src="/files/jwRtATsi6YJHE4D0zun3" alt="Forward starting swap rates increasing with longer forward starts"><figcaption><p>Forward starting rates increase with the forward start period due to the upward sloping curve</p></figcaption></figure>

***

## Parameters

| Parameter             | Required | Description                                                |
| --------------------- | -------- | ---------------------------------------------------------- |
| `index`               | Yes      | Interest rate index (e.g., `6M EURIBOR`, `SOFR`, `SONIA`)  |
| `start_date`          | Yes      | `0D` for spot, or tenor (`6M`, `1Y`) / date (`2026-06-15`) |
| `maturity_date`       | Yes      | Swap tenor (`5Y`, `10Y`) or specific date                  |
| `fixed_leg_frequency` | Yes      | Payment frequency (`6M`, `1Y`)                             |
| `valuation_time`      | No       | Historical timestamp (ISO 8601)                            |

***

🧠 **Tips**

* `maturity_date` is the swap tenor from the `start_date`, not from today
* `start_date` and `maturity_date` accept tenors (`6M`, `1Y`) or ISO dates (`2026-06-15`)
* Use `valuation_time` to get historical forward starting rates

***

**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-forward-starting-swap-rates.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.
