API Reference
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? Request API access
This endpoint calculates the swap rate based on the specified parameters.
API token required for authentication
Common interest rate benchmarks and indices used in financial markets
SOFRPossible values: The start date for the swap. Provide either a specific date (e.g., '2025-12-31') or a tenor (e.g., '6M', '1Y'), but not both.
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 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]$Payment frequency for financial instruments
1YPayment frequency for financial instruments
1YThe day count convention used for the fixed leg of the swap. By default, we use the currency-specific day count convention.
Actual365FixedPossible values: The day count convention used for the floating leg of the swap. By default, we use the currency-specific day count convention.
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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Unprocessable Entity - The request was well-formed but contains semantic errors.
Internal Server Error - An error occurred while processing the request.
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
Common interest rate benchmarks and indices used in financial markets
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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Not Found - No tenors available for the specified index or currency.
Unprocessable Entity - The provided index name is not found in the configuration.
Internal Server Error - An error occurred while processing the request.
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
Common interest rate benchmarks and indices used in financial markets
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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Not Found - The requested resource or data could not be found.
Unprocessable Entity - The request was well-formed but contains semantic errors.
Internal Server Error - An error occurred while processing the request.
Fetches the discount factor based on the specified parameters, including reference rate, date and optional valuation time.
API token required for authentication
Common interest rate benchmarks and indices used in financial markets
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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Not Found - The requested resource or data could not be found.
Unprocessable Entity - The request was well-formed but contains semantic errors.
Internal Server Error - An error occurred while processing the request.
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
Common interest rate benchmarks and indices used in financial markets
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 the zero rate calculation. If not provided, uses the curve's default day count.
{"summary":"Actual/360","value":"Actual360"}Possible 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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Not Found - The requested resource or data could not be found.
Unprocessable Entity - The request was well-formed but contains semantic errors.
Internal Server Error - An error occurred while processing the request.
Fetches the foreign exchange spot rate for the specified currency pair.
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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Not Found - The requested resource or data could not be found.
Unprocessable Entity - The request was well-formed but contains semantic errors.
Internal Server Error - An error occurred while processing the request.
Fetches the forward exchange rate for a given currency pair. The forward rate is determined based on the specified date or defaults to the current date.
API token required for authentication
The currency pair in ISO format (e.g., "EURUSD" for Euro to US Dollar).
EURUSDThe date for which the forward rate is requested. Defaults to the current date if not specified.
2024-12-31Successful retrieval of FX forward rate data.
Bad Request – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Not Found - The requested resource or data could not be found.
Unprocessable Entity - The request was well-formed but contains semantic errors.
Internal Server Error - An error occurred while processing the request.
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,
"timestamp": "2025-01-15T14:30:25.123Z"
}Connection status:
Subscription confirmations:
Heartbeat:
Client Commands (send from client to server):
Subscribe to additional symbols:
Unsubscribe from symbols:
Ping (optional - server sends automatic pings):
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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
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.
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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Not Found - The requested resource or data could not be found.
Unprocessable Entity - The request was well-formed but contains semantic errors.
Internal Server Error - An error occurred while processing the request.
Returns a forward curve constructed over a schedule of periods between start_date and end_date.
API token required for authentication
Common interest rate benchmarks and indices used in financial markets
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]$Payment frequency for financial instruments
1YA 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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Not Found - The requested resource or data could not be found.
Unprocessable Entity - The request was well-formed but contains semantic errors.
Internal Server Error - An error occurred while processing the request.
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 (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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Fixing not found.
Internal Server Error - An error occurred while processing the request.
Returns discount factors for a schedule between start_date and end_date using a given index.
API token required for authentication
Common interest rate benchmarks and indices used in financial markets
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.
truePayment frequency for financial instruments
1YSuccessful retrieval of discount curve data.
Bad Request – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Not Found - The requested resource or data could not be found.
Unprocessable Entity - The request was well-formed but contains semantic errors.
Internal Server Error - An error occurred while processing the request.
Returns historical swap rates for a given index and tenor over a date range (start_date to end_date).
API token required for authentication
Common interest rate benchmarks and indices used in financial markets
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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Not Found - The requested resource or data could not be found.
Unprocessable Entity - The request was well-formed but contains semantic errors.
Internal Server Error - An error occurred while processing the request.
Returns the list of available tenors for swap rates for a given index.
API token required for authentication
Common interest rate benchmarks and indices used in financial markets
SOFRPossible values: Successful retrieval of available swap rate tenors.
Bad Request – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Not Found - The requested resource or data could not be found.
Unprocessable Entity - The request was well-formed but contains semantic errors.
Internal Server Error - An error occurred while processing the request.
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)
2030-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 in percentage (e.g. 5 = 5%). 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 – check error.response.data.detail which contains a descriptive error message or a list of parameter validation errors.
Unprocessable Entity - Invalid parameters provided (e.g., end date before start date, unsupported index).
Internal Server Error - An error occurred while processing the request.
Last updated
Was this helpful?

