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
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.
API token required for authentication
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).
SOFRPossible values: 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.
SPOTA date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$The index's spot start date (settlement-lagged from the valuation date).
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
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2030-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$Day count convention for interest rate and swap calculations
Actual360Possible values: Day count convention for interest rate and swap calculations
Actual360Possible values: A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZSuccessful retrieval of calculated swap rate data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}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.
API token required for authentication
One result per item, in the order the items were sent.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed batch requests or has expired (from the API, with detail).
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}
}
]
}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.
API token required for authentication
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).
SOFRPossible values: A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZSuccessful retrieval of complete swap curve data for all available tenors.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - No tenors available for the specified index or currency.
Unprocessable Entity - The provided index name is not found in the configuration.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}
]
}Fetches the forward rate based on the specified parameters, including reference rate, start date, end date and optional valuation time.
API token required for authentication
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).
SOFRPossible values: 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
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$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.
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZSuccessful retrieval of forward curve data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}Fetches the discount factor based on the specified parameters, including reference rate, date and optional valuation time.
API token required for authentication
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).
SOFRPossible values: 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.
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZSuccessful retrieval of discount rate data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}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.
API token required for authentication
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).
SOFRPossible values: 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.
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZDay count convention for interest rate and swap calculations
Actual360Possible values: Compounding type for the zero rate. Default is Simple.
SimpleExample: {"summary":"Simple (no compounding)","value":"Simple"}Possible values: Compounding frequency. Only applicable when compounding is set to 'Compounded'. Default is 12M (Annual).
12MExample: {"summary":"Annual compounding","value":"12M"}Possible values: Successful retrieval of zero rate data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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"
}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).
API token required for authentication
Currency pair for which to retrieve the FX spot rate (e.g., EURUSD, GBPJPY).
{"summary":"EUR/USD (Euro to US Dollar)","value":"EURUSD"}A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZSuccessful retrieval of FX spot rate data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Service Unavailable - the requested past date is newer than the daily FX history BlueGamma has published so far. Retry later.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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"
}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.
API token required for authentication
The currency pair in ISO format (e.g., "EURUSD" for Euro to US Dollar).
EURUSDThe 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).
2024-12-31A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZSuccessful retrieval of FX forward rate data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}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. Thestart_dateandend_dateparameters are ignored.Custom mode (any other frequency): Returns forward rates at the specified interval between
start_dateandend_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.
API token required for authentication
The currency pair in ISO format (e.g., "EURUSD" for Euro to US Dollar).
EURUSDThe 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).
standardExample: standardPossible values: Start date for custom frequency mode (ignored for standard mode).
2024-04-01End date for custom frequency mode (ignored for standard mode). Defaults to 10 years from today.
2026-04-01A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZSuccessful retrieval of FX forward curve data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}
]
}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=GBPUSDtoken: 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):
API token required for authentication
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.
["EURUSD"]Example: {"summary":"EUR/USD (most liquid pair)","value":["EURUSD"]}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.
{"summary":"Example token","value":"eyJhbGciOi..."}This endpoint provides documentation for the FX WebSocket streaming service. Connect directly using the WebSocket URL.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Authentication Required
Your API key is missing, invalid, or has insufficient permissions for real-time data access. Please verify your API key and ensure your subscription includes streaming data access.
Service Temporarily Unavailable
The streaming service is experiencing high demand or temporary maintenance. Please retry your connection in a few moments, with backoff — see the reference client above.
Current service status and incident history: status.bluegamma.io
GET /v1/fx_stream?token=text HTTP/1.1
Host: api.bluegamma.io
x-api-key: YOUR_API_KEY
Accept: */*
No content
Calculates the yield for a government bond yield based on country and tenor. Yields are zero coupon yields, assuming S/A compounding.
API token required for authentication
The ISO country code for which to retrieve the government bond yield (e.g., US, UK, DE).
{"summary":"US Treasury bonds","value":"US"}The tenor or specific date for the government bond yield (e.g., '1Y', '5Y', '10Y' or '2030-12-31').
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2030-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$The forward start date or tenor for the government bond yield (e.g., '1Y', '5Y', '10Y' or '2030-12-31').
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2030-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZSuccessful retrieval of government bond yield data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}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.
API token required for authentication
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).
SOFRPossible values: 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
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$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.
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2030-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZWhether to align periods to the end of each month.
trueSuccessful retrieval of forward curve data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}
]
}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.
API token required for authentication
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).
SOFRPossible values: 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.
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$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.
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2030-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZWhether to align periods to the end of each month.
trueA time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$Successful retrieval of discount curve data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}
]
}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_raterequestsAvoids rate limiting when querying many forward-starting swaps
Ideal for scenario analysis and forward rate projections
API token required for authentication
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).
SOFRPossible values: A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$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
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$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
2DA date in ISO 8601 only date format (YYYY-MM-DD)
2030-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$Whether to align start dates to the end of each month. When true, dates will be adjusted to month-end boundaries.
trueA time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$Day count convention for interest rate and swap calculations
Actual360Possible values: Day count convention for interest rate and swap calculations
Actual360Possible values: A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZSuccessful retrieval of forward-starting swap curve data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Validation error. Common causes:
- end_date must be later than start_date
- start_date cannot be more than 10 years in the past
- Date range exceeds maximum of 50 years
- Invalid tenor format (expected format: '5Y', '10Y', '3M', etc.)
- No valid swaps could be generated (all maturity dates in the past)
- Invalid day count convention
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}
]
}Fetches the fixing rate for a given index at a specific valuation time.
API token required for authentication
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.
SOFRPossible values: A date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31Successful retrieval of fixing rate data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Fixing not found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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"
}Returns historical swap rates for a given index and tenor over a date range (start_date to end_date).
API token required for authentication
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).
SOFRPossible values: A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31Successful retrieval of historical swap rates.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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"
}
]
}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
API token required for authentication
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).
SOFRPossible values: 2DA date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$2DA date in ISO 8601 only date format (YYYY-MM-DD)
2030-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$Day count convention for interest rate and swap calculations
Actual360Possible values: The day count convention used for the fixed leg. By default, uses the currency-specific convention
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.
4.25The first payment date (e.g., '2026-08-02'). If not provided, defaults to start_date + fixed_leg_frequency adjusted for business days.
2026-08-02Notional amount(s). Provide a single number for vanilla swaps or a list for amortizing swaps.
100000000Valuation time in ISO 8601 format. Defaults to current time if not provided.
2026-01-28T15:00:00ZSuccessful swap pricer calculation.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}
]
}Returns the list of available tenors for swap rates for a given index.
API token required for authentication
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).
SOFRPossible values: Successful retrieval of available swap rate tenors.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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"
]
}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.
API token required for authentication
12-character ISIN of the bond (uppercase alphanumeric).
XS1234567890Pattern: ^[A-Z0-9]{12}$Bond descriptive fields and indicative pricing.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Not Found - The requested resource or data could not be found.
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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"
}
}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)
API token required for authentication
Inflation indices available for zero-coupon inflation rate calculations
UK RPIPossible values: A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZSuccessful retrieval of inflation curve data.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Unprocessable Entity - a parameter failed validation. detail is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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 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
API token required for authentication
A date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31Overnight index name. Supported indices include SOFR, SONIA, ESTR, SORA, TONAR, CORRA, SARON, CDI, and Fed Funds.
{"summary":"SOFR index","value":"SOFR"}Possible values: Notional amount for calculation. If not provided, defaults to 1,000,000.
1000000Example: {"summary":"1 million notional","value":1000000}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.
0Example: {"summary":"No spread","value":0}Day count convention for the calculation. If not provided, uses the index-specific default convention.
{"summary":"Actual/360","value":"Actual/360"}Number of days to lag the reference rate. If not provided, defaults to 0.
0Example: {"summary":"No lookback","value":0}Number of days at the end of the period without rate resets. If not provided, defaults to 0.
0Example: {"summary":"No lockout","value":0}Whether to apply observation shift to the rate calculation. If not provided, defaults to false.
falseExample: {"summary":"No observation shift","value":false}Successful calculation of compounded overnight rate.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Unprocessable Entity - Invalid parameters provided (e.g., end date before start date, unsupported index).
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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
}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.
API token required for authentication
Indices supported for FRA rate retrieval. These are IBOR-type indices denominated in EUR, SEK, NOK, and DKK.
3M EURIBORPossible values: A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC.
2024-01-01T15:00:00ZSuccessful retrieval of FRA rates.
Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. detail says what to change.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
No FRA rates found for the given index and valuation time.
Unprocessable Entity - FRA rates not available for the given index.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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 (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=payerAPI token required for authentication
The reference rate index (e.g., SOFR, SONIA, 3M EURIBOR). Must be a supported post-LIBOR transition index.
SOFRThe start date for the underlying swap (= exercise date). Provide either a specific date (e.g., '2028-02-21') or a tenor (e.g., '2Y').
2YThe 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.
5YStrike rate as a percentage (e.g., 3.5 for 3.5%). If omitted, the swaption is priced at ATM (forward swap rate).
3.5Notional amount. Defaults to 10,000,000.
10000000Example: 10000000Swaption type. Defaults to 'payer'.
payerExample: payerPossible values: Valuation time in ISO 8601 format. Defaults to current time.
Successful swaption pricing
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Validation Error - Invalid input parameters.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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 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_rhoandsabr_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.5API token required for authentication
The reference rate index (e.g., SOFR, SONIA, 3M EURIBOR). Must be a supported post-LIBOR transition index.
SOFRThe cap/floor start date. Provide either a specific date (e.g., '2026-06-01') or a tenor (e.g., '3M').
3MThe 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.
3YStrike 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.
4.5Notional amount. Defaults to 10,000,000.
10000000Example: 10000000Instrument type. Defaults to 'cap'.
capExample: capPossible values: Caplet/floorlet frequency (e.g., '1M', '3M', '6M'). Defaults to '3M' (quarterly).
3MExample: 3MValuation time in ISO 8601 format. Defaults to current time.
2026-01-28T15:00:00ZVolatility 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.
autoExample: autoPossible values: 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.
-0.25SABR 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.
0.5Successful cap/floor pricing
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Validation Error - Invalid input parameters.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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 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, andsabr_nu
Returns a single pricing result for a single strike, or an array of pricing results when strike_rate is provided as a list.
API token required for authentication
The reference rate index (e.g., SOFR, 3M EURIBOR, SONIA)
SOFR2DA date in ISO 8601 only date format (YYYY-MM-DD)
2025-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$2DA date in ISO 8601 only date format (YYYY-MM-DD)
2030-12-31A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$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.
[2,3,3.5,4,5]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.
10000000Example: [10000000,9500000,9000000,8500000]Instrument type. Defaults to cap.
capExample: capPossible values: A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)
1YPattern: ^[0-9]+[DWMY]$Caplet/floorlet frequency. Defaults to 3M.
3MValuation time in ISO 8601 format. Defaults to current time.
2026-01-28T15:00:00ZVolatility 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.
autoExample: autoPossible values: SABR correlation parameter (-1 to 1). Required when vol_smile=sabr; ignored otherwise.
-0.25SABR vol-of-vol parameter (> 0). Required when vol_smile=sabr; ignored otherwise.
0.5Successful cap/floor pricing
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.
Forbidden - the API key is missing or invalid (from the gateway, with message), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with detail).
Validation Error - Invalid input parameters.
Too Many Requests - the key's rate limit was hit (Too Many Requests, retry after Retry-After seconds) or, on plans with a daily quota, the quota was used up (Limit Exceeded, until 00:00 UTC). Contact sales for higher limits.
Internal Server Error - the request failed on our side; retrying later may succeed. Most return detail; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns message.
Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.
Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.
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?

