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.

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

Why BlueGamma?

  • Specialized Data: Access forward curves and swap rates for multiple currencies and tenors to make timely, data-driven decisions.

  • Easy Integration: Designed for easy integration into existing systems.

  • Expert Support: Our experts are available to assist with your integration needs.

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

🔗 Ready to get started? Issue your API key


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

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 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"
  ]
}

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 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 Harmonised Index of Consumer Prices (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

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-28T18:00:00",
  "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"
}

Last updated

Was this helpful?