get_zero_rate
Returns the zero rate (spot rate) for a specific date and rate index.
The zero rate is returned as a percentage with configurable compounding and day count conventions.
Args:
index: Rate index (e.g., SOFR, 6M EURIBOR, SONIA)
date: Date or tenor for the zero rate (e.g., '2025-12-31' or '1Y')
valuation_time: Optional valuation time
day_count: Day count convention (Actual360, Actual365, Actual365Fixed, Thirty360BondBasis, Thirty360EuroBondBasis, Business252)
compounding: Compounding type (Simple, Compounded, Continuous). Default: Simple
compounding_frequency: Compounding frequency (1M, 3M, 6M, 12M). Only used when compounding is Compounded. Default: 12M
Docs: https://www.bluegamma.io/interest-rate-api#tag/forward--discount-curves/get/zero_rate
get_fx_rate
Retrieves the FX spot rate for a given currency pair.
Docs: https://www.bluegamma.io/interest-rate-api#tag/fx/get/fx
get_fx_forward
Returns the FX forward rate for a given currency pair and date.
Docs: https://www.bluegamma.io/interest-rate-api#tag/fx/get/fx_forward
get_gov_yield
Returns the zero-coupon government bond yield for a country and maturity.
Docs: https://www.bluegamma.io/interest-rate-api#tag/government-bonds/get/gov_yield
get_fixing
Returns the fixing for a rate index at a given date.
Docs: https://www.bluegamma.io/interest-rate-api#tag/central-bank-and-benchmark-rates/get/fixing
get_forward_curve
Returns a forward curve with rates for each period between start_date and end_date.
Args:
index: The interest rate index (e.g., "SOFR", "6M EURIBOR")
start_date: Start date for the curve (YYYY-MM-DD or period like "1Y")
end_date: End date for the curve (YYYY-MM-DD or period like "5Y")
frequency: Frequency of the curve points (e.g., "3M", "6M", "12M")
tenor: Tenor for each forward rate calculation (e.g., "3M", "6M")
valuation_time: Optional valuation time (ISO format)
is_end_of_month: Whether to use end-of-month dates (default: True)
Returns:
JSON string containing the forward curve data with start_date, end_date,
forward_rate for each period.
Docs: https://www.bluegamma.io/interest-rate-api#tag/forward--discount-curves/get/forward_curve
get_discount_curve
Returns a discount curve with discount factors for each date between start_date and end_date.
Args:
index: The interest rate index (e.g., "SOFR", "6M EURIBOR")
start_date: Start date for the curve (YYYY-MM-DD or period like "1Y")
end_date: End date for the curve (YYYY-MM-DD or period like "5Y")
frequency: Frequency of the curve points (e.g., "3M", "6M", "12M")
valuation_time: Optional valuation time (ISO format)
is_end_of_month: Whether to use end-of-month dates (default: True)
Returns:
JSON string containing the discount curve data with date and discount_factor
for each point on the curve.
Docs: https://www.bluegamma.io/interest-rate-api#tag/forward--discount-curves/get/discount_curve
get_historical_swap_rates
Returns historical swap rates for a given index and tenor over a specified date range.
Args:
index: The specific index (e.g., "SOFR", "1M EURIBOR", "6M EURIBOR", "SONIA") for the swap rates
tenor: The tenor for each swap rate (e.g., "1Y", "5Y", "10Y")
start_date: The start date for the swap rates (inclusive). Must be a specific date (e.g., "2024-01-01")
end_date: The end date for the swap rates (inclusive). Must be a specific date (e.g., "2024-12-31")
Returns:
JSON string containing historical swap rates data including:
- index_name: The index name
- currency: The currency
- fixed_leg_day_count: Day count convention for fixed leg
- floating_leg_day_count: Day count convention for floating leg
- fixed_leg_frequency: Payment frequency for fixed leg
- floating_leg_frequency: Payment frequency for floating leg
- swap_rates: Array of historical rates with date, rate, and tenor
Docs: https://www.bluegamma.io/interest-rate-api#tag/swap-rates/get/historical_swap_rates
get_swap_rate_tenors
Returns the list of available tenors for swap rates for a given index.
Args:
index: The specific index (e.g., "SOFR", "1M EURIBOR", "6M EURIBOR", "SONIA") for which to retrieve available swap rate tenors
Returns:
JSON string containing:
- index: The index name
- tenors: Array of available tenors (e.g., ["1Y", "2Y", "5Y", "10Y"])
Docs: https://www.bluegamma.io/interest-rate-api#tag/swap-rates/get/swap_rate_tenors
get_fras
Get Forward Rate Agreement (FRA) rates for a specific index.
Retrieves FRA rates for indices denominated in EUR, SEK, NOK, and DKK.
Returns all available tenors and their corresponding rates.
Args:
index: Index name (e.g., 3M EURIBOR, 3M STIBOR, 3M NIBOR, 3M CIBOR)
valuation_time: Optional valuation time in ISO format. Defaults to current time.
Returns:
JSON string containing:
- index: The index name
- currency: The derived currency code
- valuation_time: The valuation time used
- timestamp: The actual data timestamp
- fras: Array of FRA rates with tenor, type, and value
get_fra_rate_by_tenor
Get a specific FRA rate for a currency and tenor.
Retrieves a single Forward Rate Agreement (FRA) rate for a specific currency and tenor combination.
Args:
currency: Currency code (EUR, SEK, NOK, or DKK)
tenor: Tenor string (e.g., "3X6", "6X9", "1QX3")
valuation_time: Optional valuation time in ISO format. Defaults to current time.
Returns:
JSON string containing:
- currency: The currency code
- tenor: The tenor
- valuation_time: The valuation time used
- rate: The FRA rate value
- type: The instrument type
- instrument: The instrument identifier
- data_timestamp: The data timestamp