Fetching a Swap Curve

Use the /get_swap_curve endpoint to retrieve par swap rates across tenors for any supported index.

A swap curve shows par swap rates (fixed rates) across different maturities. When you request a swap rate:

  • You specify an index (e.g., 6M EURIBOR, SOFR, SONIA)

  • The API returns the fixed rate that makes the swap fair value at inception

  • The index determines what floating rate the swap is referenced against

Key Concept: The index represents the floating leg reference. The rate you receive is the fixed leg rate — this is what you'd pay (or receive) on the fixed side of a swap.


Example: EUR Swap Curve

For Euro swap curves, use 6M EURIBOR — the standard floating benchmark for EUR interest rate swaps:

import requests

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

params = {
    "index": "6M EURIBOR"
}

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

print(f"Index: {curve['index_name']}")
print(f"Start Date: {curve['start_date']}")
print(f"\nSwap Rates:")
for point in curve['swap_rates']:
    print(f"  {point['tenor']:>4}: {point['swap_rate']:.2f}%")

Example Output:


Understanding the Response

Field
Description

index_name

The floating rate index used

start_date

Settlement date for the swaps

floating_leg_frequency

Payment frequency of the floating leg

floating_leg_day_count

Day count convention for the floating leg

fixed_leg_frequency

Payment frequency of the fixed leg

fixed_leg_day_count

Day count convention for the fixed leg

swap_rates

Array of tenor/rate pairs

swap_rate

The par swap rate as a percentage


Visualizing the Curve

EUR 6M EURIBOR Swap Curve
EUR 6M EURIBOR swap curve showing par swap rates across tenors

Which Index for Which Currency?

Currency
Index
Description
Use Case

EUR

6M EURIBOR

6-Month Euro Interbank Offered Rate

Standard EUR interest rate swaps

EUR

ESTR

Euro Short-Term Rate

EUR overnight indexed swaps (OIS)

USD

SOFR

Secured Overnight Financing Rate

Standard USD swaps (post-LIBOR)

GBP

SONIA

Sterling Overnight Index Average

Standard GBP swaps

CHF

SARON

Swiss Average Rate Overnight

Standard CHF swaps

JPY

TONAR

Tokyo Overnight Average Rate

Standard JPY swaps

CAD

CORRA

Canadian Overnight Repo Rate Average

Standard CAD swaps

AUD

6M BBSW

6-Month Bank Bill Swap Rate

Standard AUD swaps

EUR Note: Most EUR interest rate swaps reference 6M EURIBOR on the floating leg. Use ESTR only if you specifically need overnight indexed swap (OIS) rates.


Historical Swap Curves

Add valuation_time to fetch the curve as of a past date:


Alternative: Fetch Individual Swap Rates

If you need more control over leg conventions, use the /swap_rate endpoint for individual tenors:

Response:


Swap Curves vs Government Bond Curves

A common question is: "What's the difference between a swap curve and a government bond curve?"

Swap Curve
Government Bond Curve

What it represents

Fixed rate in an interest rate swap

Yield on sovereign debt

Risk profile

Interbank/counterparty credit risk

Sovereign credit risk

Common use

Hedging floating-rate debt, derivatives pricing

Risk-free rate benchmark, credit spread basis

Typical spread

Swaps trade at a spread over government bonds

Considered the "risk-free" reference

Example Comparison (EUR):

Tenor
6M EURIBOR Swap Rate
German Bund Yield
Swap Spread

2Y

2.30%

2.19%

+11 bps

5Y

2.58%

2.50%

+8 bps

10Y

2.90%

2.90%

0 bps

💡 Tip: The swap spread (difference between swap rate and government bond yield) reflects credit and liquidity factors in the interbank market.


Complete Example: Building a Swap Curve DataFrame

Output:


See Also

Last updated