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.

Errors

  • Errors from BlueGamma return JSON with a detail message, e.g. {"detail": "Index 'NOTANINDEX' not found"}. A 422 for a missing or malformed parameter returns detail as a list of per-field errors instead.
  • Errors from the API gateway return message instead: a missing or invalid API key (403), a rate or daily quota limit (429), a crashed request (502) or one that ran past the 29-second limit (504).
  • Each endpoint lists the status codes it can return.

Rate limits

  • Keys from the API dashboard allow 5 requests/second, with bursts up to 20. For higher limits, contact sales.
  • Successful responses carry a RateLimit-Policy header stating the key's limits, in the IETF RateLimit header format, e.g. "limited";q=5;w=1 (q requests per w seconds). It is best-effort: treat a response without it as unchanged limits.
  • Going over the limit returns 429 with Retry-After: 1.

💡 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.

Market-standard quote (recommended): call with just index, start_date and maturity_date. When fixed_leg_frequency is omitted, both leg frequencies and any unset day counts are taken from the index's market-standard conventions, so the result matches the standard on-screen quote for that index. Pass SPOT as the start date to start at the index's spot date.

Passing fixed_leg_frequency (and optionally the other convention parameters) prices a custom swap with exactly those conventions instead. The response always echoes the conventions that were used.

View guide with examples →

Query Parameters

  • 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
    • 6M EURIBOR
    • 3M EURIBOR
    • 1M EURIBOR
  • The start date for the swap. Provide a specific date (e.g., '2025-12-31'), a tenor (e.g., '6M', '1Y'), or 'SPOT' for the index's spot start date.

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

  • 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

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

  • The payment frequency for the fixed leg of the swap. Common values are '1M', '3M', '6M', '1Y'. Omit to quote at the index's market-standard conventions (recommended).

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

  • 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.

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

  • 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
    Actual360Actual365Actual365FixedThirty360BondBasisThirty360EuroBondBasisBusiness252
  • 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
    Actual360Actual365Actual365FixedThirty360BondBasisThirty360EuroBondBasisBusiness252
  • 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 valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.

    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
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/swap_rate
curl 'https://api.bluegamma.io/v1/swap_rate?index=SOFR&start_date=SPOT&maturity_date=1Y&fixed_leg_frequency=6M&floating_leg_frequency=1Y&fixed_leg_day_count=Actual360&floating_leg_day_count=Actual360&valuation_time=2024-01-01T15%3A00%3A00Z' \
  --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
}

Batch Swap Rates

​

Prices many swap rates in one request: calls GET /v1/swap_rate once per item and returns the results in input order. Items may mix indices and valuation times. Up to 50 items per request.

Each item is validated, access-checked and priced exactly as the equivalent GET request would be. A failing item does not fail the request: its entry in results carries the status code and error detail that GET would have returned, and every other item is still priced. The request itself only fails (4xx) for authentication, a malformed body, or more than 50 items.

Body

required
application/json
  • Properties: 8

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/swap_rate/batch
curl https://api.bluegamma.io/v1/swap_rate/batch \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: YOUR_SECRET_TOKEN' \
  --data '{
  "items": [
    {
      "index": "SOFR",
      "start_date": "SPOT",
      "maturity_date": "5Y"
    }
  ]
}'
{
  "results": [
    {
      "status": 200,
      "data": {
        "index": "SOFR",
        "start_date": "2026-09-23",
        "maturity_date": "2031-09-23",
        "fixed_leg_frequency": "1Y",
        "swap_rate": 3.41250113
      }
    }
  ]
}

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

  • 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
    • 6M EURIBOR
    • 3M EURIBOR
    • 1M EURIBOR
  • 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 valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.

    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
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/get_swap_curve
curl 'https://api.bluegamma.io/v1/get_swap_curve?index=SOFR&valuation_time=2024-01-01T15%3A00%3A00Z' \
  --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

  • 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
    • 6M EURIBOR
    • 3M EURIBOR
    • 1M EURIBOR
  • 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)

  • 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)

  • 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
  • application/json
  • application/json
  • application/json
  • application/json
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
  • A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)

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

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

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

    values
    • SOFR
    • Fed Funds
    • 1M USD-LIBOR
    • 3M USD-LIBOR
    • 6M USD-LIBOR
    • 6M EURIBOR
    • 3M EURIBOR
    • 1M EURIBOR
    • A date in ISO 8601 only date format (YYYY-MM-DD)

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

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

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

  • 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 in ISO 8601 format. Defaults to current time if not provided.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
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

  • 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
    • 6M EURIBOR
    • 3M EURIBOR
    • 1M EURIBOR

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
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