For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Reference

Full reference for every BlueGamma REST API endpoint: parameters, example requests and responses for swap rates, curves, discount factors, FX, fixings, bonds, caps and swaptions.

Parameters, example requests and responses for every BlueGamma REST API endpoint. To call them you need an API key: issue one in the app, or see Authentication.


Get Swap Rate

get

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.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
start_dateone ofRequired

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.

Example: SPOT
string · dateOptional

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

Example: 2025-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
or
const: SPOTOptional

The index's spot start date (settlement-lagged from the valuation date).

maturity_dateone ofRequired

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

Example: 2D
string · dateOptional

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

Example: 2030-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
fixed_leg_frequencystringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
floating_leg_frequencystringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
fixed_leg_day_countstring · enumOptional

Day count convention for interest rate and swap calculations

Example: Actual360Possible values:
floating_leg_day_countstring · enumOptional

Day count convention for interest rate and swap calculations

Example: Actual360Possible values:
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of calculated swap rate data.

application/json
get/swap_rate
GET /v1/swap_rate?index=SOFR&start_date=SPOT&maturity_date=2D HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "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

post

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.

Authorizations
x-api-keystringRequired

API token required for authentication

Body
Responses
200

One result per item, in the order the items were sent.

application/json
post/swap_rate/batch
POST /v1/swap_rate/batch HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "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

get

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.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of complete swap curve data for all available tenors.

application/json
get/get_swap_curve
GET /v1/get_swap_curve?index=SOFR HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "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 Forward Rate

get

Fetches the forward rate based on the specified parameters, including reference rate, start date, end date and optional valuation time.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
start_dateone ofRequired

The start date for the forward rate calculation. Provide either a specific date (e.g., '2025-12-31') or a tenor (e.g., '1Y', '5Y'), but not both. Validation Requirements: - Start date must be later than valuation time - If using a tenor, it represents the period from valuation time to start date

Example: 2D
string · dateOptional

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

Example: 2025-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
end_dateone ofRequired

The end date for the forward period. Provide either a specific date (e.g., '2026-03-31') or a tenor (e.g., '1M', '3M'), but not both.

Example: 2D
string · dateOptional

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

Example: 2025-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of forward curve data.

application/json
get/forward_rate
GET /v1/forward_rate?index=SOFR&start_date=2D&end_date=2D HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "SOFR",
  "start_date": "2025-12-31",
  "end_date": "2025-12-31",
  "valuation_time": "2024-01-01T15:00:00Z",
  "forward_rate": 2.986345445
}

Get Forward Rates

post

Returns the forward rate for a list of interest periods in a single call, all priced off one curve snapshot.

Each rate is the annualized simple rate for its entire period, in the index's own day count convention: apply it once as rate × days/360 (or days/365 for indices quoted Actual/365, such as SONIA). Do not compound it again — for overnight indices, daily compounding within the period is already embedded. For a period whose start date is in the past, published fixings are compounded up to today and chained with curve forwards for the remainder.

This is the batch equivalent of /forward_rate — use it to price a whole schedule, including stubs and broken periods, in one request. Periods can be any length and do not need to be contiguous or sorted; results are returned in input order. For an evenly-spaced rolling forward curve, see /forward_curve.

Authorizations
x-api-keystringRequired

API token required for authentication

Body
indexstring · enumRequired

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

Example: SOFRPossible values:
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of forward rates.

application/json
post/forward_rates
POST /v1/forward_rates HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 225

{
  "index": "SARON",
  "valuation_time": "2026-07-21T08:00:00Z",
  "periods": [
    {
      "start_date": "2026-10-15",
      "end_date": "2027-01-15"
    },
    {
      "start_date": "2027-01-15",
      "end_date": "2027-04-15"
    },
    {
      "start_date": "2027-01-15",
      "end_date": "2027-02-03"
    }
  ]
}
{
  "index": "SARON",
  "valuation_time": "2024-01-01T15:00:00Z",
  "rates": [
    {
      "start_date": "2025-12-31",
      "end_date": "2025-12-31",
      "forward_rate": 0.016756
    }
  ]
}

Get Discount Factor

get

Fetches the discount factor based on the specified parameters, including reference rate, date and optional valuation time.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
dateone ofRequired

The date for the discount factor calculation. Provide either a specific date (e.g., '2025-12-31') or a tenor (e.g., '1Y', '5Y'), but not both.

Example: 2D
string · dateOptional

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

Example: 2025-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of discount rate data.

application/json
get/discount_factor
GET /v1/discount_factor?index=SOFR&date=2D HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "SOFR",
  "date": "2025-12-31",
  "valuation_time": "2024-01-01T15:00:00Z",
  "discount_factor": 0.7863454
}

Get Discount Factors

get

Fetches discount factors for a list of dates or tenors.

This is the batch equivalent of /discount_factor — use it when you need values at irregular or arbitrary dates rather than an evenly-spaced schedule (for that, see /discount_curve).

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of discount factors.

application/json
get/discount_factors
GET /v1/discount_factors?index=SOFR&dates=2025-12-31 HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "SOFR",
  "dates": [
    "2025-12-31"
  ],
  "valuation_time": "2024-01-01T15:00:00Z",
  "discount_factors": [
    {
      "date": "2025-12-31",
      "discount_factor": 0.7863454
    }
  ]
}

Get Zero Rate

get

Fetches the zero rate (spot rate) based on the specified parameters, including reference rate, date and optional valuation time. Returns the zero rate as a percentage with configurable compounding and day count conventions.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
dateone ofRequired

The date for the zero rate calculation. Provide either a specific date (e.g., '2025-12-31') or a tenor (e.g., '1Y', '5Y'), but not both.

Example: 2D
string · dateOptional

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

Example: 2025-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
day_countstring · enumOptional

Day count convention for interest rate and swap calculations

Example: Actual360Possible values:
compoundingstring · enumOptional

Compounding type for the zero rate. Default is Simple.

Default: SimpleExample: {"summary":"Simple (no compounding)","value":"Simple"}Possible values:
compounding_frequencystring · enumOptional

Compounding frequency. Only applicable when compounding is set to 'Compounded'. Default is 12M (Annual).

Default: 12MExample: {"summary":"Annual compounding","value":"12M"}Possible values:
Responses
200

Successful retrieval of zero rate data.

application/json
get/zero_rate
GET /v1/zero_rate?index=SOFR&date=2D HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "SOFR",
  "date": "2025-12-31",
  "valuation_time": "2024-01-01T15:00:00Z",
  "zero_rate": 4.25,
  "day_count": "Actual360",
  "compounding": "Simple",
  "compounding_frequency": "12M",
  "timestamp": "2024-01-01T15:00:00Z"
}

Get Zero Rates

get

Fetches zero rates (spot rates) for a list of specific dates in a single call.

This is the batch equivalent of /zero_rate — use it when you need values at irregular or arbitrary dates rather than an evenly-spaced schedule (for that, see /discount_curve). Every date is read off one curve build, so the rates are mutually consistent; issuing one /zero_rate call per date does not guarantee this, because each call may resolve to a different curve snapshot.

The day count and compounding options apply to all dates in the request.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
day_countstring · enumOptional

Day count convention for interest rate and swap calculations

Example: Actual360Possible values:
compoundingstring · enumOptional

Compounding type applied to every date in the request. Default is Simple.

Default: SimpleExample: {"summary":"Simple (no compounding)","value":"Simple"}Possible values:
compounding_frequencystring · enumOptional

Compounding frequency. Only applicable when compounding is set to 'Compounded'. Default is 12M (Annual).

Default: 12MExample: {"summary":"Annual compounding","value":"12M"}Possible values:
Responses
200

Successful retrieval of zero rate data.

application/json
get/zero_rates
GET /v1/zero_rates?index=SOFR&dates=2025-12-31 HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "SOFR",
  "dates": [
    "2025-12-31"
  ],
  "valuation_time": "2024-01-01T15:00:00Z",
  "zero_rates": [
    {
      "date": "2025-12-31",
      "zero_rate": 4.25
    }
  ],
  "day_count": "Actual360",
  "compounding": "Simple",
  "compounding_frequency": "12M",
  "timestamp": "2024-01-01T15:00:00Z"
}

Get FX Spot Rate

get

Fetches the foreign exchange spot rate for the specified currency pair.

The response's rate_basis says what kind of rate was returned — live (real-time feed), intraday_snapshot (stored intraday rate) or daily_close (end-of-day rate) — and rate_timestamp the moment the rate actually refers to.

A past valuation_time given as a date alone (2026-09-22) returns that day's daily close; so does 2026-09-22T23:59:59 with no offset, the Excel add-in's encoding of a date (send 2026-09-22T23:59:59Z for the instant). Any other date and time returns the stored intraday rate as of that instant (intraday history since 2026-06-25).

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
currency_pairstringRequired

Currency pair for which to retrieve the FX spot rate (e.g., EURUSD, GBPJPY).

Example: {"summary":"EUR/USD (Euro to US Dollar)","value":"EURUSD"}
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of FX spot rate data.

application/json
get/fx
GET /v1/fx?currency_pair=text HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "currency_pair": "EURUSD",
  "valuation_time": "2024-01-01T15:00:00Z",
  "rate": 1.1234,
  "rate_basis": "intraday_snapshot",
  "rate_timestamp": "2026-09-22T11:00:00+00:00"
}

Get FX Forward Rate

get

Returns the forward exchange rate for a given currency pair and date. The response includes the forward rate along with spot rate, forward diff, premium, and days forward.

Long-dated forwards: dates beyond the pair's last quoted tenor are derived from the interest rate differential implied by each currency's yield curve, anchored to the last quoted forward. These points are flagged with extrapolated: true in the response. For pairs where yield curves are unavailable in one or both currencies, rates beyond the quoted tenors are linearly extrapolated instead.

Historical mode: pass valuation_time to read the forward off that day's stored curve instead of live data — e.g. date=2027-01-15&valuation_time=2026-06-13 answers "what did the Jan-2027 forward cost as of 13 June". A date in the past (with no valuation_time) returns that day's historical spot rate.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
currency_pairstringRequired

The currency pair in ISO format (e.g., "EURUSD" for Euro to US Dollar).

Example: EURUSD
datestring · dateOptional

The forward (maturity) date in YYYY-MM-DD format. Defaults to the current date — or to valuation_time when that is provided (spot as of the snapshot).

Example: 2024-12-31
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of FX forward rate data.

application/json
get/fx_forward
GET /v1/fx_forward?currency_pair=EURUSD HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "currency_pair": "EURUSD",
  "date": "2027-04-02",
  "rate": 1.1714,
  "spot_rate": 1.1565,
  "forward_diff": 0.0149,
  "premium": "1.29%",
  "days_forward": 365,
  "extrapolated": false
}

Get FX Forwards for a List of Value Dates

get

Returns FX forward rates for an explicit list of value dates in a single call, all priced off one curve snapshot. This is the FX equivalent of the rates-side /forward_rates endpoint: pass the exact settlement/value dates you need (for example a monthly payment schedule) and get one forward per date, instead of issuing a separate /fx_forward request for each. One request counts once against the API usage limit, regardless of the number of dates.

Each entry mirrors /fx_forward: the forward rate, its difference to spot, the forward premium and days forward. A value date at or before the snapshot returns that date's spot rate, exactly as /fx_forward does — so this is a drop-in for calling /fx_forward once per date. Results are returned in rates, in the order the dates were supplied. Business-day rolling is the caller's responsibility — send the dates already adjusted to trading days.

Long-dated forwards: dates beyond the pair's last quoted tenor are derived from the interest-rate differential implied by each currency's yield curve and flagged with extrapolated: true. For pairs where a yield curve is unavailable on one or both legs, rates beyond the quoted tenors are linearly extrapolated instead — still flagged extrapolated: true.

Historical mode: pass valuation_time to price every date off that day's stored curve instead of live data.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
currency_pairstringRequired

The currency pair in ISO format (e.g., "EURUSD" for Euro to US Dollar).

Example: EURUSD
datesstring · date[] · min: 1 · max: 500Required

The value dates to price, in YYYY-MM-DD format, repeated once per date (e.g. ?dates=2026-09-21&dates=2026-10-20). Up to 500 per request; all are priced off one curve snapshot and need not be sorted. Duplicate dates are priced once per occurrence and returned in the same positions (each counts toward the 500 limit). Business-day rolling is the caller's responsibility.

Example: ["2026-09-21","2026-10-20","2026-11-20"]
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of FX forward rates for the requested value dates.

application/json
get/fx_forwards
GET /v1/fx_forwards?currency_pair=EURUSD&dates=2026-09-21 HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "currency_pair": "EURUSD",
  "dates": [
    "2026-09-21",
    "2026-10-20"
  ],
  "valuation_time": null,
  "spot_rate": 1.1565,
  "rates": [
    {
      "date": "2026-10-20",
      "rate": 1.1601,
      "forward_diff": 0.0036,
      "premium": "0.31%",
      "days_forward": 56,
      "extrapolated": false
    }
  ],
  "timestamp": "2026-08-25T17:00:00"
}

Get FX Forward Curve

get

Fetches the complete FX forward curve for a given currency pair in a single API call.

Two modes:

  • Standard mode (default, frequency=standard): Returns spot rate plus forward rates for all available market tenors for the pair. The start_date and end_date parameters are ignored.

  • Custom mode (any other frequency): Returns forward rates at the specified interval between start_date and end_date. Useful for custom date ranges or daily/weekly data.

Long-dated forwards: points beyond the pair's last quoted tenor are derived from the interest rate differential implied by each currency's yield curve, anchored to the last quoted forward. These points are flagged with extrapolated: true. For pairs where yield curves are unavailable in one or both currencies, points beyond the quoted tenors are linearly extrapolated instead.

Historical curves: pass valuation_time to build the curve from that day's stored forward pillars instead of live data — mirroring the /forward_curve and /discount_curve endpoints. Works with both modes; tenors and schedules anchor on the snapshot date. Weekends/holidays fall back to the nearest earlier business day with data.

This endpoint is more efficient than making multiple /fx_forward calls when you need the full curve.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
currency_pairstringRequired

The currency pair in ISO format (e.g., "EURUSD" for Euro to US Dollar).

Example: EURUSD
frequencystring · enumOptional

The frequency of forward rate points. Use "standard" (default) for standard tenors, or specify an interval like "1D" (daily), "1W" (weekly), "1M" (monthly), "3M" (quarterly), "6M" (semi-annual), "12M" (annual).

Default: standardExample: standardPossible values:
start_datestring · dateOptional

Start date for custom frequency mode (ignored for standard mode).

Example: 2024-04-01
end_datestring · dateOptional

End date for custom frequency mode (ignored for standard mode). Defaults to 10 years from today.

Example: 2026-04-01
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of FX forward curve data.

application/json
get/fx_forward_curve
GET /v1/fx_forward_curve?currency_pair=EURUSD HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "currency_pair": "EURUSD",
  "spot_rate": 1.1565,
  "valuation_time": "2026-03-31T16:00:00Z",
  "frequency": "standard",
  "curve": [
    {
      "tenor": "1W",
      "date": "2026-04-07",
      "forward_rate": 1.1566,
      "forward_diff": 0.0001
    },
    {
      "tenor": "1M",
      "date": "2026-04-30",
      "forward_rate": 1.1572,
      "forward_diff": 0.0007
    },
    {
      "tenor": "1Y",
      "date": "2027-03-31",
      "forward_rate": 1.1714,
      "forward_diff": 0.0149
    }
  ]
}

Real-Time FX Streaming (WebSocket)

get

Access live foreign exchange market data with real-time mid-prices derived from institutional market feeds.

This HTTP endpoint has been replaced by a dedicated WebSocket service and is kept here for documentation purposes for prospective users.

Connect directly via WebSocket at: wss://streaming.bluegamma.io/fx_stream

Example connection URL: wss://streaming.bluegamma.io/fx_stream?s=EURUSD&token=YOUR_TOKEN

If you previously relied on an HTTP redirect, please update your client to open a WebSocket connection directly.

The stream provides continuous market data via the WebSocket protocol for low-latency, bidirectional communication.

Query parameters:

  • s: one or more symbols (repeatable), e.g. ?s=EURUSD&s=GBPUSD

  • token: your JWT token

Server Messages (from server to client):

Quote updates:

{
  "type": "quote",
  "symbol": "EURUSD",
  "mid": 1.0845,
  "bid": 1.08445,
  "ask": 1.08455,
  "timestamp": "2025-01-15T14:30:25.123Z"
}

Connection status (sent once, immediately after connecting):

Subscription confirmations:

Heartbeat — the server sends periodic pings to keep the connection open:

Errors:

Reconnecting

WebSocket connections drop — networks change, proxies time out idle connections, servers restart. A long-running integration should expect this and reconnect automatically rather than treating a dropped connection as a failure.

A straightforward approach, used in the reference clients below:

  • Track when you last received any message. Quotes and pings both count, so this works during quiet periods too — note that FX markets close at weekends, when quotes legitimately stop arriving.

  • If nothing arrives for 60 seconds, close the connection and open a new one.

  • Reconnect with exponential backoff (e.g. 1s, 2s, 4s … capped around 30s) plus a little random jitter, so many clients don't reconnect in lockstep.

  • Re-send your subscriptions after reconnecting — subscription state belongs to the connection and is not carried across one.

  • You can also send {"action": "ping"} at any time and expect {"type": "pong"} back, if you'd rather probe actively.

Service status. Live status, incident history and status subscriptions: status.bluegamma.io.

Client Commands (send from client to server):

Subscribe to additional symbols:

Unsubscribe from symbols:

Ping (optional - server sends automatic pings):

Reference client

Both examples reconnect automatically: they watch for any inbound message, back off and reconnect when the stream goes quiet, and re-subscribe on each new connection.

Example Usage (JavaScript):

Example Usage (Python - websockets):

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
sstring[]Optional

Select which currency symbols to include in your real-time data stream. Repeat the s parameter to include multiple symbols (e.g., ?s=EURUSD&s=GBPUSD). Supports major pairs (EUR/USD, GBP/USD), crosses (EUR/GBP, AUD/JPY), and emerging market currencies.

Supported symbols include:

  • Major pairs: EURUSD, GBPUSD, USDJPY, USDCHF, AUDUSD, USDCAD, NZDUSD
  • Euro crosses: EURGBP, EURJPY, EURCHF, EURAUD, EURCAD
  • Other crosses: GBPJPY, CHFJPY, AUDJPY, CADJPY
  • Emerging markets: USDMXN, USDBRL, USDZAR, USDTRY, USDCNY

Comma-separated values are not accepted.

Default: ["EURUSD"]Example: {"summary":"EUR/USD (most liquid pair)","value":["EURUSD"]}
tokenstringRequired

JWT token used to authenticate the WebSocket connection. Obtain your token from BlueGamma. This token must be provided as a query parameter when opening the WebSocket connection.

Example: {"summary":"Example token","value":"eyJhbGciOi..."}
Responses
302

This endpoint provides documentation for the FX WebSocket streaming service. Connect directly using the WebSocket URL.

get/fx_stream
GET /v1/fx_stream?token=text HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*

No content

Get Government Bond Yield

get

Calculates the yield for a government bond yield based on country and tenor. Yields are zero coupon yields, assuming S/A compounding.

UK government yield history starts on 5 January 2023: a UK request with an earlier valuation_time returns a 400 naming that minimum date.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
country_codestringRequired

The ISO country code for which to retrieve the government bond yield (e.g., US, UK, DE).

Example: {"summary":"US Treasury bonds","value":"US"}
maturityone ofRequired

The tenor or specific date for the government bond yield (e.g., '1Y', '5Y', '10Y' or '2030-12-31').

Example: 2D
string · dateOptional

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

Example: 2030-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
forward_startone ofOptional

The forward start date or tenor for the government bond yield (e.g., '1Y', '5Y', '10Y' or '2030-12-31').

Example: 2D
string · dateOptional

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

Example: 2030-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of government bond yield data.

application/json
get/gov_yield
GET /v1/gov_yield?country_code=text&maturity=2D HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "country_code": "US",
  "tenor": "10Y",
  "valuation_time": "2024-01-01T15:00:00Z",
  "yield": 3.245
}

Get Forward Curve

get

Returns a forward curve constructed over a schedule of periods between start_date and end_date.

Supported indices are the values of the Index schema — retrieve them programmatically via GET /v1/indices. This is a different list from the one GET /fixing supports.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
start_dateone ofRequired

The start date for the forward curve calculation. Provide either a specific date (e.g., '2025-12-31') or a tenor (e.g., '1Y', '5Y'), but not both. Validation Requirements: - Start date must be later than valuation time - If using a tenor, it represents the period from valuation time to start date

Example: 2D
string · dateOptional

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

Example: 2025-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
end_dateone ofRequired

The end date for the forward curve. Provide either a specific date (e.g., '2050-12-31') or a tenor (e.g., '10Y', '20Y'), but not both.

Example: 2D
string · dateOptional

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

Example: 2030-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
tenorstringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
frequencystringRequired

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

Example: 1YPattern: ^[0-9]+[DWMY]$
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
is_end_of_monthbooleanOptional

Whether to align periods to the end of each month.

Default: true
Responses
200

Successful retrieval of forward curve data.

application/json
get/forward_curve
GET /v1/forward_curve?index=SOFR&start_date=2D&end_date=2D&frequency=1Y HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "start_date": "2025-12-31",
  "end_date": "2025-12-31",
  "index": "SOFR",
  "tenor": "1Y",
  "valuation_time": "2024-01-01T15:00:00Z",
  "is_end_of_month": true,
  "frequency": "1Y",
  "curve": [
    {
      "start_date": "2025-12-31",
      "end_date": "2025-12-31",
      "forward_rate": 3.245
    }
  ]
}

Get Discount Curve

get

Returns discount factors for a schedule between start_date and end_date using a given index.

Supported indices are the values of the Index schema — retrieve them programmatically via GET /v1/indices. This is a different list from the one GET /fixing supports.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
start_dateone ofRequired

The start date for the discount curve calculation. Provide either a specific date (e.g., '2025-12-31') or a tenor (e.g., '1Y', '5Y'), but not both.

Example: 2D
string · dateOptional

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

Example: 2025-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
end_dateone ofRequired

The end date for the discount curve. Provide either a specific date (e.g., '2030-12-31') or a tenor (e.g., '10Y', '50Y'), but not both.

Example: 2D
string · dateOptional

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

Example: 2030-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
is_end_of_monthbooleanOptional

Whether to align periods to the end of each month.

Default: true
frequencystringRequired

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

Example: 1YPattern: ^[0-9]+[DWMY]$
Responses
200

Successful retrieval of discount curve data.

application/json
get/discount_curve
GET /v1/discount_curve?index=SOFR&start_date=2D&end_date=2D&frequency=1Y HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "start_date": "2025-12-31",
  "end_date": "2025-12-31",
  "index": "SOFR",
  "valuation_time": "2024-01-01T15:00:00Z",
  "is_end_of_month": true,
  "frequency": "1Y",
  "curve": [
    {
      "date": "2025-12-31",
      "discount_factor": 0.9823
    }
  ]
}

Get Forward-Starting Swap Curve

get

This endpoint calculates forward-starting swap rates for a single tenor across multiple start dates.

Returns how a specific swap tenor's rate evolves over different forward start dates, reducing the need for multiple /swap_rate API calls.

Use Case: "How does the 5Y STIBOR swap rate change for swaps starting 3M, 6M, 9M, 12M from now?"

Benefits:

  • Single API call replaces multiple parallel /swap_rate requests

  • Avoids rate limiting when querying many forward-starting swaps

  • Ideal for scenario analysis and forward rate projections

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
tenorstringRequired

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

Example: 1YPattern: ^[0-9]+[DWMY]$
start_dateone ofOptional

The first forward start date for the curve. Provide either a specific date (e.g., '2026-06-01') or a tenor (e.g., '3M', '1Y') representing the offset from valuation time. If not provided, defaults to spot date (2 business days forward). Validation Requirements: - Cannot be more than 10 years in the past - Must be before end_date

Example: 2D
string · dateOptional

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

Example: 2025-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
end_dateone ofRequired

The last forward start date for the curve. Provide either a specific date (e.g., '2027-06-01') or a tenor (e.g., '1Y', '5Y') representing the offset from start_date. Validation Requirements: - Must be later than start_date - Maximum range: 50 years from start_date

Example: 2D
string · dateOptional

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

Example: 2030-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
frequencystringRequired

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

Example: 1YPattern: ^[0-9]+[DWMY]$
is_end_of_monthbooleanOptional

Whether to align start dates to the end of each month. When true, dates will be adjusted to month-end boundaries.

Default: true
fixed_leg_frequencystringRequired

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

Example: 1YPattern: ^[0-9]+[DWMY]$
floating_leg_frequencystringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
fixed_leg_day_countstring · enumOptional

Day count convention for interest rate and swap calculations

Example: Actual360Possible values:
floating_leg_day_countstring · enumOptional

Day count convention for interest rate and swap calculations

Example: Actual360Possible values:
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of forward-starting swap curve data.

application/json
get/forward_swap_curve
GET /v1/forward_swap_curve?index=SOFR&tenor=1Y&end_date=2D&frequency=1Y&fixed_leg_frequency=1Y HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "3M STIBOR",
  "currency": "SEK",
  "tenor": "5Y",
  "start_date": "2026-06-09",
  "end_date": "2027-06-09",
  "frequency": "3M",
  "is_end_of_month": true,
  "fixed_leg_frequency": "1Y",
  "floating_leg_frequency": null,
  "fixed_leg_day_count": null,
  "floating_leg_day_count": null,
  "valuation_time": "2026-03-09T20:27:56.191653",
  "timestamp": "2026-03-09T18:00:35",
  "curve": [
    {
      "start_date": "2026-06-09",
      "maturity_date": "2031-06-09",
      "swap_rate": 0.026264775343760226
    },
    {
      "start_date": "2026-06-30",
      "maturity_date": "2031-06-30",
      "swap_rate": 0.026377015392480666
    },
    {
      "start_date": "2026-09-30",
      "maturity_date": "2031-09-30",
      "swap_rate": 0.02684143363682677
    }
  ]
}

Get Fixing Rate

get

Fetches the fixing rate for a given index at a specific valuation time.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

Interest rate benchmarks and indices available for fixing rate retrieval. Retrieve this list programmatically via GET /v1/fixing_indices. Includes deliberately-documented discontinued benchmarks (USD/GBP/CHF LIBORs, 3M CDOR) for which /fixing returns the final published fixing. Excludes SAIBOR.

Example: SOFRPossible values:
valuation_datestring · dateOptional

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

Example: 2025-12-31
Responses
200

Successful retrieval of fixing rate data.

application/json
get/fixing
GET /v1/fixing?index=SOFR HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "SOFR",
  "valuation_date": "2025-12-31",
  "fixing_rate": 0.9876,
  "fixing_date": "2025-12-31"
}

Get Historical Fixings

get

Returns a benchmark's published fixings over a date range in a single request, one row per published print, oldest first. Days without a published fixing (weekends, holidays) have no row; for the single-date most-recent-at-or-before lookup, use GET /fixing instead. Responses are capped at 10,000 rows; when a range would exceed the cap the earliest rows are returned and truncated is set to true. Some licensing-restricted benchmarks are not available over this endpoint and return 403.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

Interest rate benchmarks and indices available for fixing rate retrieval. Retrieve this list programmatically via GET /v1/fixing_indices. Includes deliberately-documented discontinued benchmarks (USD/GBP/CHF LIBORs, 3M CDOR) for which /fixing returns the final published fixing. Excludes SAIBOR.

Example: SOFRPossible values:
start_datestring · dateRequired

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

Example: 2025-12-31
end_datestring · dateOptional

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

Example: 2025-12-31
Responses
200

Successful retrieval of historical fixings.

application/json
get/historical_fixings
GET /v1/historical_fixings?index=SOFR&start_date=2025-12-31 HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "SONIA",
  "start_date": "2025-12-31",
  "end_date": "2025-12-31",
  "count": 253,
  "truncated": false,
  "fixings": [
    {
      "date": "2025-12-31",
      "rate": 4.7
    }
  ]
}

List Fixing Indices

get

Returns the list of indices supported by GET /fixing and GET /historical_fixings, so the supported set can be discovered programmatically (a licensing-restricted subset is refused by /historical_fixings with a 403). The list matches the FixingIndex enum documented in this specification and includes deliberately-documented discontinued benchmarks (USD/GBP/CHF LIBORs, 3M CDOR) for which /fixing returns the final published fixing. For the indices supported by the curve, swap and rate endpoints (a different list), see GET /indices.

Authorizations
x-api-keystringRequired

API token required for authentication

Responses
200

Successful retrieval of the supported fixing indices.

application/json
get/fixing_indices
GET /v1/fixing_indices HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "indices": [
    "SOFR",
    "ESTR",
    "SONIA",
    "1M Term SOFR"
  ]
}

Get Historical Swap Rates

get

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

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
tenorstringRequired

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

Example: 1YPattern: ^[0-9]+[DWMY]$
start_datestring · dateRequired

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

Example: 2025-12-31
end_datestring · dateRequired

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

Example: 2025-12-31
Responses
200

Successful retrieval of historical swap rates.

application/json
get/historical_swap_rates
GET /v1/historical_swap_rates?index=SOFR&tenor=1Y&start_date=2025-12-31&end_date=2025-12-31 HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "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

post

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.

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

Authorizations
x-api-keystringRequired

API token required for authentication

Body
indexstring · enumRequired

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

Example: SOFRPossible values:
start_dateone ofRequiredExample: 2D
string · dateOptional

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

Example: 2025-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
maturity_dateone ofRequiredExample: 2D
string · dateOptional

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

Example: 2030-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
fixed_leg_frequencystringRequired

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

Example: 1YPattern: ^[0-9]+[DWMY]$
fixed_leg_day_countall ofOptional
string · enumOptional

Day count convention for interest rate and swap calculations

Example: Actual360Possible values:
and
anyOptional

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

fixed_ratenumber · doubleOptional

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.

Example: 4.25
fixed_leg_first_payment_datestring · dateOptional

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

Example: 2026-08-02
fixed_notionalsone ofRequired

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

Example: 100000000
number · doubleOptional
or
number · double[]Optional
valuation_timestring · date-timeOptional

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

Example: 2026-01-28T15:00:00Z
Responses
200

Successful swap pricer calculation.

application/json
post/swap_pricer
POST /v1/swap_pricer HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 146

{
  "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

get

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

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

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

Example: SOFRPossible values:
Responses
200

Successful retrieval of available swap rate tenors.

application/json
get/swap_rate_tenors
GET /v1/swap_rate_tenors?index=SOFR HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "3M EURIBOR",
  "tenors": [
    "1Y",
    "2Y",
    "5Y",
    "10Y"
  ]
}

List Supported Indices

get

Returns the list of indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /discount_factor, /zero_rate and related), so the supported set can be discovered programmatically. The list matches the Index enum documented in this specification and includes discontinued-but-served legacy benchmarks (USD/GBP/CHF LIBORs, 3M CDOR and similar), which are valued via ISDA-fallback conventions. Note this is NOT the list of indices supported by GET /fixing -- for that, see GET /fixing_indices.

Authorizations
x-api-keystringRequired

API token required for authentication

Responses
200

Successful retrieval of the supported indices.

application/json
get/indices
GET /v1/indices HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "indices": [
    "SOFR",
    "SONIA",
    "3M EURIBOR",
    "SWESTR"
  ]
}

Get Bond

get

Returns descriptive metadata and indicative pricing for a single bond by ISIN.

Pricing source: Indicative quote — this is not a live market quote and should be treated as an indicative reference price/yield only.

Coverage is currently limited to supported bonds. If an ISIN is not covered, a 404 is returned.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
isinstringRequired

12-character ISIN of the bond (uppercase alphanumeric).

Example: XS1234567890Pattern: ^[A-Z0-9]{12}$
Responses
200

Bond descriptive fields and indicative pricing.

application/json
get/bond
GET /v1/bond?isin=XS1234567890 HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "isin": "XS1234567890",
  "issuer": "Nordic Real Estate AB",
  "bond_name": "Nordic Real Estate AB, 3.5% 15jun2030, EUR",
  "country_of_issuer": "Sweden",
  "currency": "EUR",
  "coupon": 3.5,
  "is_floating_rate_note": true,
  "coupon_period": "6M",
  "day_count_convention": "Actual/360",
  "maturity_date": "2030-06-15",
  "issue_date": "2020-06-15",
  "outstanding_volume": 500000000,
  "amount_issued": 500000000,
  "sector": "Real Estate",
  "bond_rank": "Senior Unsecured",
  "is_convertible": true,
  "is_mortgage_bond": true,
  "is_perpetuity": true,
  "subordinated_debt": true,
  "pricing": {
    "indicative_price": 98.75,
    "indicative_yield": 4.12,
    "bid_price": 1,
    "ask_price": 1,
    "mid_price": 1,
    "as_of": "2026-04-15T00:00:00"
  }
}

Get Bond Price

get

Returns the bond mid price (indicative quote) for an ISIN as of a given valuation date. Returns the most recent quote on or before the valuation date (lookback up to 30 days).

Pricing source: Indicative quote — this is not a live market quote and should be treated as an indicative reference price only.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
isinstringRequired

12-character ISIN of the bond (uppercase alphanumeric).

Example: XS1234567890Pattern: ^[A-Z0-9]{12}$
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Bond price as of the valuation date.

application/json
get/bond_price
GET /v1/bond_price?isin=XS1234567890 HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "isin": "XS1234567890",
  "valuation_time": "2026-01-01T00:00:00.000Z",
  "trade_date": "2026-01-01",
  "price": 98.75
}

Get Bond Yield

get

Returns the bond yield-to-maturity (indicative quote) for an ISIN as of a given valuation date. Returns the most recent yield on or before the valuation date (lookback up to 30 days).

Pricing source: Indicative quote — this is not a live market quote and should be treated as an indicative reference yield only.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
isinstringRequired

12-character ISIN of the bond (uppercase alphanumeric).

Example: XS1234567890Pattern: ^[A-Z0-9]{12}$
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Bond yield as of the valuation date.

application/json
get/bond_yield
GET /v1/bond_yield?isin=XS1234567890 HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "isin": "XS1234567890",
  "valuation_time": "2026-01-01T00:00:00.000Z",
  "trade_date": "2026-01-01",
  "yield": 4.12
}

Get Inflation Curve (Beta)

get

Beta endpoint: This endpoint is currently in beta and may change.

Returns the full zero-coupon inflation swap curve for a given inflation index. Rates are derived from zero-coupon inflation swap market data, bootstrapped into a PiecewiseZeroInflation curve.

Supported inflation indices:

  • UK RPI — UK Retail Price Index (discount curve: SONIA, observation lag: 2 months)

  • EU HICP — Euro-area HICP excluding tobacco (HICPxT), published by Eurostat (Bloomberg CPTFEMU). This is the index EUR zero-coupon inflation swaps settle on; it is not the EU all-items aggregate or headline euro-area HICP. (discount curve: 6M EURIBOR, observation lag: 3 months)

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

Inflation indices available for zero-coupon inflation rate calculations. "EU HICP" is euro-area HICP excluding tobacco (HICPxT; Bloomberg CPTFEMU), the index EUR zero-coupon inflation swaps settle on.

Example: UK RPIPossible values:
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of inflation curve data.

application/json
get/inflation_curve
GET /v1/inflation_curve?index=UK+RPI HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "UK RPI",
  "discount_index": "SONIA",
  "rates": [
    {
      "tenor": "5Y",
      "zc_rate": 3.05
    }
  ],
  "timestamp": "2024-01-01T15:00:00Z"
}

Calculate Compounded Overnight Rate / Realised Rate

get

Calculate compounded overnight rates (realised rates) for risk-free rate (RFR) indices over a specified period.

This endpoint computes the realised compounded rate using actual market fixings for overnight reference rates. The calculation follows market conventions for each index, including day count conventions, lookback periods, lockout days, and observation shifts.

Supported Overnight Indices:

  • SOFR (Secured Overnight Financing Rate)

  • SONIA (Sterling Overnight Index Average)

  • ESTR (Euro Short-Term Rate)

  • SORA (Singapore Overnight Rate Average)

  • TONAR (Tokyo Overnight Average Rate)

  • CORRA (Canadian Overnight Repo Rate Average)

  • SARON (Swiss Average Rate Overnight)

Use Cases:

  • Calculate historical realised rates for loan settlements

  • Compute interest payments based on overnight index compounding

  • Validate RFR-based calculations

  • Generate audit trails for compounded rate calculations

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
start_datestring · dateRequired

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

Example: 2025-12-31
end_datestring · dateRequired

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

Example: 2025-12-31
indexstring · enumRequired

Overnight index name. Supported indices include SOFR, SONIA, ESTR, SORA, TONAR, CORRA, SARON, CDI, and Fed Funds.

Example: {"summary":"SOFR index","value":"SOFR"}Possible values:
nominalnumber · floatOptional

Notional amount for calculation. If not provided, defaults to 1,000,000.

Default: 1000000Example: {"summary":"1 million notional","value":1000000}
spreadnumber · floatOptional

Additional spread over the compounded rate, as a decimal fraction (e.g. 0.0025 = 25bp, 0.0375 = 3.75%). Not basis points and not a percentage. Values above 1 (100%) are rejected with a 422. If not provided, defaults to 0.

Default: 0Example: {"summary":"No spread","value":0}
day_counterstringOptional

Day count convention for the calculation. If not provided, uses the index-specific default convention.

Example: {"summary":"Actual/360","value":"Actual/360"}
lookback_daysintegerOptional

Number of days to lag the reference rate. If not provided, defaults to 0.

Default: 0Example: {"summary":"No lookback","value":0}
lockout_daysintegerOptional

Number of days at the end of the period without rate resets. If not provided, defaults to 0.

Default: 0Example: {"summary":"No lockout","value":0}
apply_observation_shiftbooleanOptional

Whether to apply observation shift to the rate calculation. If not provided, defaults to false.

Default: falseExample: {"summary":"No observation shift","value":false}
Responses
200

Successful calculation of compounded overnight rate.

application/json
get/compounded_rate
GET /v1/compounded_rate?start_date=2025-12-31&end_date=2025-12-31&index=SOFR HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "start_date": "2024-01-01",
  "end_date": "2024-01-31",
  "index": "SOFR",
  "nominal": 1000000,
  "spread": 0,
  "day_counter": "Actual/360",
  "calendar": "United States",
  "lookback_days": 0,
  "lockout_days": 0,
  "apply_observation_shift": false,
  "rate": 5.25,
  "amount": 43750
}

Get FRAs

get

Retrieves Forward Rate Agreement (FRA) rates for a given index. Returns all available tenors and their corresponding rates. Supported indices are denominated in EUR, SEK, NOK, and DKK.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstring · enumRequired

Indices supported for FRA rate retrieval. These are IBOR-type indices denominated in EUR, SEK, NOK, and DKK.

Example: 3M EURIBORPossible values:
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful retrieval of FRA rates.

application/json
get/fras
GET /v1/fras?index=3M+EURIBOR HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "3M EURIBOR",
  "currency": "EUR",
  "valuation_time": "2024-01-01T15:00:00Z",
  "timestamp": "2026-01-28",
  "fras": [
    {
      "tenor": "3X6",
      "type": "FRA",
      "value": 2.045
    }
  ]
}

Price a European Swaption

get

Price a European swaption (payer or receiver) with live yield curves and normal volatility surface.

Returns NPV, delta, DV01, and vega. The exercise date equals the swap start date (mid-curve swaptions are not supported).

Supported indices: SOFR, SONIA, 3M EURIBOR, 6M EURIBOR, 1M EURIBOR, SARON, AONIA, 3M CDOR, NOWA, SWESTR, STINA, DESTR, CITA, 3M JIBAR, ZARONIA, 3M HIBOR, HONIA, 3M KLIBOR, OCR, NZONIA, TONAR, 3M TIBOR, 6M TIBOR, 3M SAIBOR, 3M PRIBOR, 6M PRIBOR, 6M BUBOR, 3M BUBOR, 3M TAIBOR, TIIEON, 91D CD, 7D REPO.

Example request:

GET /swaption_price?index=SOFR&start_date=2Y&maturity_date=5Y&swaption_type=payer
Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstringRequired

The reference rate index (e.g., SOFR, SONIA, 3M EURIBOR). Must be a supported post-LIBOR transition index.

Example: SOFR
start_datestringRequired

The start date for the underlying swap (= exercise date). Provide either a specific date (e.g., '2028-02-21') or a tenor (e.g., '2Y').

Example: 2Y
maturity_datestringRequired

The maturity date for the underlying swap. Provide either a specific date (e.g., '2033-02-21') or a tenor (e.g., '5Y'). If using a tenor, it represents the period from start date to maturity.

Example: 5Y
strike_ratenumber · nullableOptional

Strike rate as a percentage (e.g., 3.5 for 3.5%). If omitted, the swaption is priced at ATM (forward swap rate).

Example: 3.5
notionalnumberOptional

Notional amount. Defaults to 10,000,000.

Default: 10000000Example: 10000000
swaption_typestring · enumOptional

Swaption type. Defaults to 'payer'.

Default: payerExample: payerPossible values:
valuation_timestring · date-time · nullableOptional

Valuation time in ISO 8601 format. Defaults to current time.

Responses
200

Successful swaption pricing

application/json
get/swaption_price
GET /v1/swaption_price?index=text&start_date=text&maturity_date=text HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "SOFR",
  "currency": "USD",
  "swaption_type": "payer",
  "start_date": "2028-02-21",
  "maturity_date": "2033-02-21",
  "exercise_date": "2028-02-21",
  "valuation_time": "2024-01-01T15:00:00Z",
  "notional": 10000000,
  "forward_rate": 3.57,
  "strike_rate": 3.57,
  "normal_volatility_bps": 60.7,
  "npv": 75661.51,
  "premium_pct": 0.757,
  "delta": 0.5,
  "dv01": 2240.84,
  "vega": 1247.4,
  "timestamp": "2026-02-25T10:50:28"
}

Price an Interest Rate Cap or Floor

get

Price an interest rate cap or floor with live yield curves and a caplet-level breakdown.

A cap is a portfolio of caplets, each a European call option on a forward rate. A floor is a portfolio of floorlets, each a European put option on a forward rate.

Pricing uses the Bachelier (normal) model with live yield curves and swaption ATM volatility data. The response includes headline price measures plus the full caplet breakdown used in the calculation.

Supported indices: SOFR, SONIA, 3M EURIBOR, 6M EURIBOR, 1M EURIBOR, SARON, AONIA, 3M CDOR, NOWA, SWESTR, STINA, DESTR, CITA, 3M JIBAR, ZARONIA, 3M HIBOR, HONIA, 3M KLIBOR, OCR, NZONIA, TONAR, 3M TIBOR, 6M TIBOR, 3M SAIBOR, 3M PRIBOR, 6M PRIBOR, 6M BUBOR, 3M BUBOR, 3M TAIBOR, TIIEON, 91D CD, 7D REPO.

Vol smile modes:

  • auto (default): Uses SABR smile for SOFR caps, calibrated from live market data, and flat ATM vol for other indices.

  • flat: Uses ATM vol for all strikes.

  • sabr: Uses SABR smile with user-provided sabr_rho and sabr_nu.

Term-rate indices (EURIBOR, TIBOR, PRIBOR, BUBOR and other IBOR-style rates): a period whose rate has already fixed on the valuation date (its fixing date, e.g. two business days before the period starts for EURIBOR, is on or before it) carries no optionality and is not priced. A cap starting at spot therefore prices from its second period. Overnight indices (SOFR, SONIA and others) compound in arrears, so every period is priced.

For multi-strike pricing or staggered notionals, use the POST version of this endpoint.

Example request:

GET /cap_floor_price?index=SOFR&start_date=3M&maturity_date=3Y&cap_or_floor=cap&strike_rate=4.5
Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
indexstringRequired

The reference rate index (e.g., SOFR, SONIA, 3M EURIBOR). Must be a supported post-LIBOR transition index.

Example: SOFR
start_datestringRequired

The cap/floor start date. Provide either a specific date (e.g., '2026-06-01') or a tenor (e.g., '3M').

Example: 3M
maturity_datestringRequired

The cap/floor maturity date. Provide either a specific date (e.g., '2029-03-01') or a tenor (e.g., '3Y'). If using a tenor, it represents the period from start date to maturity.

Example: 3Y
strike_ratenumber · nullableOptional

Strike rate as a percentage (e.g., 4.5 for 4.5%). If omitted, the instrument is priced at ATM — the par swap rate for the same schedule.

Example: 4.5
notionalnumberOptional

Notional amount. Defaults to 10,000,000.

Default: 10000000Example: 10000000
cap_or_floorstring · enumOptional

Instrument type. Defaults to 'cap'.

Default: capExample: capPossible values:
frequencystringOptional

Caplet/floorlet frequency (e.g., '1M', '3M', '6M'). Defaults to '3M' (quarterly).

Default: 3MExample: 3M
valuation_timestring · date-time · nullableOptional

Valuation time in ISO 8601 format. Defaults to current time.

Example: 2026-01-28T15:00:00Z
vol_smilestring · enumOptional

Volatility smile model. auto uses SABR for SOFR and flat ATM vol for other indices. flat uses ATM vol for all strikes. sabr uses user-provided sabr_rho and sabr_nu.

Default: autoExample: autoPossible values:
sabr_rhonumber · nullableOptional

SABR correlation parameter (-1 to 1). Required when vol_smile=sabr. Only used when vol_smile=sabr; ignored otherwise. If vol_smile=auto and the index is SOFR, rho is calibrated automatically.

Example: -0.25
sabr_nunumber · nullableOptional

SABR vol-of-vol parameter (> 0). Required when vol_smile=sabr. Only used when vol_smile=sabr; ignored otherwise. If vol_smile=auto and the index is SOFR, nu is calibrated automatically.

Example: 0.5
Responses
200

Successful cap/floor pricing

application/json
get/cap_floor_price
GET /v1/cap_floor_price?index=text&start_date=text&maturity_date=text HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "index": "SOFR",
  "currency": "USD",
  "type": "cap",
  "start_date": "2026-06-01",
  "maturity_date": "2029-06-01",
  "frequency": "3M",
  "valuation_time": "2024-01-01T15:00:00Z",
  "notional": 10000000,
  "forward_rate": 3.74251,
  "strike_rate": 4.5,
  "npv": 75661.51,
  "premium_pct": 0.7566,
  "delta": 0.512345,
  "vega": 1247.4,
  "num_caplets": 12,
  "caplets": [
    {
      "accrual_start": "2026-09-01",
      "accrual_end": "2026-12-01",
      "forward_rate": 3.74251,
      "strike": 4.5,
      "notional": 10000000,
      "normal_vol_bps": 58.42,
      "npv": 12450.23,
      "delta": 0.421337,
      "vega": 185.74,
      "discount_factor": 0.987654,
      "accrual_fraction": 0.252778
    }
  ],
  "vol_type": "sabr_calibrated",
  "sabr_rho": -0.2143,
  "sabr_nu": 0.4876,
  "timestamp": "2026-02-25T10:50:28Z"
}

Price an Interest Rate Cap or Floor (Complex Inputs)

post

Price caps and floors with richer inputs than the GET endpoint supports:

  • Multiple strikes in a single request

  • Staggered notionals for amortizing or accreting structures

  • SABR smile controls via vol_smile, sabr_rho, and sabr_nu

Returns a single pricing result for a single strike, or an array of pricing results when strike_rate is provided as a list.

Authorizations
x-api-keystringRequired

API token required for authentication

Body
indexstringRequired

The reference rate index (e.g., SOFR, 3M EURIBOR, SONIA)

Example: SOFR
start_dateone ofRequiredExample: 2D
string · dateOptional

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

Example: 2025-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
maturity_dateone ofRequiredExample: 2D
string · dateOptional

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

Example: 2030-12-31
or
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
strike_rateone ofOptional

Strike rate(s) as a percentage. Provide a single value for standard pricing or a list to return a pricing result for each strike. If omitted, the pricer uses ATM.

Example: [2,3,3.5,4,5]
number · doubleOptional
or
number · double[]Optional
notionalone ofOptional

Notional amount(s). Provide a single number for vanilla caps/floors or a list for staggered/amortizing structures with one notional per caplet/floorlet period. On term-rate indices a first period that has already fixed still takes its own list entry, so the list stays aligned with the schedule.

Default: 10000000Example: [10000000,9500000,9000000,8500000]
number · doubleOptional
or
number · double[]Optional
cap_or_floorstring · enumOptional

Instrument type. Defaults to cap.

Default: capExample: capPossible values:
frequencyall ofOptional
stringOptional

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

Example: 1YPattern: ^[0-9]+[DWMY]$
and
anyOptional

Caplet/floorlet frequency. Defaults to 3M.

Example: 3M
valuation_timestring · date-time · nullableOptional

Valuation time in ISO 8601 format. Defaults to current time.

Example: 2026-01-28T15:00:00Z
vol_smilestring · enumOptional

Volatility smile model. auto uses SABR for SOFR and flat ATM vol for other indices. flat uses ATM vol for all strikes. sabr requires sabr_rho and sabr_nu.

Default: autoExample: autoPossible values:
sabr_rhonumber · double · nullableOptional

SABR correlation parameter (-1 to 1). Required when vol_smile=sabr; ignored otherwise.

Example: -0.25
sabr_nunumber · double · nullableOptional

SABR vol-of-vol parameter (> 0). Required when vol_smile=sabr; ignored otherwise.

Example: 0.5
Responses
200

Successful cap/floor pricing

application/json
Responseone of

Pricing result returned by POST /cap_floor_price. An array is returned if and only if strike_rate was supplied as a list — one element per strike, in the same order as the request. A single object is returned otherwise.

or
post/cap_floor_price
POST /v1/cap_floor_price HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 96

{
  "index": "SOFR",
  "start_date": "3M",
  "maturity_date": "3Y",
  "cap_or_floor": "cap",
  "notional": 10000000
}
{
  "index": "SOFR",
  "currency": "USD",
  "type": "cap",
  "start_date": "2026-06-01",
  "maturity_date": "2029-06-01",
  "frequency": "3M",
  "valuation_time": "2024-01-01T15:00:00Z",
  "notional": 10000000,
  "forward_rate": 3.74251,
  "strike_rate": 4.5,
  "npv": 75661.51,
  "premium_pct": 0.7566,
  "delta": 0.512345,
  "vega": 1247.4,
  "num_caplets": 12,
  "caplets": [
    {
      "accrual_start": "2026-09-01",
      "accrual_end": "2026-12-01",
      "forward_rate": 3.74251,
      "strike": 4.5,
      "notional": 10000000,
      "normal_vol_bps": 58.42,
      "npv": 12450.23,
      "delta": 0.421337,
      "vega": 185.74,
      "discount_factor": 0.987654,
      "accrual_fraction": 0.252778
    }
  ],
  "vol_type": "sabr_calibrated",
  "sabr_rho": -0.2143,
  "sabr_nu": 0.4876,
  "timestamp": "2026-02-25T10:50:28Z"
}

Get Central Bank Probabilities

get

Market-implied probabilities for the next scheduled central bank decision.

Returns the next scheduled decision date, the current policy rate, and the probability that the bank hikes, holds or cuts at that decision. Probabilities are percentages and sum to 100.

These figures are the first column of GET /v1/central_bank_probability_matrix aggregated against the current policy level, so the two endpoints always agree. That endpoint carries the rest of the detail for this decision — the expected change in basis points, the days until it, and the full distribution over rate levels — on the first entry of its meetings array.

How the expected move is derived. Each decision's expected move is read from the overnight index swap forward covering the exact window between that decision and the next scheduled one — the period over which the rate set at that decision is actually in force. The first decision is measured against the forward covering today to that decision, which is the only window in the strip containing no decision at all.

Policy rate versus overnight fixing. Overnight index fixings do not sit exactly at the policy rate: some fix a few basis points below their policy anchor and some above. Forwards are therefore shifted into policy-rate space before any probability is computed, using the spread between the fixing and the policy rate measured over the window before the first decision and held constant across the horizon. Every rate on this response is a policy rate, not a fixing.

Target ranges. Where the central bank targets a range rather than a single rate (currently USD only), current_policy_rate is the mid of that range — 3.625 for a 3.50–3.75% range — and target_range carries the bounds. target_range is null for every other currency, whose published policy rate is used directly.

The dead zone. Differences smaller than 1bp between adjacent inter-meeting forwards are below the resolution of the instruments the curve is built from, so expected moves under 1bp are suppressed towards zero by a linear taper — scaled by |move| / 1bp — reaching zero only at zero. The taper keeps the published probability continuous as a currency drifts across the threshold instead of stepping. Moves at or above 1bp are carried through unmodified: a 5bp expected move produces a 20% probability of a hike.

valuation_time echoes the resolved snapshot the calculation used — the value passed in, or the current time when omitted. timestamp is the time of the market data behind the curve, which is not the same thing.

provisional_meeting_date is true when the publishing central bank has not yet finalised the date — the decision is scheduled and traded, but may move.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
currencystring · enumOptional

Currency whose central bank is covered by the probability endpoints.

Example: GBPPossible values:
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful response

application/json
Responseone of
or
get/central_bank_probabilities
GET /v1/central_bank_probabilities HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "currency": "AUD",
  "meeting_date": "2026-09-17",
  "provisional_meeting_date": false,
  "current_policy_rate": 3.75,
  "target_range": {
    "low": 3.5,
    "high": 3.75
  },
  "pending_rate": null,
  "pending_rate_effective_date": null,
  "hike_probability": 16.5,
  "hold_probability": 83.5,
  "cut_probability": 0,
  "base_case": "Hike",
  "observation_basis": "intraday",
  "valuation_time": "2026-01-01T00:00:00.000Z",
  "timestamp": "2026-01-01T00:00:00.000Z"
}

Get Central Bank Probability Matrix

get

Full market-implied distribution of policy rate levels by meeting date.

Shape. matrix holds the rows: one entry per policy rate level, in descending rate order, each spaced one standard move (step_bp) from the next around the current policy level. meetings holds the columns: one entry per scheduled decision, ordered oldest to newest.

Each cell is self-describing:

{"rate_level": 3.875, "probabilities": [
  {"meeting_date": "2026-09-16", "probability": 60.37},
  {"meeting_date": "2026-10-28", "probability": 55.09}
]}

So probability is the chance, in percent, that the policy rate is at that row's rate_level after the decision on that cell's meeting_date. No parallel array has to be tracked to read a row.

Consistency you can rely on, though you do not have to depend on ordering: every row carries exactly one cell per entry in meetings, in the same chronological order, with meeting_date values matching meetings[].meeting_date one for one. For any single priced meeting date, the probabilities across all rows sum to 100 (see null columns below).

The cells for the first decision, aggregated against current_policy_rate, reproduce the figures from GET /v1/central_bank_probabilities exactly: summing the cells on rows above the current level gives its hike_probability, the cell on the row at the current level gives hold_probability, and the rows below give cut_probability.

How each decision is priced. A decision's expected move is taken from the overnight index swap forward spanning that decision to the next scheduled one — the period over which the rate set at that decision is actually in force — differenced against the forward for the preceding window. That expected move is then split across the two adjacent grid levels that bracket it, in the proportions that reproduce it exactly: an expected +32bp on a 25bp grid reads as a 72% chance of one hike and a 28% chance of two. Those per-decision distributions are convolved forward across meetings, so probability spreads over more levels as decisions accumulate.

Policy rate versus overnight fixing. Overnight index fixings do not sit exactly at the policy rate: some fix a few basis points below their policy anchor and some above. Forwards are shifted into policy-rate space before any probability is computed, using the spread between the fixing and the policy rate measured over the window before the first decision and held constant across the horizon. Every rate on this response is a policy rate, not a fixing.

Target ranges. Where the central bank targets a range rather than a single rate (currently USD only), current_policy_rate and every matrix[].rate_level are mids of 25bp-wide ranges — 3.625 for a 3.50–3.75% range, then 3.875, 4.125 and so on — and target_range carries the current bounds. target_range is null for every other currency.

implied_change_bp and the dead zone. Per decision, in basis points, and incremental rather than cumulative. Differences smaller than 1bp between adjacent inter-meeting forwards are below the resolution of the instruments the curve is built from, so expected moves under 1bp are suppressed towards zero by a linear taper — scaled by |move| / 1bp — reaching zero only at zero, which keeps the published number continuous as a decision drifts across the threshold. Moves at or above 1bp are published unmodified. expected_rate is the current policy rate plus the running sum of implied_change_bp up to and including that decision, and equals the probability-weighted level of that matrix column.

Pending decisions. Between a decision's announcement and its effective date (the ECB applies changes from the start of the next reserve maintenance period, ~6 days after the announcement), the published policy rate still shows the old level while the market already trades the announced one. During that window every expected_rate and matrix[].rate_level is anchored to the announced rate, reported as pending_rate alongside pending_rate_effective_date; current_policy_rate keeps showing the published rate still in force. Both fields are null at all other times.

step_bp is the size of one standard move for this central bank and the spacing between adjacent matrix rows. It is per-bank configuration; all eight covered banks are on a 25bp grid today.

Cut, hold and hike in meetings are cumulative against today's level, not conditional on that decision alone: the hike figure for a given meeting is the sum of every matrix cell above the current level in that column, hold is the single cell at it, and cut is the sum below. Holding at today's level therefore becomes less likely the further out you look, because it requires every intervening decision to be a hold.

Null columns. The final decision a central bank has published cannot be priced: its expected move is read from the forward window running from it to the next decision, and no next decision exists yet to close that window. It is still a real scheduled decision, so it is published rather than hidden — as a null column.

In meetings it appears in chronological position with its known facts filled in (meeting_date, days_until, provisional) and every derived field null: implied_change_bp, expected_rate, cut_probability, hold_probability, hike_probability, base_case. Those go null together, never partially, so testing one is enough. Every matrix row carries a matching cell with "probability": null.

Null means "not yet priceable", and it resolves itself: the column fills in automatically once the bank schedules the following decision. Treat it as distinct from a zero. Within a priced column a zero is a real statement — that level is unreachable by that decision — and never missing data.

At most one null column appears, and only when that final published decision falls inside the horizon. Decisions beyond the horizon are simply absent; they are out of scope rather than unpriceable.

Every consistency guarantee — columns summing to 100, the cumulative cut/hold/hike aggregation, the expected-rate path — applies to priced columns. The null column carries no probability mass and takes no part.

valuation_time echoes the resolved snapshot the calculation used — the value passed in, or the current time when omitted. timestamp is the time of the market data behind the curve, which is not the same thing.

Authorizations
x-api-keystringRequired

API token required for authentication

Query parameters
currencystring · enumOptional

Currency whose central bank is covered by the probability endpoints.

Example: USDPossible values:
horizon_monthsinteger · min: 1 · max: 36Optional

How far forward to publish scheduled decisions.

Default: 18Example: 18
valuation_timestring · date-timeOptional

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

Example: 2024-01-01T15:00:00Z
Responses
200

Successful response

application/json
Responseone of
or
get/central_bank_probability_matrix
GET /v1/central_bank_probability_matrix HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
{
  "currency": "AUD",
  "current_policy_rate": 1,
  "target_range": {
    "low": 3.5,
    "high": 3.75
  },
  "pending_rate": null,
  "pending_rate_effective_date": null,
  "step_bp": 25,
  "matrix": [
    {
      "rate_level": 3.875,
      "probabilities": [
        {
          "meeting_date": "2026-09-16",
          "probability": 60.37
        }
      ]
    }
  ],
  "meetings": [
    {
      "meeting_date": "2026-01-01",
      "days_until": 1,
      "provisional": true,
      "implied_change_bp": 1,
      "expected_rate": 1,
      "cut_probability": 1,
      "hold_probability": 1,
      "hike_probability": 1,
      "base_case": "Hike"
    }
  ],
  "observation_basis": "intraday",
  "valuation_time": "2026-01-01T00:00:00.000Z",
  "timestamp": "2026-01-01T00:00:00.000Z"
}

Last updated

Was this helpful?