# 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](https://www.bluegamma.io/) to explore use cases and solutions.

🔗 **Ready to get started?**\
[Request API access](https://share-eu1.hsforms.com/1iWDSyV6gT6eRZUpxMC-xUQf5kjl)

***

## Get Swap Rate

> This endpoint calculates the swap rate based on the specified parameters.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-a-swap-rate>" target="\_blank">View guide with examples →\</a><br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Swap Rates","description":"Live and historical swap rate calculations, available tenors, and swap curve construction"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"Index":{"type":"string","description":"Common interest rate benchmarks and indices used in financial markets","enum":["SOFR","Fed Funds","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","6M EURIBOR","3M EURIBOR","1M EURIBOR","SONIA","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","6M MIFOR","TONAR","91D CD","3M KLIBOR","3M NIBOR","6M NIBOR","3M BKBM","6M WIBOR","3M SAIBOR","3M STIBOR","SORA","3M TRYIBOR","3M TAIBOR","3M JIBAR","6M BBSW","3M BBSW","28 Day TIIE"]},"DateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"}]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Tenor":{"type":"string","description":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"LaterDateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/LaterDate"},{"$ref":"#/components/schemas/Tenor"}]},"LaterDate":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Frequency":{"type":"string","description":"Payment frequency for financial instruments"},"DayCountConvention":{"type":"string","description":"Day count convention for interest rate and swap calculations","enum":["Actual360","Actual365","Actual365Fixed","Thirty360BondBasis","Thirty360EuroBondBasis","Business252"]},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/swap_rate":{"get":{"summary":"Get Swap Rate","operationId":"getSwapRate","tags":["Swap Rates"],"description":"This endpoint calculates the swap rate based on the specified parameters.\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-a-swap-rate\" target=\"_blank\">View guide with examples →</a>\n","parameters":[{"name":"index","in":"query","description":"The specific index (e.g., SOFR, 1M EURIBOR, 6M EURIBOR OR SONIA) on which the swap rate is based.","required":true,"schema":{"$ref":"#/components/schemas/Index"}},{"name":"start_date","in":"query","description":"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.","required":true,"schema":{"$ref":"#/components/schemas/DateOrTenor"}},{"name":"maturity_date","in":"query","description":"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.\n**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","required":true,"schema":{"$ref":"#/components/schemas/LaterDateOrTenor"}},{"name":"fixed_leg_frequency","in":"query","description":"The payment frequency for the fixed leg of the swap. Common values are '1M', '3M', '6M', '1Y'.","required":true,"schema":{"$ref":"#/components/schemas/Frequency"}},{"name":"floating_leg_frequency","in":"query","description":"The payment frequency for the floating leg of the swap. Common values are '1M', '3M', '6M', '1Y'. If not provided, the frequency defaults to match the fixed leg.","required":false,"schema":{"$ref":"#/components/schemas/Frequency"}},{"name":"fixed_leg_day_count","in":"query","description":"The day count convention used for the fixed leg of the swap. By default, we use the currency-specific day count convention.","required":false,"schema":{"$ref":"#/components/schemas/DayCountConvention"}},{"name":"floating_leg_day_count","in":"query","description":"The day count convention used for the floating leg of the swap. By default, we use the currency-specific day count convention.","required":false,"schema":{"$ref":"#/components/schemas/DayCountConvention"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful retrieval of calculated swap rate data.","content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"start_date":{"$ref":"#/components/schemas/Date"},"maturity_date":{"$ref":"#/components/schemas/Date"},"fixed_leg_first_payment_date":{"$ref":"#/components/schemas/Date"},"floating_leg_first_payment_date":{"$ref":"#/components/schemas/Date"},"floating_leg_frequency":{"type":"string"},"floating_leg_day_count":{"$ref":"#/components/schemas/DayCountConvention"},"fixed_leg_frequency":{"type":"string"},"fixed_leg_day_count":{"$ref":"#/components/schemas/DayCountConvention"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"swap_rate":{"type":"number"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Swap Curve

> 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.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-a-swap-curve>" target="\_blank">View guide with examples →\</a><br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Swap Rates","description":"Live and historical swap rate calculations, available tenors, and swap curve construction"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"Index":{"type":"string","description":"Common interest rate benchmarks and indices used in financial markets","enum":["SOFR","Fed Funds","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","6M EURIBOR","3M EURIBOR","1M EURIBOR","SONIA","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","6M MIFOR","TONAR","91D CD","3M KLIBOR","3M NIBOR","6M NIBOR","3M BKBM","6M WIBOR","3M SAIBOR","3M STIBOR","SORA","3M TRYIBOR","3M TAIBOR","3M JIBAR","6M BBSW","3M BBSW","28 Day TIIE"]},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"DayCountConvention":{"type":"string","description":"Day count convention for interest rate and swap calculations","enum":["Actual360","Actual365","Actual365Fixed","Thirty360BondBasis","Thirty360EuroBondBasis","Business252"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/get_swap_curve":{"get":{"summary":"Get Swap Curve","operationId":"getSwapRateCurve","tags":["Swap Rates"],"description":"This endpoint returns a complete swap curve for a given index, calculating swap rates\nfor all available tenors. It uses the predefined index configuration to automatically\ndetermine the appropriate day count conventions and frequencies, then fetches all\navailable tenors from the database.\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-a-swap-curve\" target=\"_blank\">View guide with examples →</a>\n","parameters":[{"name":"index","in":"query","description":"The name of the index for which to retrieve the swap curve.","required":true,"schema":{"$ref":"#/components/schemas/Index"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful retrieval of complete swap curve data for all available tenors.","content":{"application/json":{"schema":{"type":"object","properties":{"index_name":{"type":"string"},"start_date":{"$ref":"#/components/schemas/Date"},"floating_leg_frequency":{"type":"string"},"floating_leg_day_count":{"$ref":"#/components/schemas/DayCountConvention"},"fixed_leg_frequency":{"type":"string"},"fixed_leg_day_count":{"$ref":"#/components/schemas/DayCountConvention"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"swap_rates":{"type":"array","items":{"type":"object","properties":{"tenor":{"type":"string"},"swap_rate":{"type":"number"},"error":{"type":"string","description":"Error message if the calculation failed for this tenor"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"description":"Not Found - No tenors available for the specified index or currency."},"422":{"description":"Unprocessable Entity - The provided index name is not found in the configuration."},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Forward Rate

> Fetches the forward rate based on the specified parameters, including reference rate, start date, end date and optional valuation time.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/getting-forward-rates>" target="\_blank">View guide with examples →\</a><br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Forward & Discount Curves","description":"Forward curves, discount curves, and single-point calculations"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"Index":{"type":"string","description":"Common interest rate benchmarks and indices used in financial markets","enum":["SOFR","Fed Funds","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","6M EURIBOR","3M EURIBOR","1M EURIBOR","SONIA","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","6M MIFOR","TONAR","91D CD","3M KLIBOR","3M NIBOR","6M NIBOR","3M BKBM","6M WIBOR","3M SAIBOR","3M STIBOR","SORA","3M TRYIBOR","3M TAIBOR","3M JIBAR","6M BBSW","3M BBSW","28 Day TIIE"]},"DateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"}]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Tenor":{"type":"string","description":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/forward_rate":{"get":{"summary":"Get Forward Rate","operationId":"getForwardRate","tags":["Forward & Discount Curves"],"description":"Fetches the forward rate based on the specified parameters, including reference rate, start date, end date and optional valuation time.\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/getting-forward-rates\" target=\"_blank\">View guide with examples →</a>\n","parameters":[{"name":"index","in":"query","description":"The specific rate the user wants to base the forecast on (e.g., SOFR, 1M EURIBOR, 6M EURIBOR, SONIA, 3M NIBOR etc.).","required":true,"schema":{"$ref":"#/components/schemas/Index"}},{"name":"start_date","in":"query","description":"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.\n**Validation Requirements:** - Start date must be later than valuation time - If using a tenor, it represents the period from valuation time to start date\n","required":true,"schema":{"$ref":"#/components/schemas/DateOrTenor"}},{"name":"end_date","in":"query","description":"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.\n","required":true,"schema":{"$ref":"#/components/schemas/DateOrTenor"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful retrieval of forward curve data.","content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"start_date":{"$ref":"#/components/schemas/Date"},"end_date":{"$ref":"#/components/schemas/Date"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"forward_rate":{"type":"number"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Discount Factor

> Fetches the discount factor based on the specified parameters, including reference rate, date and optional valuation time.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/getting-discount-factors>" target="\_blank">View guide with examples →\</a><br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Forward & Discount Curves","description":"Forward curves, discount curves, and single-point calculations"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"Index":{"type":"string","description":"Common interest rate benchmarks and indices used in financial markets","enum":["SOFR","Fed Funds","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","6M EURIBOR","3M EURIBOR","1M EURIBOR","SONIA","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","6M MIFOR","TONAR","91D CD","3M KLIBOR","3M NIBOR","6M NIBOR","3M BKBM","6M WIBOR","3M SAIBOR","3M STIBOR","SORA","3M TRYIBOR","3M TAIBOR","3M JIBAR","6M BBSW","3M BBSW","28 Day TIIE"]},"DateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"}]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Tenor":{"type":"string","description":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/discount_factor":{"get":{"summary":"Get Discount Factor","operationId":"getDiscountFactor","tags":["Forward & Discount Curves"],"description":"Fetches the discount factor based on the specified parameters, including reference rate, date and optional valuation time.\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/getting-discount-factors\" target=\"_blank\">View guide with examples →</a>\n","parameters":[{"name":"index","in":"query","description":"The specific rate the user wants to base the forecast on (e.g., SOFR, 1M EURIBOR, 6M EURIBOR, SONIA, 3M NIBOR etc.).","required":true,"schema":{"$ref":"#/components/schemas/Index"}},{"name":"date","in":"query","description":"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.\n","required":true,"schema":{"$ref":"#/components/schemas/DateOrTenor"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful retrieval of discount rate data.","content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"date":{"$ref":"#/components/schemas/Date"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"discount_factor":{"type":"number"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Zero Rate

> 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.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-zero-rates>" target="\_blank">View guide with examples →\</a><br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Forward & Discount Curves","description":"Forward curves, discount curves, and single-point calculations"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"Index":{"type":"string","description":"Common interest rate benchmarks and indices used in financial markets","enum":["SOFR","Fed Funds","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","6M EURIBOR","3M EURIBOR","1M EURIBOR","SONIA","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","6M MIFOR","TONAR","91D CD","3M KLIBOR","3M NIBOR","6M NIBOR","3M BKBM","6M WIBOR","3M SAIBOR","3M STIBOR","SORA","3M TRYIBOR","3M TAIBOR","3M JIBAR","6M BBSW","3M BBSW","28 Day TIIE"]},"DateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"}]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Tenor":{"type":"string","description":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"DayCountConvention":{"type":"string","description":"Day count convention for interest rate and swap calculations","enum":["Actual360","Actual365","Actual365Fixed","Thirty360BondBasis","Thirty360EuroBondBasis","Business252"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/zero_rate":{"get":{"summary":"Get Zero Rate","operationId":"getZeroRate","tags":["Forward & Discount Curves"],"description":"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.\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-zero-rates\" target=\"_blank\">View guide with examples →</a>\n","parameters":[{"name":"index","in":"query","description":"The specific rate the user wants to base the forecast on (e.g., SOFR, 1M EURIBOR, 6M EURIBOR, SONIA, 3M NIBOR etc.).","required":true,"schema":{"$ref":"#/components/schemas/Index"}},{"name":"date","in":"query","description":"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.\n","required":true,"schema":{"$ref":"#/components/schemas/DateOrTenor"}},{"$ref":"#/components/parameters/valuation_time"},{"name":"day_count","in":"query","description":"Day count convention for the zero rate calculation. If not provided, uses the curve's default day count.\n","required":false,"schema":{"$ref":"#/components/schemas/DayCountConvention"}},{"name":"compounding","in":"query","description":"Compounding type for the zero rate. Default is Simple.\n","required":false,"schema":{"type":"string","enum":["Simple","Compounded","Continuous"],"default":"Simple"}},{"name":"compounding_frequency","in":"query","description":"Compounding frequency. Only applicable when compounding is set to 'Compounded'. Default is 12M (Annual).\n","required":false,"schema":{"type":"string","enum":["1M","3M","6M","12M"],"default":"12M"}}],"responses":{"200":{"description":"Successful retrieval of zero rate data.","content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"date":{"$ref":"#/components/schemas/Date"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"zero_rate":{"type":"number"},"day_count":{"$ref":"#/components/schemas/DayCountConvention"},"compounding":{"type":"string"},"compounding_frequency":{"type":"string","description":"Only present when compounding is 'Compounded'"},"timestamp":{"$ref":"#/components/schemas/DateTime"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get FX Spot Rate

> Fetches the foreign exchange spot rate for the specified currency pair.

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"FX","description":"FX spot and forward rates, and real-time market data"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"schemas":{"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/fx":{"get":{"summary":"Get FX Spot Rate","operationId":"getFxSpotRate","tags":["FX"],"description":"Fetches the foreign exchange spot rate for the specified currency pair.","parameters":[{"name":"currency_pair","in":"query","description":"Currency pair for which to retrieve the FX spot rate (e.g., EURUSD, GBPJPY).","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful retrieval of FX spot rate data.","content":{"application/json":{"schema":{"type":"object","properties":{"currency_pair":{"type":"string"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"rate":{"type":"number"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get FX Forward Rate

> Returns the forward exchange rate for a given currency pair and date. The response includes the forward rate along with spot rate, forward diff, premium, and days forward.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-fx-forward-rates>" target="\_blank">View guide with examples →\</a><br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"FX","description":"FX spot and forward rates, and real-time market data"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}}},"paths":{"/fx_forward":{"get":{"summary":"Get FX Forward Rate","operationId":"getFxForwardRate","tags":["FX"],"description":"Returns the forward exchange rate for a given currency pair and date. The response includes the forward rate along with spot rate, forward diff, premium, and days forward.\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-fx-forward-rates\" target=\"_blank\">View guide with examples →</a>\n","parameters":[{"name":"currency_pair","in":"query","description":"The currency pair in ISO format (e.g., \"EURUSD\" for Euro to US Dollar).","required":true,"schema":{"type":"string"}},{"name":"date","in":"query","description":"The forward date in YYYY-MM-DD format. Defaults to the current date if not specified.","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Successful retrieval of FX forward rate data.","content":{"application/json":{"schema":{"type":"object","properties":{"currency_pair":{"type":"string","description":"The currency pair requested."},"date":{"type":"string","format":"date","description":"The forward date in ISO 8601 format (YYYY-MM-DD)."},"rate":{"type":"number","description":"The forward exchange rate."},"spot_rate":{"type":"number","description":"The current spot rate."},"forward_diff":{"type":"number","description":"Difference between forward rate and spot rate (forward_rate - spot_rate)."},"premium":{"type":"string","description":"Forward premium/discount as a percentage."},"days_forward":{"type":"integer","description":"Number of days from today to the forward date."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get FX Forward Curve

> Fetches the complete FX forward curve for a given currency pair in a single API call.\
> \
> \*\*Two modes:\*\*\
> \
> \- \*\*Standard mode\*\* (default, \`frequency=standard\`): Returns spot rate plus forward rates for all available market tenors for the pair. The \`start\_date\` and \`end\_date\` parameters are ignored.\
> \
> \- \*\*Custom mode\*\* (any other frequency): Returns forward rates at the specified interval between \`start\_date\` and \`end\_date\`. Useful for custom date ranges or daily/weekly data.\
> \
> This endpoint is more efficient than making multiple \`/fx\_forward\` calls when you need the full curve.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-fx-forward-rates>" target="\_blank">View guide with examples →\</a><br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"FX","description":"FX spot and forward rates, and real-time market data"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}}},"paths":{"/fx_forward_curve":{"get":{"summary":"Get FX Forward Curve","operationId":"getFxForwardCurve","tags":["FX"],"description":"Fetches the complete FX forward curve for a given currency pair in a single API call.\n\n**Two modes:**\n\n- **Standard mode** (default, `frequency=standard`): Returns spot rate plus forward rates for all available market tenors for the pair. The `start_date` and `end_date` parameters are ignored.\n\n- **Custom mode** (any other frequency): Returns forward rates at the specified interval between `start_date` and `end_date`. Useful for custom date ranges or daily/weekly data.\n\nThis endpoint is more efficient than making multiple `/fx_forward` calls when you need the full curve.\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-fx-forward-rates\" target=\"_blank\">View guide with examples →</a>\n","parameters":[{"name":"currency_pair","in":"query","description":"The currency pair in ISO format (e.g., \"EURUSD\" for Euro to US Dollar).","required":true,"schema":{"type":"string"}},{"name":"frequency","in":"query","description":"The frequency of forward rate points. Use \"standard\" (default) for standard tenors, or specify an interval like \"1D\" (daily), \"1W\" (weekly), \"1M\" (monthly), \"3M\" (quarterly), \"6M\" (semi-annual), \"12M\" (annual).\n","required":false,"schema":{"type":"string","default":"standard","enum":["standard","1D","1W","1M","3M","6M","12M"]}},{"name":"start_date","in":"query","description":"Start date for custom frequency mode (ignored for standard mode).","required":false,"schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","description":"End date for custom frequency mode (ignored for standard mode). Defaults to 10 years from today.","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Successful retrieval of FX forward curve data.","content":{"application/json":{"schema":{"type":"object","properties":{"currency_pair":{"type":"string","description":"The currency pair requested."},"spot_rate":{"type":"number","description":"The current spot rate."},"valuation_time":{"type":"string","format":"date-time","description":"The timestamp of the valuation."},"frequency":{"type":"string","description":"The frequency used (standard or custom interval)."},"start_date":{"type":"string","format":"date","description":"Start date (only present in custom mode)."},"end_date":{"type":"string","format":"date","description":"End date (only present in custom mode)."},"curve":{"type":"array","description":"Array of forward rate points.","items":{"type":"object","properties":{"tenor":{"type":"string","description":"The tenor label (only present in standard mode)."},"date":{"type":"string","format":"date","description":"The forward date."},"forward_rate":{"type":"number","description":"The forward exchange rate."},"forward_diff":{"type":"number","description":"Difference between forward rate and spot rate (forward_rate - spot_rate)."}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Real-Time FX Streaming (WebSocket)

> 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=GBPUSD\`\
> \- \`token\`: your JWT token\
> \
> Server Messages (from server to client):\
> \
> Quote updates:\
> \`\`\`json\
> {\
> &#x20; "type": "quote",\
> &#x20; "symbol": "EURUSD",\
> &#x20; "mid": 1.0845,\
> &#x20; "timestamp": "2025-01-15T14:30:25.123Z"\
> }\
> \`\`\`\
> \
> Connection status:\
> \`\`\`json\
> {"type": "connected"}\
> {"type": "reconnecting", "timestamp": 1234567890}\
> \`\`\`\
> \
> Subscription confirmations:\
> \`\`\`json\
> {"type": "subscribed", "symbols": \["GBPUSD"]}\
> {"type": "unsubscribed", "symbols": \["EURUSD"]}\
> \`\`\`\
> \
> Heartbeat:\
> \`\`\`json\
> {"type": "ping"}\
> {"type": "pong"}\
> \`\`\`\
> \
> Client Commands (send from client to server):\
> \
> Subscribe to additional symbols:\
> \`\`\`json\
> {"action": "subscribe", "symbols": \["GBPUSD", "USDJPY"]}\
> \`\`\`\
> \
> Unsubscribe from symbols:\
> \`\`\`json\
> {"action": "unsubscribe", "symbols": \["EURUSD"]}\
> \`\`\`\
> \
> Ping (optional - server sends automatic pings):\
> \`\`\`json\
> {"action": "ping"}\
> \`\`\`\
> \
> Example Usage (JavaScript):\
> \`\`\`javascript\
> const url = 'wss\://streaming.bluegamma.io/fx\_stream?s=EURUSD\&token=YOUR\_TOKEN';\
> const ws = new WebSocket(url);\
> \
> ws.onmessage = (event) => {\
> &#x20; const data = JSON.parse(event.data);\
> &#x20; if (data.type === 'quote') {\
> &#x20;   console.log(\`${data.symbol}: ${data.mid}\`);\
> &#x20; }\
> };\
> \
> // Subscribe to more symbols dynamically\
> ws.addEventListener('open', () => {\
> &#x20; ws.send(JSON.stringify({action: 'subscribe', symbols: \['GBPUSD']}));\
> });\
> \`\`\`\
> \
> Example Usage (Python - websockets):\
> \`\`\`python\
> import asyncio, json, websockets\
> \
> async def run():\
> &#x20;   url = 'wss\://streaming.bluegamma.io/fx\_stream?s=EURUSD\&token=YOUR\_TOKEN'\
> &#x20;   async with websockets.connect(url) as ws:\
> &#x20;       await ws.send(json.dumps({"action": "subscribe", "symbols": \["GBPUSD"]}))\
> &#x20;       async for msg in ws:\
> &#x20;           data = json.loads(msg)\
> &#x20;           if data.get("type") == "quote":\
> &#x20;               print(data)\
> \
> asyncio.run(run())\
> \`\`\`<br>

````json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"FX","description":"FX spot and forward rates, and real-time market data"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}}},"paths":{"/fx_stream":{"get":{"summary":"Real-Time FX Streaming (WebSocket)","operationId":"fxStreamWebSocketInfo","tags":["FX"],"description":"Access live foreign exchange market data with real-time mid-prices derived from institutional market feeds.\n\nThis HTTP endpoint has been replaced by a dedicated WebSocket service and is kept here for documentation purposes for prospective users.\n\nConnect directly via WebSocket at: `wss://streaming.bluegamma.io/fx_stream`\n\nExample connection URL: `wss://streaming.bluegamma.io/fx_stream?s=EURUSD&token=YOUR_TOKEN`\n\nIf you previously relied on an HTTP redirect, please update your client to open a WebSocket connection directly.\n\nThe stream provides continuous market data via the WebSocket protocol for low-latency, bidirectional communication.\n\nQuery parameters:\n- `s`: one or more symbols (repeatable), e.g. `?s=EURUSD&s=GBPUSD`\n- `token`: your JWT token\n\nServer Messages (from server to client):\n\nQuote updates:\n```json\n{\n  \"type\": \"quote\",\n  \"symbol\": \"EURUSD\",\n  \"mid\": 1.0845,\n  \"timestamp\": \"2025-01-15T14:30:25.123Z\"\n}\n```\n\nConnection status:\n```json\n{\"type\": \"connected\"}\n{\"type\": \"reconnecting\", \"timestamp\": 1234567890}\n```\n\nSubscription confirmations:\n```json\n{\"type\": \"subscribed\", \"symbols\": [\"GBPUSD\"]}\n{\"type\": \"unsubscribed\", \"symbols\": [\"EURUSD\"]}\n```\n\nHeartbeat:\n```json\n{\"type\": \"ping\"}\n{\"type\": \"pong\"}\n```\n\nClient Commands (send from client to server):\n\nSubscribe to additional symbols:\n```json\n{\"action\": \"subscribe\", \"symbols\": [\"GBPUSD\", \"USDJPY\"]}\n```\n\nUnsubscribe from symbols:\n```json\n{\"action\": \"unsubscribe\", \"symbols\": [\"EURUSD\"]}\n```\n\nPing (optional - server sends automatic pings):\n```json\n{\"action\": \"ping\"}\n```\n\nExample Usage (JavaScript):\n```javascript\nconst url = 'wss://streaming.bluegamma.io/fx_stream?s=EURUSD&token=YOUR_TOKEN';\nconst ws = new WebSocket(url);\n\nws.onmessage = (event) => {\n  const data = JSON.parse(event.data);\n  if (data.type === 'quote') {\n    console.log(`${data.symbol}: ${data.mid}`);\n  }\n};\n\n// Subscribe to more symbols dynamically\nws.addEventListener('open', () => {\n  ws.send(JSON.stringify({action: 'subscribe', symbols: ['GBPUSD']}));\n});\n```\n\nExample Usage (Python - websockets):\n```python\nimport asyncio, json, websockets\n\nasync def run():\n    url = 'wss://streaming.bluegamma.io/fx_stream?s=EURUSD&token=YOUR_TOKEN'\n    async with websockets.connect(url) as ws:\n        await ws.send(json.dumps({\"action\": \"subscribe\", \"symbols\": [\"GBPUSD\"]}))\n        async for msg in ws:\n            data = json.loads(msg)\n            if data.get(\"type\") == \"quote\":\n                print(data)\n\nasyncio.run(run())\n```\n","parameters":[{"name":"s","in":"query","description":"Select which currency symbols to include in your real-time data stream.\nRepeat the `s` parameter to include multiple symbols (e.g., `?s=EURUSD&s=GBPUSD`).\nSupports major pairs (EUR/USD, GBP/USD), crosses (EUR/GBP, AUD/JPY), and emerging market currencies.\n\n**Supported symbols include:**\n- **Major pairs**: EURUSD, GBPUSD, USDJPY, USDCHF, AUDUSD, USDCAD, NZDUSD\n- **Euro crosses**: EURGBP, EURJPY, EURCHF, EURAUD, EURCAD\n- **Other crosses**: GBPJPY, CHFJPY, AUDJPY, CADJPY\n- **Emerging markets**: USDMXN, USDBRL, USDZAR, USDTRY, USDCNY\n\nComma-separated values are not accepted.\n","required":false,"schema":{"type":"array","items":{"type":"string"},"style":"form","explode":true,"default":["EURUSD"]}},{"name":"token","in":"query","description":"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.\n","required":true,"schema":{"type":"string"}}],"responses":{"302":{"description":"This endpoint provides documentation for the FX WebSocket streaming service. Connect directly using the WebSocket URL.\n","headers":{"Location":{"description":"WebSocket streaming endpoint URL with authentication token and selected symbols","schema":{"type":"string"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"description":"**Authentication Required**\n\nYour API key is missing, invalid, or has insufficient permissions for real-time data access.\nPlease verify your API key and ensure your subscription includes streaming data access.\n"},"500":{"description":"**Service Temporarily Unavailable**\n\nThe streaming service is experiencing high demand or temporary maintenance.\nPlease retry your connection in a few moments.\n"}}}}}}
````

## Get Government Bond Yield

> Calculates the yield for a government bond yield based on country and tenor. Yields are zero coupon yields, assuming S/A compounding.

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Government Bonds","description":"Government bond yields and treasury rate calculations"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"LaterDateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/LaterDate"},{"$ref":"#/components/schemas/Tenor"}]},"LaterDate":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Tenor":{"type":"string","description":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/gov_yield":{"get":{"summary":"Get Government Bond Yield","operationId":"getGovernmentBondYield","tags":["Government Bonds"],"description":"Calculates the yield for a government bond yield based on country and tenor. Yields are zero coupon yields, assuming S/A compounding.","parameters":[{"name":"country_code","in":"query","description":"The ISO country code for which to retrieve the government bond yield (e.g., US, UK, DE).","required":true,"schema":{"type":"string"}},{"name":"maturity","in":"query","description":"The tenor or specific date for the government bond yield (e.g., '1Y', '5Y', '10Y' or '2030-12-31').","required":true,"schema":{"$ref":"#/components/schemas/LaterDateOrTenor"}},{"name":"forward_start","in":"query","description":"The forward start date or tenor for the government bond yield (e.g., '1Y', '5Y', '10Y' or '2030-12-31').","required":false,"schema":{"$ref":"#/components/schemas/LaterDateOrTenor"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful retrieval of government bond yield data.","content":{"application/json":{"schema":{"type":"object","properties":{"country_code":{"type":"string"},"tenor":{"type":"string"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"yield":{"type":"number"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Forward Curve

> Returns a forward curve constructed over a schedule of periods between start\_date and end\_date.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/getting-a-forward-curve>" target="\_blank">View guide with examples →\</a><br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Forward & Discount Curves","description":"Forward curves, discount curves, and single-point calculations"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"Index":{"type":"string","description":"Common interest rate benchmarks and indices used in financial markets","enum":["SOFR","Fed Funds","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","6M EURIBOR","3M EURIBOR","1M EURIBOR","SONIA","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","6M MIFOR","TONAR","91D CD","3M KLIBOR","3M NIBOR","6M NIBOR","3M BKBM","6M WIBOR","3M SAIBOR","3M STIBOR","SORA","3M TRYIBOR","3M TAIBOR","3M JIBAR","6M BBSW","3M BBSW","28 Day TIIE"]},"DateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"}]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Tenor":{"type":"string","description":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"LaterDateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/LaterDate"},{"$ref":"#/components/schemas/Tenor"}]},"LaterDate":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Frequency":{"type":"string","description":"Payment frequency for financial instruments"},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/forward_curve":{"get":{"summary":"Get Forward Curve","operationId":"getForwardCurve","tags":["Forward & Discount Curves"],"description":"Returns a forward curve constructed over a schedule of periods between start_date and end_date.\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/getting-a-forward-curve\" target=\"_blank\">View guide with examples →</a>\n","parameters":[{"name":"index","in":"query","description":"The specific rate the user wants to base the forecast on (e.g., SOFR, 1M EURIBOR, 6M EURIBOR, SONIA, 3M NIBOR etc.).","required":true,"schema":{"$ref":"#/components/schemas/Index"}},{"name":"start_date","in":"query","description":"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.\n**Validation Requirements:** - Start date must be later than valuation time - If using a tenor, it represents the period from valuation time to start date\n","required":true,"schema":{"$ref":"#/components/schemas/DateOrTenor"}},{"name":"end_date","in":"query","description":"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.\n","required":true,"schema":{"$ref":"#/components/schemas/LaterDateOrTenor"}},{"name":"tenor","in":"query","description":"The tenor (time period) for each forward rate in the curve (e.g., '1M', '3M', '6M'). This represents the length of each forward-looking period in the curve.\n**Optional**: If not provided, a default tenor will be used based on the specified index.\n","required":false,"schema":{"$ref":"#/components/schemas/Tenor"}},{"name":"frequency","in":"query","description":"The frequency at which to generate curve points (e.g., '1M', '3M', '6M', '1Y').","required":true,"schema":{"$ref":"#/components/schemas/Frequency"}},{"$ref":"#/components/parameters/valuation_time"},{"name":"is_end_of_month","in":"query","description":"Whether to align periods to the end of each month.","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"Successful retrieval of forward curve data.","content":{"application/json":{"schema":{"type":"object","properties":{"start_date":{"$ref":"#/components/schemas/Date"},"end_date":{"$ref":"#/components/schemas/Date"},"index":{"$ref":"#/components/schemas/Index"},"tenor":{"$ref":"#/components/schemas/Tenor"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"is_end_of_month":{"type":"boolean"},"frequency":{"$ref":"#/components/schemas/Frequency"},"curve":{"type":"array","items":{"type":"object","properties":{"start_date":{"$ref":"#/components/schemas/Date"},"end_date":{"$ref":"#/components/schemas/Date"},"forward_rate":{"type":"number"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Discount Curve

> Returns discount factors for a schedule between start\_date and end\_date using a given index.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-a-discount-curve>" target="\_blank">View guide with examples →\</a><br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Forward & Discount Curves","description":"Forward curves, discount curves, and single-point calculations"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"Index":{"type":"string","description":"Common interest rate benchmarks and indices used in financial markets","enum":["SOFR","Fed Funds","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","6M EURIBOR","3M EURIBOR","1M EURIBOR","SONIA","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","6M MIFOR","TONAR","91D CD","3M KLIBOR","3M NIBOR","6M NIBOR","3M BKBM","6M WIBOR","3M SAIBOR","3M STIBOR","SORA","3M TRYIBOR","3M TAIBOR","3M JIBAR","6M BBSW","3M BBSW","28 Day TIIE"]},"DateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"}]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Tenor":{"type":"string","description":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"LaterDateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/LaterDate"},{"$ref":"#/components/schemas/Tenor"}]},"LaterDate":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"Frequency":{"type":"string","description":"Payment frequency for financial instruments"},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/discount_curve":{"get":{"summary":"Get Discount Curve","operationId":"getDiscountCurve","tags":["Forward & Discount Curves"],"description":"Returns discount factors for a schedule between start_date and end_date using a given index.\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-a-discount-curve\" target=\"_blank\">View guide with examples →</a>\n","parameters":[{"name":"index","in":"query","description":"The specific rate the user wants to base the discount factors on (e.g., SOFR, 1M EURIBOR, 6M EURIBOR, SONIA, 3M NIBOR etc.).","required":true,"schema":{"$ref":"#/components/schemas/Index"}},{"name":"start_date","in":"query","description":"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.\n","required":true,"schema":{"$ref":"#/components/schemas/DateOrTenor"}},{"name":"end_date","in":"query","description":"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.\n","required":true,"schema":{"$ref":"#/components/schemas/LaterDateOrTenor"}},{"$ref":"#/components/parameters/valuation_time"},{"name":"is_end_of_month","in":"query","description":"Whether to align periods to the end of each month.","required":false,"schema":{"type":"boolean","default":true}},{"name":"frequency","in":"query","description":"The frequency at which to generate curve points (e.g., '1M', '3M', '6M', '1Y').","required":true,"schema":{"$ref":"#/components/schemas/Frequency"}}],"responses":{"200":{"description":"Successful retrieval of discount curve data.","content":{"application/json":{"schema":{"type":"object","properties":{"start_date":{"$ref":"#/components/schemas/Date"},"end_date":{"$ref":"#/components/schemas/Date"},"index":{"$ref":"#/components/schemas/Index"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"is_end_of_month":{"type":"boolean"},"frequency":{"$ref":"#/components/schemas/Frequency"},"curve":{"type":"array","items":{"type":"object","properties":{"date":{"$ref":"#/components/schemas/Date"},"discount_factor":{"type":"number"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Forward-Starting Swap Curve

> This endpoint calculates forward-starting swap rates for a single tenor across multiple start dates.\
> \
> Returns how a specific swap tenor's rate evolves over different forward start dates,\
> reducing the need for multiple \`/swap\_rate\` API calls.\
> \
> \*\*Use Case:\*\* "How does the 5Y STIBOR swap rate change for swaps starting 3M, 6M, 9M, 12M from now?"\
> \
> \*\*Benefits:\*\*\
> \- Single API call replaces multiple parallel \`/swap\_rate\` requests\
> \- Avoids rate limiting when querying many forward-starting swaps\
> \- Ideal for scenario analysis and forward rate projections<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Forward & Discount Curves","description":"Forward curves, discount curves, and single-point calculations"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"Index":{"type":"string","description":"Common interest rate benchmarks and indices used in financial markets","enum":["SOFR","Fed Funds","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","6M EURIBOR","3M EURIBOR","1M EURIBOR","SONIA","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","6M MIFOR","TONAR","91D CD","3M KLIBOR","3M NIBOR","6M NIBOR","3M BKBM","6M WIBOR","3M SAIBOR","3M STIBOR","SORA","3M TRYIBOR","3M TAIBOR","3M JIBAR","6M BBSW","3M BBSW","28 Day TIIE"]},"Tenor":{"type":"string","description":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"DateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"}]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"LaterDateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/LaterDate"},{"$ref":"#/components/schemas/Tenor"}]},"LaterDate":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Frequency":{"type":"string","description":"Payment frequency for financial instruments"},"DayCountConvention":{"type":"string","description":"Day count convention for interest rate and swap calculations","enum":["Actual360","Actual365","Actual365Fixed","Thirty360BondBasis","Thirty360EuroBondBasis","Business252"]},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/forward_swap_curve":{"get":{"summary":"Get Forward-Starting Swap Curve","operationId":"getForwardSwapCurve","tags":["Forward & Discount Curves"],"description":"This endpoint calculates forward-starting swap rates for a single tenor across multiple start dates.\n\nReturns how a specific swap tenor's rate evolves over different forward start dates,\nreducing the need for multiple `/swap_rate` API calls.\n\n**Use Case:** \"How does the 5Y STIBOR swap rate change for swaps starting 3M, 6M, 9M, 12M from now?\"\n\n**Benefits:**\n- Single API call replaces multiple parallel `/swap_rate` requests\n- Avoids rate limiting when querying many forward-starting swaps\n- Ideal for scenario analysis and forward rate projections\n","parameters":[{"name":"index","in":"query","description":"The specific index (e.g., SOFR, 3M STIBOR, 3M EURIBOR, SONIA) on which the swap rates are based.","required":true,"schema":{"$ref":"#/components/schemas/Index"}},{"name":"tenor","in":"query","description":"The swap maturity length for all swaps in the curve (e.g., '5Y', '10Y'). This tenor is applied from each start_date to calculate the corresponding maturity_date.","required":true,"schema":{"$ref":"#/components/schemas/Tenor"}},{"name":"start_date","in":"query","description":"The first forward start date for the curve. Provide either a specific date (e.g., '2026-06-01') or a tenor (e.g., '3M', '1Y') representing the offset from valuation time.\nIf not provided, defaults to spot date (2 business days forward).\n**Validation Requirements:** - Cannot be more than 10 years in the past - Must be before end_date","required":false,"schema":{"$ref":"#/components/schemas/DateOrTenor"}},{"name":"end_date","in":"query","description":"The last forward start date for the curve. Provide either a specific date (e.g., '2027-06-01') or a tenor (e.g., '1Y', '5Y') representing the offset from start_date.\n**Validation Requirements:** - Must be later than start_date - Maximum range: 50 years from start_date","required":true,"schema":{"$ref":"#/components/schemas/LaterDateOrTenor"}},{"name":"frequency","in":"query","description":"The spacing between start dates in the curve (e.g., '1M', '3M', '6M', '1Y'). Determines how many data points will be generated between start_date and end_date.","required":true,"schema":{"$ref":"#/components/schemas/Frequency"}},{"name":"is_end_of_month","in":"query","description":"Whether to align start dates to the end of each month. When true, dates will be adjusted to month-end boundaries.","required":false,"schema":{"type":"boolean","default":true}},{"name":"fixed_leg_frequency","in":"query","description":"The payment frequency for the fixed leg of all swaps in the curve. Common values are '1M', '3M', '6M', '1Y'.","required":true,"schema":{"$ref":"#/components/schemas/Frequency"}},{"name":"floating_leg_frequency","in":"query","description":"The payment frequency for the floating leg of all swaps. If not provided, defaults to match the fixed leg frequency.","required":false,"schema":{"$ref":"#/components/schemas/Frequency"}},{"name":"fixed_leg_day_count","in":"query","description":"The day count convention for the fixed leg. If not provided, uses the currency-specific default.","required":false,"schema":{"$ref":"#/components/schemas/DayCountConvention"}},{"name":"floating_leg_day_count","in":"query","description":"The day count convention for the floating leg. If not provided, uses the currency-specific default.","required":false,"schema":{"$ref":"#/components/schemas/DayCountConvention"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful retrieval of forward-starting swap curve data.","content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"currency":{"type":"string"},"tenor":{"type":"string"},"start_date":{"$ref":"#/components/schemas/Date"},"end_date":{"$ref":"#/components/schemas/Date"},"frequency":{"type":"string"},"is_end_of_month":{"type":"boolean"},"fixed_leg_frequency":{"type":"string"},"floating_leg_frequency":{"type":"string","nullable":true},"fixed_leg_day_count":{"$ref":"#/components/schemas/DayCountConvention"},"floating_leg_day_count":{"$ref":"#/components/schemas/DayCountConvention"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"timestamp":{"type":"string","format":"date-time","description":"Timestamp of the underlying curve data"},"curve":{"type":"array","description":"Array of forward-starting swap rates, one for each start date in the schedule","items":{"type":"object","properties":{"start_date":{"$ref":"#/components/schemas/Date"},"maturity_date":{"$ref":"#/components/schemas/Date"},"swap_rate":{"type":"number","description":"The swap rate for a swap starting at start_date with the specified tenor"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"422":{"description":"Validation error. Common causes:\n- end_date must be later than start_date\n- start_date cannot be more than 10 years in the past\n- Date range exceeds maximum of 50 years\n- Invalid tenor format (expected format: '5Y', '10Y', '3M', etc.)\n- No valid swaps could be generated (all maturity dates in the past)\n- Invalid day count convention\n","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Fixing Rate

> Fetches the fixing rate for a given index at a specific valuation time.

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Central Bank and Benchmark Rates","description":"Interest rate fixings, central bank rates, and benchmark rate data for financial calculations"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"FixingIndex":{"type":"string","description":"Interest rate benchmarks and indices available for fixing rate retrieval (excludes SAIBOR)","enum":["SOFR","Fed Funds","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","6M EURIBOR","3M EURIBOR","1M EURIBOR","SONIA","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","3M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","Overnight MIBOR","6M MIFOR","TONAR","SWESTR","91D CD","3M KLIBOR","3M BKBM","6M WIBOR","SORA","3M TRYIBOR","3M TAIBOR","3M JIBAR","6M BBSW","3M BBSW","28 Day TIIE","FED Federal Funds Target Rate","BOE Bank Rate","ECB Main Refinancing Rate","RBA Cash Rate Target","BOC Target for the Overnight Rate","CBB SELIC Rate","PBOC Loan Prime Rate","CBC Monetary Policy Rate","CNB 2-Week Repo Rate","DNB Lending Rate","MNB Base Rate","RBI Policy Repo Rate","BOI Key Interest Rate","BOJ Overnight Call Rate","BANXICO Overnight Target Rate","RBNZ Official Cash Rate","Norges Bank Key Policy Rate","NBP Reference Rate","CBR Key Rate","SAMA Repo Rate","SARB Repo Rate","BOK Base Rate","Riksbank Policy Rate","SNB Policy Rate","CBRT Repo Rate"]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/fixing":{"get":{"summary":"Get Fixing Rate","operationId":"getFixingRate","tags":["Central Bank and Benchmark Rates"],"description":"Fetches the fixing rate for a given index at a specific valuation time.","parameters":[{"name":"index","in":"query","description":"The specific rate or benchmark for which to retrieve a daily published value. This includes traditional fixings (e.g., SOFR, 3M EURIBOR), as well as central bank policy rates (e.g., Fed Funds Target Rate, ECB Main Refinancing Rate, BOE Bank Rate).","required":true,"schema":{"$ref":"#/components/schemas/FixingIndex"}},{"name":"valuation_date","in":"query","description":"The specific date for the market data used in the calculation. If not provided, live data is used by default.","required":false,"schema":{"$ref":"#/components/schemas/Date"}}],"responses":{"200":{"description":"Successful retrieval of fixing rate data.","content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"valuation_date":{"$ref":"#/components/schemas/Date"},"fixing_rate":{"type":"number"},"fixing_date":{"$ref":"#/components/schemas/Date"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"description":"Fixing not found."},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Historical Swap Rates

> Returns historical swap rates for a given index and tenor over a date range (start\_date to end\_date).\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/building-a-historical-time-series>" target="\_blank">View guide with examples →\</a><br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Swap Rates","description":"Live and historical swap rate calculations, available tenors, and swap curve construction"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"Index":{"type":"string","description":"Common interest rate benchmarks and indices used in financial markets","enum":["SOFR","Fed Funds","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","6M EURIBOR","3M EURIBOR","1M EURIBOR","SONIA","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","6M MIFOR","TONAR","91D CD","3M KLIBOR","3M NIBOR","6M NIBOR","3M BKBM","6M WIBOR","3M SAIBOR","3M STIBOR","SORA","3M TRYIBOR","3M TAIBOR","3M JIBAR","6M BBSW","3M BBSW","28 Day TIIE"]},"Tenor":{"type":"string","description":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"DayCountConvention":{"type":"string","description":"Day count convention for interest rate and swap calculations","enum":["Actual360","Actual365","Actual365Fixed","Thirty360BondBasis","Thirty360EuroBondBasis","Business252"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/historical_swap_rates":{"get":{"summary":"Get Historical Swap Rates","operationId":"getHistoricalSwapRates","tags":["Swap Rates"],"description":"Returns historical swap rates for a given index and tenor over a date range (start_date to end_date).\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/building-a-historical-time-series\" target=\"_blank\">View guide with examples →</a>\n","parameters":[{"name":"index","in":"query","description":"The specific index (e.g., SOFR, 1M EURIBOR, 6M EURIBOR, SONIA) for the swap rates.","required":true,"schema":{"$ref":"#/components/schemas/Index"}},{"name":"tenor","in":"query","description":"The tenor for each swap rate (e.g., '1Y', '5Y').","required":true,"schema":{"$ref":"#/components/schemas/Tenor"}},{"name":"start_date","in":"query","description":"The start date for the swap rates (inclusive). Provide a specific date (e.g., '2025-12-31').","required":true,"schema":{"$ref":"#/components/schemas/Date"}},{"name":"end_date","in":"query","description":"The end date for the swap rates (inclusive). Provide a specific date (e.g., '2025-12-31').","required":true,"schema":{"$ref":"#/components/schemas/Date"}}],"responses":{"200":{"description":"Successful retrieval of historical swap rates.","content":{"application/json":{"schema":{"type":"object","properties":{"index_name":{"type":"string"},"currency":{"type":"string"},"fixed_leg_day_count":{"$ref":"#/components/schemas/DayCountConvention"},"floating_leg_day_count":{"$ref":"#/components/schemas/DayCountConvention"},"fixed_leg_frequency":{"type":"string"},"floating_leg_frequency":{"type":"string"},"swap_rates":{"type":"array","items":{"type":"object","properties":{"rate":{"type":"number"},"date":{"type":"string","format":"date"},"tenor":{"type":"string"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Swap Pricer

> Calculate the mark-to-market (MTM) value, fair rate, PV01, and detailed cashflows\
> for an interest rate swap. Supports amortizing swaps with variable notional amounts.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/how-to-price-a-swap-using-the-api>" target="\_blank">View guide with examples →\</a>\
> \
> When fixed\_rate is omitted, the swap is valued at the fair (par) rate and\
> mark-to-market is zero.\
> \
> This endpoint provides comprehensive swap valuation including:\
> \- Fair swap rate calculation\
> \- Mark-to-market valuation\
> \- PV01 (dollar value of a basis point)\
> \- Detailed cashflow schedules for both fixed and floating legs<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Swap Rates","description":"Live and historical swap rate calculations, available tenors, and swap curve construction"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"SwapPricerRequest":{"type":"object","required":["index","start_date","maturity_date","fixed_leg_frequency","fixed_notionals"],"properties":{"index":{"type":"string","description":"The reference rate index (e.g., SOFR, 3M EURIBOR, SONIA)"},"start_date":{"$ref":"#/components/schemas/DateOrTenor"},"maturity_date":{"$ref":"#/components/schemas/LaterDateOrTenor"},"fixed_leg_frequency":{"$ref":"#/components/schemas/Frequency"},"fixed_leg_day_count":{"allOf":[{"$ref":"#/components/schemas/DayCountConvention"},{"description":"The day count convention used for the fixed leg. By default, uses the currency-specific convention"}]},"fixed_rate":{"type":"number","format":"double","description":"The fixed rate as a percentage (e.g., 4.25 for 4.25%). Optional; when omitted, the swap is valued at the fair rate and mark-to-market is zero.\n"},"fixed_leg_first_payment_date":{"type":"string","format":"date","description":"The first payment date (e.g., '2026-08-02'). If not provided, defaults to start_date + fixed_leg_frequency adjusted for business days."},"fixed_notionals":{"oneOf":[{"type":"number","format":"double"},{"type":"array","items":{"type":"number","format":"double"}}],"description":"Notional amount(s). Provide a single number for vanilla swaps or a list for amortizing swaps."},"valuation_time":{"type":"string","format":"date-time","description":"Valuation time in ISO 8601 format. Defaults to current time if not provided."}}},"DateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"}]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Tenor":{"type":"string","description":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"LaterDateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/LaterDate"},{"$ref":"#/components/schemas/Tenor"}]},"LaterDate":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Frequency":{"type":"string","description":"Payment frequency for financial instruments"},"DayCountConvention":{"type":"string","description":"Day count convention for interest rate and swap calculations","enum":["Actual360","Actual365","Actual365Fixed","Thirty360BondBasis","Thirty360EuroBondBasis","Business252"]},"SwapPricerResponse":{"type":"object","properties":{"index":{"type":"string","description":"The reference rate index used"},"currency":{"type":"string","description":"Currency of the swap derived from the index"},"start_date":{"type":"string","format":"date","description":"The effective start date of the swap"},"maturity_date":{"type":"string","format":"date","description":"The maturity date of the swap"},"fixed_leg_first_payment_date":{"type":"string","format":"date","description":"First payment date for the fixed leg"},"floating_leg_first_payment_date":{"type":"string","format":"date","description":"First payment date for the floating leg"},"valuation_time":{"type":"string","format":"date-time","description":"The valuation time used for pricing"},"timestamp":{"type":"string","format":"date-time","description":"Timestamp of the market data used"},"fixed_leg_frequency":{"type":"string","description":"Payment frequency of the fixed leg"},"floating_leg_frequency":{"type":"string","description":"Payment frequency of the floating leg"},"fixed_leg_day_count":{"allOf":[{"$ref":"#/components/schemas/DayCountConvention"},{"description":"Day count convention for the fixed leg"}]},"floating_leg_day_count":{"allOf":[{"$ref":"#/components/schemas/DayCountConvention"},{"description":"Day count convention for the floating leg"}]},"fixed_rate":{"type":"number","format":"double","nullable":true,"description":"The fixed rate of the swap as a percentage (input parameter). Null when not supplied in the request (swap valued at fair rate, MTM zero).\n"},"fair_rate":{"type":"number","format":"double","description":"The fair (par) swap rate as a percentage"},"mtm":{"type":"number","format":"double","description":"Mark-to-market value of the swap (positive = asset, negative = liability)"},"pv01":{"type":"number","format":"double","description":"Dollar value of a 1 basis point move in rates (PV01)"},"fixed_cashflows":{"type":"array","description":"Detailed cashflows for the fixed leg","items":{"$ref":"#/components/schemas/CashflowDetail"}},"floating_cashflows":{"type":"array","description":"Detailed cashflows for the floating leg","items":{"$ref":"#/components/schemas/CashflowDetail"}}}},"CashflowDetail":{"type":"object","description":"Detailed information for a single cashflow period","properties":{"period_start":{"type":"string","format":"date","description":"Start date of the accrual period"},"period_end":{"type":"string","format":"date","description":"End date of the accrual period"},"notional":{"type":"number","format":"double","description":"Notional amount for this period"},"day_count_fraction":{"type":"number","format":"double","description":"Year fraction based on day count convention"},"rate":{"type":"number","format":"double","description":"Interest rate for this period (fixed rate for fixed leg, forward rate for floating leg)"},"cashflow":{"type":"number","format":"double","description":"Undiscounted cashflow amount"},"discount_factor":{"type":"number","format":"double","description":"Discount factor to payment date"},"present_value":{"type":"number","format":"double","description":"Present value of the cashflow"}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/swap_pricer":{"post":{"summary":"Swap Pricer","operationId":"swapPricer","tags":["Swap Rates"],"description":"Calculate the mark-to-market (MTM) value, fair rate, PV01, and detailed cashflows\nfor an interest rate swap. Supports amortizing swaps with variable notional amounts.\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/how-to-price-a-swap-using-the-api\" target=\"_blank\">View guide with examples →</a>\n\nWhen fixed_rate is omitted, the swap is valued at the fair (par) rate and\nmark-to-market is zero.\n\nThis endpoint provides comprehensive swap valuation including:\n- Fair swap rate calculation\n- Mark-to-market valuation\n- PV01 (dollar value of a basis point)\n- Detailed cashflow schedules for both fixed and floating legs\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapPricerRequest"}}}},"responses":{"200":{"description":"Successful swap pricer calculation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapPricerResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Available Swap Rate Tenors

> Returns the list of available tenors for swap rates for a given index.<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Swap Rates","description":"Live and historical swap rate calculations, available tenors, and swap curve construction"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"Index":{"type":"string","description":"Common interest rate benchmarks and indices used in financial markets","enum":["SOFR","Fed Funds","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","6M EURIBOR","3M EURIBOR","1M EURIBOR","SONIA","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","6M MIFOR","TONAR","91D CD","3M KLIBOR","3M NIBOR","6M NIBOR","3M BKBM","6M WIBOR","3M SAIBOR","3M STIBOR","SORA","3M TRYIBOR","3M TAIBOR","3M JIBAR","6M BBSW","3M BBSW","28 Day TIIE"]},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/swap_rate_tenors":{"get":{"summary":"Get Available Swap Rate Tenors","operationId":"getSwapRateTenors","tags":["Swap Rates"],"description":"Returns the list of available tenors for swap rates for a given index.\n","parameters":[{"name":"index","in":"query","description":"The specific index (e.g., SOFR, 1M EURIBOR, 6M EURIBOR, SONIA) for which to retrieve available swap rate tenors.","required":true,"schema":{"$ref":"#/components/schemas/Index"}}],"responses":{"200":{"description":"Successful retrieval of available swap rate tenors.","content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"tenors":{"type":"array","items":{"type":"string"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Bond

> Returns descriptive metadata and Cbonds indicative pricing for a single bond by ISIN.\
> \
> \*\*Pricing source:\*\* Cbonds estimation indicative quote — this is not a live market quote and should be treated as an indicative reference price/yield only.\
> \
> Coverage is currently limited to bonds in our Cbonds feed. If an ISIN is not covered, a \`404\` is returned.<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Bonds","description":"Descriptive bond metadata and Cbonds indicative pricing (not live market quotes)."}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}},"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}}},"paths":{"/bond":{"get":{"summary":"Get Bond","operationId":"getBond","tags":["Bonds"],"description":"Returns descriptive metadata and Cbonds indicative pricing for a single bond by ISIN.\n\n**Pricing source:** Cbonds estimation indicative quote — this is not a live market quote and should be treated as an indicative reference price/yield only.\n\nCoverage is currently limited to bonds in our Cbonds feed. If an ISIN is not covered, a `404` is returned.\n","parameters":[{"name":"isin","in":"query","description":"12-character ISIN of the bond (uppercase alphanumeric).","required":true,"schema":{"type":"string","pattern":"^[A-Z0-9]{12}$"}}],"responses":{"200":{"description":"Bond descriptive fields and Cbonds indicative pricing.","content":{"application/json":{"schema":{"type":"object","properties":{"isin":{"type":"string"},"issuer":{"type":"string"},"bond_name":{"type":"string"},"country_of_issuer":{"type":"string"},"currency":{"type":"string"},"coupon":{"type":"number","nullable":true},"is_floating_rate_note":{"type":"boolean","nullable":true},"coupon_period":{"type":"string","nullable":true},"day_count_convention":{"type":"string","nullable":true},"maturity_date":{"type":"string","format":"date","nullable":true},"issue_date":{"type":"string","format":"date","nullable":true},"outstanding_volume":{"type":"number","nullable":true},"amount_issued":{"type":"number","nullable":true},"sector":{"type":"string","nullable":true},"bond_rank":{"type":"string","nullable":true},"is_convertible":{"type":"boolean","nullable":true},"is_mortgage_bond":{"type":"boolean","nullable":true},"is_perpetuity":{"type":"boolean","nullable":true},"subordinated_debt":{"type":"boolean","nullable":true},"pricing":{"type":"object","description":"Cbonds estimation indicative quotes. Not live market data.","properties":{"indicative_price":{"type":"number","nullable":true},"indicative_yield":{"type":"number","nullable":true},"bid_price":{"type":"number","nullable":true},"ask_price":{"type":"number","nullable":true},"mid_price":{"type":"number","nullable":true},"as_of":{"type":"string","format":"date-time","nullable":true,"description":"ISO 8601 date-time of the pricing snapshot. Null if no trading data exists."}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get Inflation Curve (Beta)

> \*\*Beta endpoint:\*\* This endpoint is currently in beta and may change.\
> \
> Returns the full zero-coupon inflation swap curve for a given inflation index.\
> Rates are derived from zero-coupon inflation swap market data, bootstrapped into a\
> PiecewiseZeroInflation curve.\
> \
> Supported inflation indices:\
> \- \*\*UK RPI\*\* — UK Retail Price Index (discount curve: SONIA, observation lag: 2 months)\
> \- \*\*EU HICP\*\* — Euro Area Harmonised Index of Consumer Prices (discount curve: 6M EURIBOR, observation lag: 3 months)<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Inflation","description":"Market-implied inflation rates derived from zero-coupon inflation swap curves"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"InflationIndex":{"type":"string","description":"Inflation indices available for zero-coupon inflation rate calculations","enum":["UK RPI","EU HICP"]},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - The request was well-formed but contains semantic errors.","content":{"application/json":{"schema":{"type":"object","properties":{"detail":{"type":"string"}}}}}}}},"paths":{"/inflation_curve":{"get":{"summary":"Get Inflation Curve (Beta)","operationId":"getInflationCurve","tags":["Inflation"],"description":"**Beta endpoint:** This endpoint is currently in beta and may change.\n\nReturns the full zero-coupon inflation swap curve for a given inflation index.\nRates are derived from zero-coupon inflation swap market data, bootstrapped into a\nPiecewiseZeroInflation curve.\n\nSupported inflation indices:\n- **UK RPI** — UK Retail Price Index (discount curve: SONIA, observation lag: 2 months)\n- **EU HICP** — Euro Area Harmonised Index of Consumer Prices (discount curve: 6M EURIBOR, observation lag: 3 months)\n","parameters":[{"name":"index","in":"query","description":"The inflation index to retrieve the curve for.","required":true,"schema":{"$ref":"#/components/schemas/InflationIndex"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful retrieval of inflation curve data.","content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string","description":"The inflation index used"},"discount_index":{"type":"string","description":"The nominal discount curve used for bootstrapping"},"rates":{"type":"array","items":{"type":"object","properties":{"tenor":{"type":"string"},"zc_rate":{"type":"number","description":"Zero-coupon inflation rate as a percentage"}}}},"timestamp":{"$ref":"#/components/schemas/DateTime"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Calculate Compounded Overnight Rate / Realised Rate

> 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<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Central Bank and Benchmark Rates","description":"Interest rate fixings, central bank rates, and benchmark rate data for financial calculations"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"LaterDate":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/compounded_rate":{"get":{"summary":"Calculate Compounded Overnight Rate / Realised Rate","operationId":"getCompoundedRate","tags":["Central Bank and Benchmark Rates"],"description":"Calculate compounded overnight rates (realised rates) for risk-free rate (RFR) indices over a specified period.\n\nThis endpoint computes the realised compounded rate using actual market fixings for overnight reference rates. \nThe calculation follows market conventions for each index, including day count conventions, lookback periods, \nlockout days, and observation shifts.\n\n**Supported Overnight Indices:**\n- SOFR (Secured Overnight Financing Rate)\n- SONIA (Sterling Overnight Index Average)\n- ESTR (Euro Short-Term Rate)\n- SORA (Singapore Overnight Rate Average)\n- TONAR (Tokyo Overnight Average Rate)\n- CORRA (Canadian Overnight Repo Rate Average)\n- SARON (Swiss Average Rate Overnight)\n\n**Use Cases:**\n- Calculate historical realised rates for loan settlements\n- Compute interest payments based on overnight index compounding\n- Validate RFR-based calculations\n- Generate audit trails for compounded rate calculations\n","parameters":[{"name":"start_date","in":"query","description":"Period start date. Provide a specific date (e.g., '2024-01-01').\n","required":true,"schema":{"$ref":"#/components/schemas/Date"}},{"name":"end_date","in":"query","description":"Period end date. Provide a specific date (e.g., '2024-01-31').\n**Validation Requirements:** - End date must be later than start date\n","required":true,"schema":{"$ref":"#/components/schemas/LaterDate"}},{"name":"index","in":"query","description":"Overnight index name. Supported indices include SOFR, SONIA, ESTR, SORA, TONAR, CORRA, SARON, CDI, and Fed Funds.\n","required":true,"schema":{"type":"string","enum":["SOFR","SONIA","ESTR","SORA","TONAR","CORRA","SARON"]}},{"name":"nominal","in":"query","description":"Notional amount for calculation. If not provided, defaults to 1,000,000.\n","required":false,"schema":{"type":"number","format":"float","default":1000000}},{"name":"spread","in":"query","description":"Additional spread in percentage (e.g. 5 = 5%). If not provided, defaults to 0.\n","required":false,"schema":{"type":"number","format":"float","default":0}},{"name":"day_counter","in":"query","description":"Day count convention for the calculation. If not provided, uses the index-specific default convention.\n","required":false,"schema":{"type":"string"}},{"name":"lookback_days","in":"query","description":"Number of days to lag the reference rate. If not provided, defaults to 0.\n","required":false,"schema":{"type":"integer","default":0}},{"name":"lockout_days","in":"query","description":"Number of days at the end of the period without rate resets. If not provided, defaults to 0.\n","required":false,"schema":{"type":"integer","default":0}},{"name":"apply_observation_shift","in":"query","description":"Whether to apply observation shift to the rate calculation. If not provided, defaults to false.\n","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Successful calculation of compounded overnight rate.","content":{"application/json":{"schema":{"type":"object","properties":{"start_date":{"type":"string","format":"date","description":"Actual start date used in calculation"},"end_date":{"type":"string","format":"date","description":"Actual end date used in calculation"},"index":{"type":"string","description":"Overnight index used"},"nominal":{"type":"number","format":"float","description":"Notional amount used"},"spread":{"type":"number","format":"float","description":"Spread applied in percentage"},"day_counter":{"type":"string","description":"Day count convention used"},"calendar":{"type":"string","description":"Calendar used for business day adjustments"},"lookback_days":{"type":"integer","description":"Lookback days applied"},"lockout_days":{"type":"integer","description":"Lockout days applied"},"apply_observation_shift":{"type":"boolean","description":"Whether observation shift was applied"},"rate":{"type":"number","format":"float","description":"Compounded rate as percentage"},"amount":{"type":"number","format":"float","description":"Interest amount for the notional"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"422":{"description":"Unprocessable Entity - Invalid parameters provided (e.g., end date before start date, unsupported index)."},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Get FRAs

> Retrieves Forward Rate Agreement (FRA) rates for a given index.\
> Returns all available tenors and their corresponding rates.\
> Supported indices are denominated in EUR, SEK, NOK, and DKK.<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Central Bank and Benchmark Rates","description":"Interest rate fixings, central bank rates, and benchmark rate data for financial calculations"}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"FRAIndex":{"type":"string","description":"Indices supported for FRA rate retrieval. These are IBOR-type indices denominated in EUR, SEK, NOK, and DKK.","enum":["3M EURIBOR","3M STIBOR","3M NIBOR","3M CIBOR"]},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"ErrorResponse":{"type":"object","properties":{"error":{"type":"object","properties":{"response":{"type":"object","properties":{"data":{"type":"object","properties":{"detail":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"loc":{"type":"array","items":{"type":"string"}},"msg":{"type":"string"},"input":{"nullable":true,"type":"string"}}}}]}}}}}}}}}},"parameters":{"valuation_time":{"name":"valuation_time","in":"query","description":"The specific time (or date) for the market data used in the calculation. If valuation_time is not provided, the endpoint will use the most recent market data available. For major currencies (e.g. USD, EUR, GBP), data is updated every minute. This timestamp should be in ISO 8601 format and is interpreted as UTC.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"responses":{"BadRequest":{"description":"Bad Request – check `error.response.data.detail` which contains a descriptive error message or a list of parameter validation errors.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/fras":{"get":{"summary":"Get FRAs","operationId":"getFras","tags":["Central Bank and Benchmark Rates"],"description":"Retrieves Forward Rate Agreement (FRA) rates for a given index.\nReturns all available tenors and their corresponding rates.\nSupported indices are denominated in EUR, SEK, NOK, and DKK.\n","parameters":[{"name":"index","in":"query","description":"The index name for which to retrieve FRA rates (e.g., 3M EURIBOR, 3M STIBOR, 3M NIBOR, 3M CIBOR).","required":true,"schema":{"$ref":"#/components/schemas/FRAIndex"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful retrieval of FRA rates.","content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string","description":"The index name"},"currency":{"type":"string","description":"The currency derived from the index"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"timestamp":{"type":"string","format":"date-time","description":"The actual data timestamp"},"fras":{"type":"array","items":{"type":"object","properties":{"tenor":{"type":"string","description":"FRA tenor"},"type":{"type":"string","description":"Instrument type"},"value":{"type":"number","format":"float","description":"FRA rate value"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"description":"No FRA rates found for the given index and valuation time."},"422":{"description":"Unprocessable Entity - FRA rates not available for the given index."},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```

## Price a European Swaption

> Price a European swaption (payer or receiver) with live yield curves and\
> normal volatility surface.\
> \
> Returns NPV, delta, DV01, and vega. The exercise date equals the swap start date\
> (mid-curve swaptions are not supported).\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/how-to-price-a-swaption-using-the-api>" target="\_blank">View guide with examples →\</a>\
> \
> \*\*Supported indices:\*\* SOFR, SONIA, 3M EURIBOR, 6M EURIBOR, 1M EURIBOR, SARON, AONIA,\
> 3M CDOR, NOWA, SWESTR, STINA, DESTR, CITA, 3M JIBAR, ZARONIA, 3M HIBOR, HONIA,\
> 3M KLIBOR, OCR, NZONIA, TONAR, 3M TIBOR, 6M TIBOR, 3M SAIBOR, 3M PRIBOR,\
> 6M PRIBOR, 6M BUBOR, 3M BUBOR, 3M TAIBOR, 28 Day TIIE, TIIEON, 91D CD,\
> 7D REPO, 1Y DEPO.\
> \
> \*\*Example request:\*\*\
> \`\`\`\
> GET /swaption\_price?index=SOFR\&start\_date=2Y\&maturity\_date=5Y\&swaption\_type=payer\
> \`\`\`<br>

````json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Swaptions","description":"European swaption pricing with live yield curves and normal volatility surface. Pricing, delta, DV01, and vega for payer and receiver swaptions."}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."}}},"paths":{"/swaption_price":{"get":{"summary":"Price a European Swaption","operationId":"priceSwaption","tags":["Swaptions"],"description":"Price a European swaption (payer or receiver) with live yield curves and\nnormal volatility surface.\n\nReturns NPV, delta, DV01, and vega. The exercise date equals the swap start date\n(mid-curve swaptions are not supported).\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/how-to-price-a-swaption-using-the-api\" target=\"_blank\">View guide with examples →</a>\n\n**Supported indices:** SOFR, SONIA, 3M EURIBOR, 6M EURIBOR, 1M EURIBOR, SARON, AONIA,\n3M CDOR, NOWA, SWESTR, STINA, DESTR, CITA, 3M JIBAR, ZARONIA, 3M HIBOR, HONIA,\n3M KLIBOR, OCR, NZONIA, TONAR, 3M TIBOR, 6M TIBOR, 3M SAIBOR, 3M PRIBOR,\n6M PRIBOR, 6M BUBOR, 3M BUBOR, 3M TAIBOR, 28 Day TIIE, TIIEON, 91D CD,\n7D REPO, 1Y DEPO.\n\n**Example request:**\n```\nGET /swaption_price?index=SOFR&start_date=2Y&maturity_date=5Y&swaption_type=payer\n```\n","parameters":[{"name":"index","in":"query","required":true,"schema":{"type":"string"},"description":"The reference rate index (e.g., SOFR, SONIA, 3M EURIBOR). Must be a supported post-LIBOR transition index."},{"name":"start_date","in":"query","required":true,"schema":{"type":"string"},"description":"The start date for the underlying swap (= exercise date). Provide either a specific date (e.g., '2028-02-21') or a tenor (e.g., '2Y')."},{"name":"maturity_date","in":"query","required":true,"schema":{"type":"string"},"description":"The maturity date for the underlying swap. Provide either a specific date (e.g., '2033-02-21') or a tenor (e.g., '5Y'). If using a tenor, it represents the period from start date to maturity."},{"name":"strike_rate","in":"query","required":false,"schema":{"type":"number","nullable":true},"description":"Strike rate as a percentage (e.g., 3.5 for 3.5%). If omitted, the swaption is priced at ATM (forward swap rate)."},{"name":"notional","in":"query","required":false,"schema":{"type":"number","default":10000000},"description":"Notional amount. Defaults to 10,000,000."},{"name":"swaption_type","in":"query","required":false,"schema":{"type":"string","enum":["payer","receiver"],"default":"payer"},"description":"Swaption type. Defaults to 'payer'."},{"name":"valuation_time","in":"query","required":false,"schema":{"type":"string","format":"date-time","nullable":true},"description":"Valuation time in ISO 8601 format. Defaults to current time."}],"responses":{"200":{"description":"Successful swaption pricing","content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"currency":{"type":"string"},"swaption_type":{"type":"string"},"start_date":{"type":"string","format":"date"},"maturity_date":{"type":"string","format":"date"},"exercise_date":{"type":"string","format":"date"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"notional":{"type":"number"},"forward_rate":{"type":"number","description":"ATM forward swap rate as a percentage"},"strike_rate":{"type":"number","description":"Strike rate as a percentage"},"normal_volatility_bps":{"type":"number","description":"Normal (Bachelier) volatility in basis points (e.g., 60.7 for 60.7 bps). Sourced directly from Xignite."},"npv":{"type":"number","description":"Net present value in currency units"},"premium_pct":{"type":"number","description":"Swaption premium as a percentage of notional (e.g., 0.757 means 0.757%)"},"delta":{"type":"number","description":"Bachelier delta: Φ(d) for payer (0 to 1), Φ(d)−1 for receiver (−1 to 0). ATM = 0.5 for payer."},"dv01":{"type":"number","description":"Rate sensitivity: delta × PVBP (pricing currency units per bp). Comparable to PV01 on the swap endpoint."},"vega":{"type":"number","description":"NPV sensitivity to a 1bp shift in normal volatility (pricing currency units per bp)"},"timestamp":{"type":"string","format":"date-time","description":"Most recent market data timestamp (max of curve and vol surface data timestamps)."}}}}}},"422":{"description":"Validation Error - Invalid input parameters."},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
````

## Price an Interest Rate Cap or Floor

> Price an interest rate cap or floor with live yield curves and a caplet-level\
> breakdown.\
> \
> A cap is a portfolio of caplets, each a European call option on a forward rate.\
> A floor is a portfolio of floorlets, each a European put option on a forward rate.\
> \
> Pricing uses the Bachelier (normal) model with live yield curves and swaption ATM\
> volatility data. The response includes headline price measures plus the full caplet\
> breakdown used in the calculation.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/pricing-an-interest-rate-cap>" target="\_blank">View guide with examples →\</a>\
> \
> \*\*Supported indices:\*\* SOFR, SONIA, 3M EURIBOR, 6M EURIBOR, 1M EURIBOR, SARON, AONIA,\
> 3M CDOR, NOWA, SWESTR, STINA, DESTR, CITA, 3M JIBAR, ZARONIA, 3M HIBOR, HONIA,\
> 3M KLIBOR, OCR, NZONIA, TONAR, 3M TIBOR, 6M TIBOR, 3M SAIBOR, 3M PRIBOR,\
> 6M PRIBOR, 6M BUBOR, 3M BUBOR, 3M TAIBOR, 28 Day TIIE, TIIEON, 91D CD,\
> 7D REPO, 1Y DEPO.\
> \
> \*\*Vol smile modes:\*\*\
> \- \*\*auto\*\* (default): Uses SABR smile for SOFR caps, calibrated from live market\
> &#x20; data, and flat ATM vol for other indices.\
> \- \*\*flat\*\*: Uses ATM vol for all strikes.\
> \- \*\*sabr\*\*: Uses SABR smile with user-provided \`sabr\_rho\` and \`sabr\_nu\`.\
> \
> For multi-strike pricing or staggered notionals, use the POST version of this endpoint.\
> \
> \*\*Example request:\*\*\
> \`\`\`\
> GET /cap\_floor\_price?index=SOFR\&start\_date=3M\&maturity\_date=3Y\&cap\_or\_floor=cap\&strike\_rate=4.5\
> \`\`\`<br>

````json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Caps & Floors","description":"Interest rate cap and floor pricing with caplet-level breakdowns and volatility smile options. Multi-strike and staggered-notional structures are supported via the POST endpoint."}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"CapFloorPriceResponse":{"type":"object","properties":{"index":{"type":"string","description":"The reference rate index used."},"currency":{"type":"string","description":"Currency derived from the index."},"type":{"type":"string","enum":["cap","floor"],"description":"Instrument type returned by the pricer."},"start_date":{"type":"string","format":"date","description":"Effective start date of the cap/floor."},"maturity_date":{"type":"string","format":"date","description":"Maturity date of the cap/floor."},"frequency":{"type":"string","description":"Caplet/floorlet frequency."},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"notional":{"oneOf":[{"type":"number","format":"double"},{"type":"array","items":{"type":"number","format":"double"}}],"description":"Input notional amount(s) used in the pricing run. Returned in the same shape as the request — a scalar for vanilla structures, an array (one entry per caplet/floorlet period) for staggered notionals."},"forward_rate":{"type":"number","format":"double","description":"ATM forward rate for the full cap/floor schedule as a percentage."},"strike_rate":{"type":"number","format":"double","description":"Strike rate used for pricing as a percentage. When a list of strikes is supplied via POST, each element of the response array carries the strike used for that element."},"npv":{"type":"number","format":"double","description":"Net present value in currency units."},"premium_pct":{"type":"number","format":"double","description":"Premium as a percentage of the first notional in the schedule (`notional` for vanilla, `notional[0]` for staggered). Only directly comparable across vanilla structures."},"delta":{"type":"number","format":"double","description":"Aggregate delta across all caplets/floorlets."},"vega":{"type":"number","format":"double","description":"Aggregate vega across all caplets/floorlets for a 1bp vol bump."},"num_caplets":{"type":"integer","minimum":1,"description":"Number of caplets/floorlets in the priced schedule."},"caplets":{"type":"array","description":"Caplet/floorlet-level pricing breakdown.","items":{"$ref":"#/components/schemas/CapletBreakdown"}},"vol_type":{"type":"string","enum":["flat","sabr_calibrated","sabr_manual"],"description":"Effective volatility model used in the calculation. `sabr_calibrated` is produced when `vol_smile=auto` and the index has a calibrated SABR surface (currently SOFR). `sabr_manual` is produced when `vol_smile=sabr` with user-supplied `sabr_rho`/`sabr_nu`. `flat` means ATM vol was used at every strike."},"sabr_rho":{"type":"number","format":"double","description":"SABR rho used in pricing when a SABR smile is applied. Only present when `vol_type` is `sabr_calibrated` or `sabr_manual`; omitted when `vol_type=flat`."},"sabr_nu":{"type":"number","format":"double","description":"SABR nu used in pricing when a SABR smile is applied. Only present when `vol_type` is `sabr_calibrated` or `sabr_manual`; omitted when `vol_type=flat`."},"timestamp":{"type":"string","format":"date-time","description":"Most recent market data timestamp used in pricing."}}},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"CapletBreakdown":{"type":"object","description":"Detailed pricing information for a single caplet or floorlet.","properties":{"accrual_start":{"type":"string","format":"date","description":"Start date of the accrual period."},"accrual_end":{"type":"string","format":"date","description":"End date of the accrual period."},"forward_rate":{"type":"number","format":"double","description":"Forward rate for the accrual period as a percentage."},"strike":{"type":"number","format":"double","description":"Strike rate applied to the caplet/floorlet as a percentage."},"notional":{"type":"number","format":"double","description":"Notional amount applied to this period."},"normal_vol_bps":{"type":"number","format":"double","description":"Caplet normal volatility in basis points."},"npv":{"type":"number","format":"double","description":"Present value contribution of the caplet/floorlet."},"delta":{"type":"number","format":"double","description":"Delta contribution of the caplet/floorlet."},"vega":{"type":"number","format":"double","description":"Vega contribution of the caplet/floorlet for a 1bp vol bump."},"discount_factor":{"type":"number","format":"double","description":"Discount factor used for this period."},"accrual_fraction":{"type":"number","format":"double","description":"Year fraction for the accrual period."}}}}},"paths":{"/cap_floor_price":{"get":{"summary":"Price an Interest Rate Cap or Floor","operationId":"priceCapFloor","tags":["Caps & Floors"],"description":"Price an interest rate cap or floor with live yield curves and a caplet-level\nbreakdown.\n\nA cap is a portfolio of caplets, each a European call option on a forward rate.\nA floor is a portfolio of floorlets, each a European put option on a forward rate.\n\nPricing uses the Bachelier (normal) model with live yield curves and swaption ATM\nvolatility data. The response includes headline price measures plus the full caplet\nbreakdown used in the calculation.\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/api/how-to-guides/pricing-an-interest-rate-cap\" target=\"_blank\">View guide with examples →</a>\n\n**Supported indices:** SOFR, SONIA, 3M EURIBOR, 6M EURIBOR, 1M EURIBOR, SARON, AONIA,\n3M CDOR, NOWA, SWESTR, STINA, DESTR, CITA, 3M JIBAR, ZARONIA, 3M HIBOR, HONIA,\n3M KLIBOR, OCR, NZONIA, TONAR, 3M TIBOR, 6M TIBOR, 3M SAIBOR, 3M PRIBOR,\n6M PRIBOR, 6M BUBOR, 3M BUBOR, 3M TAIBOR, 28 Day TIIE, TIIEON, 91D CD,\n7D REPO, 1Y DEPO.\n\n**Vol smile modes:**\n- **auto** (default): Uses SABR smile for SOFR caps, calibrated from live market\n  data, and flat ATM vol for other indices.\n- **flat**: Uses ATM vol for all strikes.\n- **sabr**: Uses SABR smile with user-provided `sabr_rho` and `sabr_nu`.\n\nFor multi-strike pricing or staggered notionals, use the POST version of this endpoint.\n\n**Example request:**\n```\nGET /cap_floor_price?index=SOFR&start_date=3M&maturity_date=3Y&cap_or_floor=cap&strike_rate=4.5\n```\n","parameters":[{"name":"index","in":"query","required":true,"schema":{"type":"string"},"description":"The reference rate index (e.g., SOFR, SONIA, 3M EURIBOR). Must be a supported post-LIBOR transition index."},{"name":"start_date","in":"query","required":true,"schema":{"type":"string"},"description":"The cap/floor start date. Provide either a specific date (e.g., '2026-06-01') or a tenor (e.g., '3M')."},{"name":"maturity_date","in":"query","required":true,"schema":{"type":"string"},"description":"The cap/floor maturity date. Provide either a specific date (e.g., '2029-03-01') or a tenor (e.g., '3Y'). If using a tenor, it represents the period from start date to maturity."},{"name":"strike_rate","in":"query","required":false,"schema":{"type":"number","nullable":true},"description":"Strike rate as a percentage (e.g., 4.5 for 4.5%). If omitted, the instrument is priced at ATM — the par swap rate for the same schedule."},{"name":"notional","in":"query","required":false,"schema":{"type":"number","default":10000000},"description":"Notional amount. Defaults to 10,000,000."},{"name":"cap_or_floor","in":"query","required":false,"schema":{"type":"string","enum":["cap","floor"],"default":"cap"},"description":"Instrument type. Defaults to 'cap'."},{"name":"frequency","in":"query","required":false,"schema":{"type":"string","default":"3M"},"description":"Caplet/floorlet frequency (e.g., '1M', '3M', '6M'). Defaults to '3M' (quarterly)."},{"name":"valuation_time","in":"query","required":false,"schema":{"type":"string","format":"date-time","nullable":true},"description":"Valuation time in ISO 8601 format. Defaults to current time."},{"name":"vol_smile","in":"query","required":false,"schema":{"type":"string","enum":["auto","flat","sabr"],"default":"auto"},"description":"Volatility smile model. `auto` uses SABR for SOFR and flat ATM vol for other indices. `flat` uses ATM vol for all strikes. `sabr` uses user-provided `sabr_rho` and `sabr_nu`."},{"name":"sabr_rho","in":"query","required":false,"schema":{"type":"number","nullable":true},"description":"SABR correlation parameter (-1 to 1). **Required when `vol_smile=sabr`.** Only used when `vol_smile=sabr`; ignored otherwise. If `vol_smile=auto` and the index is SOFR, rho is calibrated automatically."},{"name":"sabr_nu","in":"query","required":false,"schema":{"type":"number","nullable":true},"description":"SABR vol-of-vol parameter (> 0). **Required when `vol_smile=sabr`.** Only used when `vol_smile=sabr`; ignored otherwise. If `vol_smile=auto` and the index is SOFR, nu is calibrated automatically."}],"responses":{"200":{"description":"Successful cap/floor pricing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapFloorPriceResponse"}}}},"422":{"description":"Validation Error - Invalid input parameters."},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
````

## Price an Interest Rate Cap or Floor (Complex Inputs)

> Price caps and floors with richer inputs than the GET endpoint supports:\
> \
> \- \*\*Multiple strikes\*\* in a single request\
> \- \*\*Staggered notionals\*\* for amortizing or accreting structures\
> \- \*\*SABR smile controls\*\* via \`vol\_smile\`, \`sabr\_rho\`, and \`sabr\_nu\`\
> \
> Returns a single pricing result for a single strike, or an array of pricing\
> results when \`strike\_rate\` is provided as a list.<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Caps & Floors","description":"Interest rate cap and floor pricing with caplet-level breakdowns and volatility smile options. Multi-strike and staggered-notional structures are supported via the POST endpoint."}],"servers":[{"url":"https://api.bluegamma.io/v1","description":"Production server"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","in":"header","name":"x-api-key","description":"API token required for authentication"}},"schemas":{"CapFloorPricerRequest":{"type":"object","required":["index","start_date","maturity_date"],"properties":{"index":{"type":"string","description":"The reference rate index (e.g., SOFR, 3M EURIBOR, SONIA)"},"start_date":{"$ref":"#/components/schemas/DateOrTenor"},"maturity_date":{"$ref":"#/components/schemas/LaterDateOrTenor"},"strike_rate":{"oneOf":[{"type":"number","format":"double"},{"type":"array","items":{"type":"number","format":"double"}}],"description":"Strike rate(s) as a percentage. Provide a single value for standard pricing or a list to return a pricing result for each strike. If omitted, the pricer uses ATM."},"notional":{"oneOf":[{"type":"number","format":"double"},{"type":"array","items":{"type":"number","format":"double"}}],"default":10000000,"description":"Notional amount(s). Provide a single number for vanilla caps/floors or a list for staggered/amortizing structures with one notional per caplet/floorlet period."},"cap_or_floor":{"type":"string","enum":["cap","floor"],"default":"cap","description":"Instrument type. Defaults to `cap`."},"frequency":{"allOf":[{"$ref":"#/components/schemas/Frequency"},{"description":"Caplet/floorlet frequency. Defaults to `3M`."}]},"valuation_time":{"type":"string","format":"date-time","nullable":true,"description":"Valuation time in ISO 8601 format. Defaults to current time."},"vol_smile":{"type":"string","enum":["auto","flat","sabr"],"default":"auto","description":"Volatility smile model. `auto` uses SABR for SOFR and flat ATM vol for other indices. `flat` uses ATM vol for all strikes. `sabr` requires `sabr_rho` and `sabr_nu`."},"sabr_rho":{"type":"number","format":"double","nullable":true,"description":"SABR correlation parameter (-1 to 1). **Required when `vol_smile=sabr`**; ignored otherwise."},"sabr_nu":{"type":"number","format":"double","nullable":true,"description":"SABR vol-of-vol parameter (> 0). **Required when `vol_smile=sabr`**; ignored otherwise."}}},"DateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"}]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Tenor":{"type":"string","description":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"LaterDateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/LaterDate"},{"$ref":"#/components/schemas/Tenor"}]},"LaterDate":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"Frequency":{"type":"string","description":"Payment frequency for financial instruments"},"CapFloorPricePostResponse":{"description":"Pricing result returned by `POST /cap_floor_price`. An array is returned if and only if `strike_rate` was supplied as a list — one element per strike, in the same order as the request. A single object is returned otherwise.","oneOf":[{"$ref":"#/components/schemas/CapFloorPriceResponse"},{"type":"array","items":{"$ref":"#/components/schemas/CapFloorPriceResponse"}}]},"CapFloorPriceResponse":{"type":"object","properties":{"index":{"type":"string","description":"The reference rate index used."},"currency":{"type":"string","description":"Currency derived from the index."},"type":{"type":"string","enum":["cap","floor"],"description":"Instrument type returned by the pricer."},"start_date":{"type":"string","format":"date","description":"Effective start date of the cap/floor."},"maturity_date":{"type":"string","format":"date","description":"Maturity date of the cap/floor."},"frequency":{"type":"string","description":"Caplet/floorlet frequency."},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"notional":{"oneOf":[{"type":"number","format":"double"},{"type":"array","items":{"type":"number","format":"double"}}],"description":"Input notional amount(s) used in the pricing run. Returned in the same shape as the request — a scalar for vanilla structures, an array (one entry per caplet/floorlet period) for staggered notionals."},"forward_rate":{"type":"number","format":"double","description":"ATM forward rate for the full cap/floor schedule as a percentage."},"strike_rate":{"type":"number","format":"double","description":"Strike rate used for pricing as a percentage. When a list of strikes is supplied via POST, each element of the response array carries the strike used for that element."},"npv":{"type":"number","format":"double","description":"Net present value in currency units."},"premium_pct":{"type":"number","format":"double","description":"Premium as a percentage of the first notional in the schedule (`notional` for vanilla, `notional[0]` for staggered). Only directly comparable across vanilla structures."},"delta":{"type":"number","format":"double","description":"Aggregate delta across all caplets/floorlets."},"vega":{"type":"number","format":"double","description":"Aggregate vega across all caplets/floorlets for a 1bp vol bump."},"num_caplets":{"type":"integer","minimum":1,"description":"Number of caplets/floorlets in the priced schedule."},"caplets":{"type":"array","description":"Caplet/floorlet-level pricing breakdown.","items":{"$ref":"#/components/schemas/CapletBreakdown"}},"vol_type":{"type":"string","enum":["flat","sabr_calibrated","sabr_manual"],"description":"Effective volatility model used in the calculation. `sabr_calibrated` is produced when `vol_smile=auto` and the index has a calibrated SABR surface (currently SOFR). `sabr_manual` is produced when `vol_smile=sabr` with user-supplied `sabr_rho`/`sabr_nu`. `flat` means ATM vol was used at every strike."},"sabr_rho":{"type":"number","format":"double","description":"SABR rho used in pricing when a SABR smile is applied. Only present when `vol_type` is `sabr_calibrated` or `sabr_manual`; omitted when `vol_type=flat`."},"sabr_nu":{"type":"number","format":"double","description":"SABR nu used in pricing when a SABR smile is applied. Only present when `vol_type` is `sabr_calibrated` or `sabr_manual`; omitted when `vol_type=flat`."},"timestamp":{"type":"string","format":"date-time","description":"Most recent market data timestamp used in pricing."}}},"DateTime":{"type":"string","format":"date-time","description":"A date and time in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ). All times are interpreted as UTC."},"CapletBreakdown":{"type":"object","description":"Detailed pricing information for a single caplet or floorlet.","properties":{"accrual_start":{"type":"string","format":"date","description":"Start date of the accrual period."},"accrual_end":{"type":"string","format":"date","description":"End date of the accrual period."},"forward_rate":{"type":"number","format":"double","description":"Forward rate for the accrual period as a percentage."},"strike":{"type":"number","format":"double","description":"Strike rate applied to the caplet/floorlet as a percentage."},"notional":{"type":"number","format":"double","description":"Notional amount applied to this period."},"normal_vol_bps":{"type":"number","format":"double","description":"Caplet normal volatility in basis points."},"npv":{"type":"number","format":"double","description":"Present value contribution of the caplet/floorlet."},"delta":{"type":"number","format":"double","description":"Delta contribution of the caplet/floorlet."},"vega":{"type":"number","format":"double","description":"Vega contribution of the caplet/floorlet for a 1bp vol bump."},"discount_factor":{"type":"number","format":"double","description":"Discount factor used for this period."},"accrual_fraction":{"type":"number","format":"double","description":"Year fraction for the accrual period."}}}}},"paths":{"/cap_floor_price":{"post":{"summary":"Price an Interest Rate Cap or Floor (Complex Inputs)","operationId":"priceCapFloorPost","tags":["Caps & Floors"],"description":"Price caps and floors with richer inputs than the GET endpoint supports:\n\n- **Multiple strikes** in a single request\n- **Staggered notionals** for amortizing or accreting structures\n- **SABR smile controls** via `vol_smile`, `sabr_rho`, and `sabr_nu`\n\nReturns a single pricing result for a single strike, or an array of pricing\nresults when `strike_rate` is provided as a list.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapFloorPricerRequest"}}}},"responses":{"200":{"description":"Successful cap/floor pricing","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapFloorPricePostResponse"}}}},"422":{"description":"Validation Error - Invalid input parameters."},"500":{"description":"Internal Server Error - An error occurred while processing the request."}}}}}}
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bluegamma.io/documentation/integrations/api/api-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
