Fetch zero-coupon rates for discounting cash flows, building DCF models, and valuing debt portfolios.
The /zero_rate endpoint returns the zero-coupon rate (spot rate) for any date and index. Use this when you need to discount future cash flows to present value.
When to Use Zero Rates
Use Case
Why Zero Rates?
Discount cash flows in a DCF model
Zero rates give you the pure time-value of money for each maturity
Value a loan or bond portfolio
Calculate the present value of future principal and interest payments
Build a pricing engine
Zero rates are the foundation for swap, bond, and derivative pricing
Compare rates across tenors
Unlike swap rates, zero rates can be directly compared
Zero rates vs swap rates: Swap rates are averages across the life of the swap. Zero rates represent the rate for a specific maturity — no coupon effects.
Basic Example
import requestsurl ="https://api.bluegamma.io/v1/zero_rate"headers ={"x-api-key":"your_api_key"}params ={"index":"SOFR","date":"2030-12-17"# 5 years from now}response = requests.get(url,headers=headers,params=params)print(response.json())
Response:
Field
Description
zero_rate
The zero-coupon rate as a percentage (3.71%)
day_count
Day count convention used (Actual/360 for SOFR)
compounding
Compounding convention (Simple for OIS indices)
timestamp
When the underlying market data was captured
Use Case: Discounting Cash Flows
A common task is discounting a series of future cash flows to present value — for example, valuing a loan with scheduled repayments.
Simple compounding: The API returns zero rates with simple compounding, so the discount factor formula is DF = 1 / (1 + rate × time), not 1 / (1 + rate)^time.
Example: Value a 5-Year Amortising Loan
Output:
Need this data for your valuation process? We'll get you set up with API access. Book a demo →
Use Case: Building a Zero Curve
Fetch zero rates across multiple tenors to build a complete curve:
Current SOFR Zero Curve (December 2025):
Maturity
Zero Rate
Dec 2026 (1Y)
3.48%
Dec 2027 (2Y)
3.39%
Dec 2028 (3Y)
3.46%
Dec 2029 (4Y)
3.57%
Dec 2030 (5Y)
3.71%
Dec 2031 (6Y)
3.87%
Dec 2032 (7Y)
4.03%
The curve is slightly inverted at the short end (1Y > 2Y), then steepens — reflecting market expectations of near-term rate cuts followed by normalisation.
Ready to pull curves for your models? Get an API key and start fetching live data in minutes.