v1.0.0
OpenAPI 3.1.0

BlueGamma API

Integrate real-time forward curve and swap rate data directly into your spreadsheets, treasury software, or pricing portfolios. Our API is developer-friendly, offering fast and reliable data access.

Why BlueGamma?

  • Specialized Data: Access forward curves and swap rates for multiple currencies and tenors to make timely, data-driven decisions.
  • Easy Integration: Designed for easy integration into existing systems.
  • Expert Support: Our experts are available to assist with your integration needs.

💡 Looking for more?
Visit our website to explore use cases and solutions.


🔗 Ready to get started?


Get your API key


Server:https://api.bluegamma.io/v1

Production server

Client Libraries

Swap Rates

Live and historical swap rate calculations, available tenors, and swap curve construction

Get Swap Rate

This endpoint calculates the swap rate based on the specified parameters.

View guide with examples →

Query Parameters
  • index
    Type: string · enum
    required

    The specific index (e.g., SOFR, 1M EURIBOR, 6M EURIBOR OR SONIA) on which the swap rate is based.

    The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).

    values
    • SOFR
    • Fed Funds
    • 1M USD-LIBOR
    • 3M USD-LIBOR
    • 6M USD-LIBOR
  • start_date
    required

    The start date for the swap. Provide either a specific date (e.g., '2025-12-31') or a tenor (e.g., '6M', '1Y'), but not both.

    • Type: string · Format: date

      A date in ISO 8601 only date format (YYYY-MM-DD)

  • maturity_date
    required

    The maturity date for the swap. Provide either a specific date (e.g., '2030-12-31') or a tenor (e.g., '1Y', '5Y'), but not both. Validation Requirements: - Maturity date must be in the future - Maturity date must be later than start date - If using a tenor, it represents the period from start date to maturity

    • Type: string · Format: date

      A date in ISO 8601 only date format (YYYY-MM-DD)

  • fixed_leg_frequency
    Type: string ·
    required

    The payment frequency for the fixed leg of the swap. Common values are '1M', '3M', '6M', '1Y'.

    Payment frequency for financial instruments

  • floating_leg_frequency
    Type: string ·

    The payment frequency for the floating leg of the swap. Common values are '1M', '3M', '6M', '1Y'. If not provided, the frequency defaults to match the fixed leg.

    Payment frequency for financial instruments

  • fixed_leg_day_count
    Type: string · enum

    The day count convention used for the fixed leg of the swap. By default, we use the currency-specific day count convention.

    Day count convention for interest rate and swap calculations

    values
    • Actual360
    • Actual365
    • Actual365Fixed
    • Thirty360BondBasis
    • Thirty360EuroBondBasis
    • Business252
  • floating_leg_day_count
    Type: string · enum

    The day count convention used for the floating leg of the swap. By default, we use the currency-specific day count convention.

    Day count convention for interest rate and swap calculations

    values
    • Actual360
    • Actual365
    • Actual365Fixed
    • Thirty360BondBasis
    • Thirty360EuroBondBasis
    • Business252
  • valuation_time
    Type: string · Format: date-time

    The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.

    A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.

Responses
  • application/json
  • application/json
  • application/json
  • 500

    Internal Server Error - An error occurred while processing the request.

Request Example for get/swap_rate
curl 'https://api.bluegamma.io/v1/swap_rate?index=SOFR&start_date=2D&maturity_date=1Y&fixed_leg_frequency=6M' \
  --header 'x-api-key: YOUR_SECRET_TOKEN'
{
  "index": "3M EURIBOR",
  "start_date": "2025-12-31",
  "maturity_date": "2025-12-31",
  "fixed_leg_first_payment_date": "2025-12-31",
  "floating_leg_first_payment_date": "2025-12-31",
  "floating_leg_frequency": "3M",
  "floating_leg_day_count": "Actual360",
  "fixed_leg_frequency": "6M",
  "fixed_leg_day_count": "Actual360",
  "valuation_time": "2024-01-01T15:00:00Z",
  "swap_rate": 3.34567803
}

Get Swap Curve

This endpoint returns a complete swap curve for a given index, calculating swap rates for all available tenors. It uses the predefined index configuration to automatically determine the appropriate day count conventions and frequencies, then fetches all available tenors from the database.

View guide with examples →

Query Parameters
  • index
    Type: string · enum
    required

    The name of the index for which to retrieve the swap curve.

    The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).

    values
    • SOFR
    • Fed Funds
    • 1M USD-LIBOR
    • 3M USD-LIBOR
    • 6M USD-LIBOR
  • valuation_time
    Type: string · Format: date-time

    The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.

    A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.

Responses
  • application/json
  • application/json
  • 404

    Not Found - No tenors available for the specified index or currency.

  • 422

    Unprocessable Entity - The provided index name is not found in the configuration.

  • 500

    Internal Server Error - An error occurred while processing the request.

Request Example for get/get_swap_curve
curl 'https://api.bluegamma.io/v1/get_swap_curve?index=SOFR' \
  --header 'x-api-key: YOUR_SECRET_TOKEN'
{
  "index_name": "SOFR",
  "start_date": "2025-12-31",
  "floating_leg_frequency": "12M",
  "floating_leg_day_count": "Actual360",
  "fixed_leg_frequency": "12M",
  "fixed_leg_day_count": "Actual360",
  "valuation_time": "2024-01-01T15:00:00Z",
  "swap_rates": [
    {
      "tenor": "1Y",
      "swap_rate": 2.45678901
    },
    {
      "tenor": "5Y",
      "swap_rate": 3.34567803
    },
    {
      "tenor": "10Y",
      "swap_rate": 3.87654321
    }
  ]
}

Get Historical Swap Rates

Returns historical swap rates for a given index and tenor over a date range (start_date to end_date).

View guide with examples →

Query Parameters
  • index
    Type: string · enum
    required

    The specific index (e.g., SOFR, 1M EURIBOR, 6M EURIBOR, SONIA) for the swap rates.

    The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).

    values
    • SOFR
    • Fed Funds
    • 1M USD-LIBOR
    • 3M USD-LIBOR
    • 6M USD-LIBOR
  • tenor
    Type: string · Pattern: ^[0-9]+[DWMY]$
    required

    The tenor for each swap rate (e.g., '1Y', '5Y').

    A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)

  • start_date
    Type: string · Format: date
    required

    The start date for the swap rates (inclusive). Provide a specific date (e.g., '2025-12-31').

    A date in ISO 8601 only date format (YYYY-MM-DD)

  • end_date
    Type: string · Format: date
    required

    The end date for the swap rates (inclusive). Provide a specific date (e.g., '2025-12-31').

    A date in ISO 8601 only date format (YYYY-MM-DD)

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • 500

    Internal Server Error - An error occurred while processing the request.

Request Example for get/historical_swap_rates
curl 'https://api.bluegamma.io/v1/historical_swap_rates?index=SOFR&tenor=5Y&start_date=2024-01-01&end_date=2024-12-31' \
  --header 'x-api-key: YOUR_SECRET_TOKEN'
{
  "index_name": "3M EURIBOR",
  "currency": "EUR",
  "fixed_leg_day_count": "Actual360",
  "floating_leg_day_count": "Actual360",
  "fixed_leg_frequency": "6M",
  "floating_leg_frequency": "3M",
  "swap_rates": [
    {
      "rate": 3.34567803,
      "date": "2024-06-01",
      "tenor": "1Y"
    }
  ]
}

Swap Pricer

Calculate the mark-to-market (MTM) value, fair rate, PV01, and detailed cashflows for an interest rate swap. Supports amortizing swaps with variable notional amounts.

View guide with examples →

When fixed_rate is omitted, the swap is valued at the fair (par) rate and mark-to-market is zero.

This endpoint provides comprehensive swap valuation including:

  • Fair swap rate calculation
  • Mark-to-market valuation
  • PV01 (dollar value of a basis point)
  • Detailed cashflow schedules for both fixed and floating legs
Body·
required
application/json
  • fixed_leg_frequency
    Type: string ·
    required

    Payment frequency for financial instruments

  • fixed_notionals
    required

    Notional amount(s). Provide a single number for vanilla swaps or a list for amortizing swaps.

    • Type: number Format: double

      Notional amount(s). Provide a single number for vanilla swaps or a list for amortizing swaps.

  • index
    Type: string · enum
    required

    The reference rate index (e.g., SOFR, 3M EURIBOR, SONIA). The full supported set is the Index enum, also served by GET /v1/indices.

    The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).

    values
    • SOFR
    • Fed Funds
    • 1M USD-LIBOR
    • 3M USD-LIBOR
    • 6M USD-LIBOR
  • maturity_date
    required
    • Type: string · Format: date

      A date in ISO 8601 only date format (YYYY-MM-DD)

  • start_date
    required
    • Type: string · Format: date

      A date in ISO 8601 only date format (YYYY-MM-DD)

  • fixed_leg_day_count
    • Type: string · enum

      The day count convention used for the fixed leg. By default, uses the currency-specific convention

      values
      • Actual360
      • Actual365
      • Actual365Fixed
      • Thirty360BondBasis
      • Thirty360EuroBondBasis
      • Business252
  • fixed_leg_first_payment_date
    Type: string Format: date

    The first payment date (e.g., '2026-08-02'). If not provided, defaults to start_date + fixed_leg_frequency adjusted for business days.

  • fixed_rate
    Type: number Format: double

    The fixed rate as a percentage (e.g., 4.25 for 4.25%). Optional; when omitted, the swap is valued at the fair rate and mark-to-market is zero.

  • valuation_time
    Type: string Format: date-time

    Valuation time in ISO 8601 format. Defaults to current time if not provided.

Responses
  • application/json
  • application/json
  • application/json
  • 500

    Internal Server Error - An error occurred while processing the request.

Request Example for post/swap_pricer
curl https://api.bluegamma.io/v1/swap_pricer \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: YOUR_SECRET_TOKEN' \
  --data '{
  "index": "SOFR",
  "start_date": "2025-01-15",
  "maturity_date": "2030-03-31",
  "fixed_leg_frequency": "6M",
  "fixed_rate": 4.25,
  "fixed_notionals": [
    100000000
  ]
}'
{
  "index": "SOFR",
  "currency": "USD",
  "start_date": "2025-01-15",
  "maturity_date": "2030-03-31",
  "fixed_leg_first_payment_date": "2025-07-15",
  "floating_leg_first_payment_date": "2025-07-15",
  "valuation_time": "2026-01-28T15:00:00Z",
  "timestamp": "2026-01-28T15:00:00Z",
  "fixed_leg_frequency": "6M",
  "floating_leg_frequency": "6M",
  "fixed_leg_day_count": "Actual360",
  "floating_leg_day_count": "Actual360",
  "fixed_rate": 4.25,
  "fair_rate": 3.87654,
  "mtm": -125430.5,
  "pv01": 42850.25,
  "fixed_cashflows": [
    {
      "period_start": "2025-01-15",
      "period_end": "2025-03-31",
      "notional": 100000000,
      "day_count_fraction": 0.2083,
      "rate": 4.25,
      "cashflow": 212500,
      "discount_factor": 0.9912,
      "present_value": 210630
    }
  ],
  "floating_cashflows": [
    {
      "period_start": "2025-01-15",
      "period_end": "2025-03-31",
      "notional": 100000000,
      "day_count_fraction": 0.2083,
      "rate": 4.25,
      "cashflow": 212500,
      "discount_factor": 0.9912,
      "present_value": 210630
    }
  ]
}

Get Available Swap Rate Tenors

Returns the list of available tenors for swap rates for a given index.

Query Parameters
  • index
    Type: string · enum
    required

    The specific index (e.g., SOFR, 1M EURIBOR, 6M EURIBOR, SONIA) for which to retrieve available swap rate tenors.

    The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).

    values
    • SOFR
    • Fed Funds
    • 1M USD-LIBOR
    • 3M USD-LIBOR
    • 6M USD-LIBOR
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • 500

    Internal Server Error - An error occurred while processing the request.

Request Example for get/swap_rate_tenors
curl 'https://api.bluegamma.io/v1/swap_rate_tenors?index=SOFR' \
  --header 'x-api-key: YOUR_SECRET_TOKEN'
{
  "index": "3M EURIBOR",
  "tenors": [
    "1Y",
    "2Y",
    "5Y",
    "10Y"
  ]
}

Forward & Discount Curves (Collapsed)

FX (Collapsed)

FX spot and forward rates, and real-time market data

Central Bank and Benchmark Rates (Collapsed)

Interest rate fixings, central bank rates, and benchmark rate data for financial calculations

Government Bonds (Collapsed)

Government bond yields and treasury rate calculations

Government Bonds Operations

Inflation (Collapsed)

Market-implied inflation rates derived from zero-coupon inflation swap curves

Inflation Operations

Swaptions (Collapsed)

European swaption pricing with live yield curves and normal volatility surface. Pricing, delta, DV01, and vega for payer and receiver swaptions.

Swaptions Operations

Caps & Floors (Collapsed)

Interest rate cap and floor pricing with caplet-level breakdowns and volatility smile options. Multi-strike and staggered-notional structures are supported via the POST endpoint.

Bonds (Collapsed)

Descriptive bond metadata and indicative pricing (not live market quotes).

Models