> For the complete documentation index, see [llms.txt](https://www.bluegamma.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.bluegamma.io/documentation/integrations/api/how-to-guides.md).

# API How-To Guides

Use these guides to learn how to fetch swap rates, forward curves, and other interest rate data using the BlueGamma API.

Each guide includes a code example and tips for getting accurate, production-ready results — whether you're powering internal tools, pricing models, or dashboards.

#### [Fetching a Swap Curve](/documentation/integrations/api/how-to-guides/fetching-a-swap-curve.md)

Get a complete swap curve across all tenors for any index — includes guidance on which index to use for each currency.

#### [Fetching a Government Bond Curve](/documentation/integrations/api/how-to-guides/fetching-a-government-bond-curve.md)

Retrieve government bond yields (US Treasuries, UK Gilts, German Bunds, etc.) and build yield curves.

#### [Fetching FX Forward Rates](/documentation/integrations/api/how-to-guides/fetching-fx-forward-rates.md)

Get forward exchange rates for any supported currency pair to model FX exposure and hedge foreign currency risk.

#### [Fetching FX Forward Curves](/documentation/integrations/api/how-to-guides/fetching-an-fx-forward-curve.md)

Get a full FX forward curve for a currency pair in a single request with `/fx_forward_curve`.

#### [Fetching a Swap Rate](/documentation/integrations/api/how-to-guides/fetching-a-swap-rate.md)

Get a live or historical par swap rate for SOFR, EURIBOR, SONIA, and more.

#### [How to Price a Swap Using the API](/documentation/integrations/api/how-to-guides/how-to-price-a-swap-using-the-api.md)

Use the `/swap_pricer` endpoint to price vanilla or amortizing swaps with full cashflow analysis. Get the mid swap rate (fair rate) or mark-to-market (MTM) for existing swaps. Supports custom amortization schedules and first payment dates for loan hedging.

#### [How to Price a Swaption Using the API](/documentation/integrations/api/how-to-guides/how-to-price-a-swaption-using-the-api.md)

Use the `/swaption_price` endpoint to price European payer and receiver swaptions with NPV, delta, and vega. Supports 20+ indices including SOFR, SONIA, and EURIBOR.

#### [Pricing an Interest Rate Cap](/documentation/integrations/api/how-to-guides/pricing-an-interest-rate-cap.md)

Use the `/cap_floor_price` endpoint to price caps and floors with caplet-level breakdowns, volatility smile controls, and multi-strike POST requests.

#### [Fetching Forward Starting Swap Rates](/documentation/integrations/api/how-to-guides/fetching-forward-starting-swap-rates.md)

Price forward starting swaps where the effective date is in the future. Uses EURIBOR examples with tenor and date inputs.

#### [Fetching Forward Swap Curves](/documentation/integrations/api/how-to-guides/fetching-a-forward-swap-curve.md)

Get swap rates for one tenor across many forward start dates in a single request with `/forward_swap_curve`.

#### [Fetching Fixing Rates](/documentation/integrations/api/how-to-guides/fetching-fixing-rates.md)

Retrieve published fixing rates for overnight and term benchmarks like SOFR, SONIA, and EURIBOR.

#### [Fetching Compounded RFR Rates](/documentation/integrations/api/how-to-guides/fetching-compounded-rfr-rates.md)

Calculate compounded overnight rates (realised rates) for SOFR, SONIA, ESTR, and other RFR indices.

#### [Fetching Central Bank Probabilities](/documentation/integrations/api/how-to-guides/fetching-central-bank-probabilities.md)

Get market-implied hike, hold and cut probabilities for upcoming central bank decisions, and the full probability matrix over rate levels.

#### [Fetching Inflation Curves](/documentation/integrations/api/how-to-guides/fetching-an-inflation-curve.md)

Get zero-coupon inflation curves for UK RPI, UK CPI and EU HICP with `/inflation_curve`.

#### [Building a Historical Time Series](/documentation/integrations/api/how-to-guides/building-a-historical-time-series.md)

Pull daily history via `/historical_swap_rates` or build an intraday series with `/swap_rate` + `valuation_time`.

#### [Getting Forward Rates](/documentation/integrations/api/how-to-guides/getting-forward-rates.md)

Calculate implied forward rates between two future tenors, like 6M → 9M.

#### [Fetching Forward Curves](/documentation/integrations/api/how-to-guides/getting-a-forward-curve.md)

Generate full forward rate curves for pricing, forecasting, and cash flow projection — includes guidance on when to fetch vs. store curves.

#### [Getting Discount Factors](/documentation/integrations/api/how-to-guides/getting-discount-factors.md)

Retrieve individual or full curves of discount factors for DCF models and risk systems.

#### [Fetching a Discount Curve](/documentation/integrations/api/how-to-guides/fetching-a-discount-curve.md)

Get a schedule of discount factors between two dates at a chosen frequency with `/discount_curve`.

#### [Fetching Zero Rates](/documentation/integrations/api/how-to-guides/fetching-zero-rates.md)

Get zero-coupon rates for discounting cash flows, building DCF models, and valuing loan portfolios.

#### [Streaming Real-Time FX Data](/documentation/integrations/api/how-to-guides/streaming-real-time-fx-data.md)

Stream live FX mid, bid and ask quotes over a WebSocket connection.

#### [How do I compare BlueGamma data with Bloomberg or other platforms?](/documentation/reference/validating-bluegamma-api-data-against-bloomberg-or-other-platforms.md)

Compare BlueGamma results to Bloomberg or other providers using consistent conventions.

***

Create a key under **API Keys** in the app sidebar. See [Authentication](/documentation/integrations/api/authentication.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.bluegamma.io/documentation/integrations/api/how-to-guides.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
