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.
GET /v1/swap_rate?index=SOFR&start_date=2D&maturity_date=2D&fixed_leg_frequency=1Y 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": "Actual365Fixed",
"valuation_time": "2024-01-01T15:00:00Z",
"swap_rate": 3.34567803
}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.
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
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.
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
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.
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 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.
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
}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.
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": "2025-12-31",
"rate": 1.2345
}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.
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.
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.
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.
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.
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
}
]
}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.
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
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.
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": "Actual365Fixed",
"floating_leg_day_count": "Actual360",
"fixed_leg_frequency": "6M",
"floating_leg_frequency": "3M",
"swap_rates": [
{
"rate": 3.34567803,
"date": "2024-06-01",
"tenor": "1Y"
}
]
}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.
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"
]
}Last updated