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

# API Reference

Full reference for every BlueGamma REST API endpoint: parameters, example requests and responses for swap rates, curves, discount factors, FX, fixings, bonds, caps and swaptions.

Parameters, example requests and responses for every BlueGamma REST API endpoint. To call them you need an API key: [issue one in the app](https://app.bluegamma.io/api-dashboard?auth=signup), or see [Authentication](/documentation/integrations/api/authentication.md).

***

## Get Swap Rate

> This endpoint calculates the swap rate based on the specified parameters.\
> \
> \*\*Market-standard quote (recommended):\*\* call with just \`index\`, \`start\_date\`\
> and \`maturity\_date\`. When \`fixed\_leg\_frequency\` is omitted, both leg\
> frequencies and any unset day counts are taken from the index's\
> market-standard conventions, so the result matches the standard\
> on-screen quote for that index. Pass \`SPOT\` as the start date to start\
> at the index's spot date.\
> \
> Passing \`fixed\_leg\_frequency\` (and optionally the other convention\
> parameters) prices a custom swap with exactly those conventions instead.\
> The response always echoes the conventions that were used.\
> \
> \<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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"SwapStartDate":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"},{"type":"string","const":"SPOT","description":"The index's spot start date (settlement-lagged from the valuation date)."}]},"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":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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**Market-standard quote (recommended):** call with just `index`, `start_date`\nand `maturity_date`. When `fixed_leg_frequency` is omitted, both leg\nfrequencies and any unset day counts are taken from the index's\nmarket-standard conventions, so the result matches the standard\non-screen quote for that index. Pass `SPOT` as the start date to start\nat the index's spot date.\n\nPassing `fixed_leg_frequency` (and optionally the other convention\nparameters) prices a custom swap with exactly those conventions instead.\nThe response always echoes the conventions that were used.\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 a specific date (e.g., '2025-12-31'), a tenor (e.g., '6M', '1Y'), or 'SPOT' for the index's spot start date.","required":true,"schema":{"$ref":"#/components/schemas/SwapStartDate"}},{"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'. Omit to quote at the index's market-standard conventions (recommended).","required":false,"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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Batch Swap Rates

> Prices many swap rates in one request: calls GET /v1/swap\_rate once per\
> item and returns the results in input order. Items may mix indices and\
> valuation times. Up to 50 items per request.\
> \
> Each item is validated, access-checked and priced exactly as the\
> equivalent GET request would be. A failing item does not fail the\
> request: its entry in \`results\` carries the status code and error\
> detail that GET would have returned, and every other item is still\
> priced. The request itself only fails (4xx) for authentication, a\
> malformed body, or more than 50 items.<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":{"BatchSwapRateItem":{"type":"object","additionalProperties":false,"required":["index","start_date","maturity_date"],"properties":{"index":{"$ref":"#/components/schemas/Index"},"start_date":{"$ref":"#/components/schemas/SwapStartDate"},"maturity_date":{"$ref":"#/components/schemas/DateOrTenor"},"fixed_leg_frequency":{"type":"string","pattern":"^[0-9]+[WDMYwdmy]$","description":"Omit to quote at the index's market-standard conventions, as on the GET endpoint."},"floating_leg_frequency":{"type":"string","pattern":"^[0-9]+[WDMYwdmy]$"},"fixed_leg_day_count":{"type":"string"},"floating_leg_day_count":{"type":"string"},"valuation_time":{"allOf":[{"$ref":"#/components/schemas/DateTime"}],"description":"As on the GET endpoint. Omit for live data."}}},"Index":{"type":"string","description":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"SwapStartDate":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"},{"type":"string","const":"SPOT","description":"The index's spot start date (settlement-lagged from the valuation date)."}]},"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]$"},"DateOrTenor":{"oneOf":[{"$ref":"#/components/schemas/Date"},{"$ref":"#/components/schemas/Tenor"}]},"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."},"BatchResponse":{"type":"object","required":["results"],"properties":{"results":{"type":"array","description":"One entry per request item, in input order.","items":{"$ref":"#/components/schemas/BatchResult"}}}},"BatchResult":{"type":"object","required":["status"],"description":"The outcome of one item. `status` is the HTTP status code the equivalent GET request would have returned. On 200, `data` is exactly the GET response body; otherwise `error` is its error detail.","properties":{"status":{"type":"integer"},"data":{"type":"object","description":"The GET endpoint's response body. Present when status is 200."},"error":{"description":"The GET endpoint's error detail. Present when status is not 200."}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/swap_rate/batch":{"post":{"summary":"Batch Swap Rates","operationId":"batchSwapRate","tags":["Swap Rates"],"description":"Prices many swap rates in one request: calls GET /v1/swap_rate once per\nitem and returns the results in input order. Items may mix indices and\nvaluation times. Up to 50 items per request.\n\nEach item is validated, access-checked and priced exactly as the\nequivalent GET request would be. A failing item does not fail the\nrequest: its entry in `results` carries the status code and error\ndetail that GET would have returned, and every other item is still\npriced. The request itself only fails (4xx) for authentication, a\nmalformed body, or more than 50 items.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["items"],"properties":{"items":{"type":"array","minItems":1,"maxItems":50,"items":{"$ref":"#/components/schemas/BatchSwapRateItem"}}}}}}},"responses":{"200":{"description":"One result per item, in the order the items were sent.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchResponse"}}}},"403":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed batch requests or has expired (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Not Found - No tenors available for the specified index or currency.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity - The provided index name is not found in the configuration.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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, FRA rates, 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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get Forward Rates

> Returns the forward rate for a list of interest periods in a single call, all priced off one curve snapshot.\
> \
> Each rate is the annualized simple rate for its entire period, in the index's own day count convention: apply it once as rate × days/360 (or days/365 for indices quoted Actual/365, such as SONIA). Do not compound it again — for overnight indices, daily compounding within the period is already embedded. For a period whose start date is in the past, published fixings are compounded up to today and chained with curve forwards for the remainder.\
> \
> This is the batch equivalent of \`/forward\_rate\` — use it to price a whole schedule, including stubs and broken periods, in one request. Periods can be any length and do not need to be contiguous or sorted; results are returned in input order. For an evenly-spaced rolling forward curve, see \`/forward\_curve\`.<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Forward & Discount Curves","description":"Forward curves, discount curves, FRA rates, 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":{"ForwardRatesRequest":{"type":"object","required":["index","periods"],"properties":{"index":{"allOf":[{"$ref":"#/components/schemas/Index"}],"description":"The reference rate index (e.g., SOFR, 3M EURIBOR, SONIA)."},"periods":{"type":"array","minItems":1,"maxItems":500,"description":"The interest periods to price, up to 500 per request. Periods can be any length, including stubs and broken periods, and do not need to be contiguous or sorted.","items":{"type":"object","required":["start_date","end_date"],"properties":{"start_date":{"allOf":[{"$ref":"#/components/schemas/Date"}],"description":"Period start date in YYYY-MM-DD format."},"end_date":{"allOf":[{"$ref":"#/components/schemas/Date"}],"description":"Period end date in YYYY-MM-DD format. Must be after start_date."}}}},"valuation_time":{"allOf":[{"$ref":"#/components/schemas/DateTime"}],"description":"Optional valuation time in ISO 8601 format. Defaults to the latest curve. All periods in a request are priced off this single curve snapshot."}}},"Index":{"type":"string","description":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"Date":{"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."},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/forward_rates":{"post":{"summary":"Get Forward Rates","operationId":"getForwardRates","tags":["Forward & Discount Curves"],"description":"Returns the forward rate for a list of interest periods in a single call, all priced off one curve snapshot.\n\nEach rate is the annualized simple rate for its entire period, in the index's own day count convention: apply it once as rate × days/360 (or days/365 for indices quoted Actual/365, such as SONIA). Do not compound it again — for overnight indices, daily compounding within the period is already embedded. For a period whose start date is in the past, published fixings are compounded up to today and chained with curve forwards for the remainder.\n\nThis is the batch equivalent of `/forward_rate` — use it to price a whole schedule, including stubs and broken periods, in one request. Periods can be any length and do not need to be contiguous or sorted; results are returned in input order. For an evenly-spaced rolling forward curve, see `/forward_curve`.\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForwardRatesRequest"}}}},"responses":{"200":{"description":"Successful retrieval of forward rates.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"rates":{"type":"array","description":"One entry per requested period, in input order.","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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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, FRA rates, 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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get Discount Factors

> Fetches discount factors for a list of dates or tenors.\
> \
> This is the batch equivalent of \`/discount\_factor\` — use it when you need values at irregular or arbitrary dates rather than an evenly-spaced schedule (for that, see \`/discount\_curve\`).<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Forward & Discount Curves","description":"Forward curves, discount curves, FRA rates, 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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/discount_factors":{"get":{"summary":"Get Discount Factors","operationId":"getDiscountFactors","tags":["Forward & Discount Curves"],"description":"Fetches discount factors for a list of dates or tenors.\n\nThis is the batch equivalent of `/discount_factor` — use it when you need values at irregular or arbitrary dates rather than an evenly-spaced schedule (for that, see `/discount_curve`).\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":"dates","in":"query","description":"The list of dates to compute discount factors for. Each entry is either a specific date (e.g., '2027-06-15') or a tenor relative to today (e.g., '1Y', '5Y'); the two styles can be mixed in one request. Dates before the curve's reference date return a discount factor of 0.0; the reference date itself returns 1.0.\n","required":true,"schema":{"type":"array","items":{"$ref":"#/components/schemas/DateOrTenor"}}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful retrieval of discount factors.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"dates":{"type":"array","items":{"$ref":"#/components/schemas/DateOrTenor"}},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"discount_factors":{"type":"array","items":{"type":"object","properties":{"date":{"$ref":"#/components/schemas/Date"},"discount_factor":{"type":"number"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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, FRA rates, 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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get Zero Rates

> Fetches zero rates (spot rates) for a list of specific dates in a single call.\
> \
> This is the batch equivalent of \`/zero\_rate\` — use it when you need values at irregular or arbitrary dates rather than an evenly-spaced schedule (for that, see \`/discount\_curve\`). Every date is read off one curve build, so the rates are mutually consistent; issuing one \`/zero\_rate\` call per date does not guarantee this, because each call may resolve to a different curve snapshot.\
> \
> The day count and compounding options apply to all dates in the request.<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Forward & Discount Curves","description":"Forward curves, discount curves, FRA rates, 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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/zero_rates":{"get":{"summary":"Get Zero Rates","operationId":"getZeroRates","tags":["Forward & Discount Curves"],"description":"Fetches zero rates (spot rates) for a list of specific dates in a single call.\n\nThis is the batch equivalent of `/zero_rate` — use it when you need values at irregular or arbitrary dates rather than an evenly-spaced schedule (for that, see `/discount_curve`). Every date is read off one curve build, so the rates are mutually consistent; issuing one `/zero_rate` call per date does not guarantee this, because each call may resolve to a different curve snapshot.\n\nThe day count and compounding options apply to all dates in the request.\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":"dates","in":"query","description":"The list of dates to compute zero rates for, up to 500 per request. Each entry is either a specific date (e.g., '2027-06-15') or a tenor relative to today (e.g., '1Y', '5Y'). Results are returned in the order supplied. A request fails atomically: if any date is invalid or outside the curve, the 422 names the offending `dates[N]` and no rates are returned.\n","required":true,"schema":{"type":"array","maxItems":500,"items":{"$ref":"#/components/schemas/DateOrTenor"}}},{"$ref":"#/components/parameters/valuation_time"},{"name":"day_count","in":"query","description":"Day count convention applied to every date in the request. 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 applied to every date in the request. 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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"dates":{"type":"array","description":"The date inputs as supplied, echoed back unmodified.","items":{"$ref":"#/components/schemas/DateOrTenor"}},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"zero_rates":{"type":"array","description":"One entry per requested date, in the order supplied. The `date` is the resolved, business-day-adjusted date the rate was evaluated at, which may differ from the input.","items":{"type":"object","properties":{"date":{"$ref":"#/components/schemas/Date"},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get FX Spot Rate

> Fetches the foreign exchange spot rate for the specified currency pair.\
> \
> The response's \`rate\_basis\` says what kind of rate was returned — \`live\`\
> (real-time feed), \`intraday\_snapshot\` (stored intraday rate) or\
> \`daily\_close\` (end-of-day rate) — and \`rate\_timestamp\` the moment the\
> rate actually refers to.\
> \
> A past \`valuation\_time\` given as a date alone (\`2026-09-22\`) returns\
> that day's daily close; so does \`2026-09-22T23:59:59\` with no offset,\
> the Excel add-in's encoding of a date (send \`2026-09-22T23:59:59Z\` for\
> the instant). Any other date and time returns the stored intraday rate\
> as of that instant (intraday history since 2026-06-25).\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/supported-fx-currency-pairs>" target="\_blank">View supported currency pairs →\</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"}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/fx":{"get":{"summary":"Get FX Spot Rate","operationId":"getFxSpotRate","tags":["FX"],"description":"Fetches the foreign exchange spot rate for the specified currency pair.\n\nThe response's `rate_basis` says what kind of rate was returned — `live`\n(real-time feed), `intraday_snapshot` (stored intraday rate) or\n`daily_close` (end-of-day rate) — and `rate_timestamp` the moment the\nrate actually refers to.\n\nA past `valuation_time` given as a date alone (`2026-09-22`) returns\nthat day's daily close; so does `2026-09-22T23:59:59` with no offset,\nthe Excel add-in's encoding of a date (send `2026-09-22T23:59:59Z` for\nthe instant). Any other date and time returns the stored intraday rate\nas of that instant (intraday history since 2026-06-25).\n\n<a href=\"https://www.bluegamma.io/documentation/integrations/supported-fx-currency-pairs\" target=\"_blank\">View supported currency pairs →</a>\n","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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency_pair":{"type":"string"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"rate":{"type":"number"},"rate_basis":{"type":"string","enum":["live","intraday_snapshot","daily_close"],"description":"What kind of rate was returned. `live` is the real-time feed, `intraday_snapshot` a stored intraday rate, `daily_close` the end-of-day rate (for a date without a time, and the fallback when no intraday rate is available near valuation_time). Within the last 3 days, before that day's close is published, the fallback is the live rate, returned as `live`."},"rate_timestamp":{"type":"string","description":"The moment the rate actually refers to — the time the returned intraday rate was captured (which can differ from the requested time), the fetch time for a live rate, or a date alone (YYYY-MM-DD) for a daily close."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"503":{"description":"Service Unavailable - the requested past date is newer than the daily FX history BlueGamma has published so far. Retry later.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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.\
> \
> \*\*Long-dated forwards:\*\* dates beyond the pair's last quoted tenor are derived from the interest rate differential implied by each currency's yield curve, anchored to the last quoted forward. These points are flagged with \`extrapolated: true\` in the response. For pairs where yield curves are unavailable in one or both currencies, rates beyond the quoted tenors are linearly extrapolated instead.\
> \
> \*\*Historical mode:\*\* pass \`valuation\_time\` to read the forward off that day's stored curve instead of live data — e.g. \`date=2027-01-15\&valuation\_time=2026-06-13\` answers "what did the Jan-2027 forward cost as of 13 June". A \`date\` in the past (with no \`valuation\_time\`) returns that day's historical spot rate.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-fx-forward-rates>" target="\_blank">View guide with examples →\</a>\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/supported-fx-currency-pairs>" target="\_blank">View supported currency pairs →\</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"}},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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**Long-dated forwards:** dates beyond the pair's last quoted tenor are derived from the interest rate differential implied by each currency's yield curve, anchored to the last quoted forward. These points are flagged with `extrapolated: true` in the response. For pairs where yield curves are unavailable in one or both currencies, rates beyond the quoted tenors are linearly extrapolated instead.\n\n**Historical mode:** pass `valuation_time` to read the forward off that day's stored curve instead of live data — e.g. `date=2027-01-15&valuation_time=2026-06-13` answers \"what did the Jan-2027 forward cost as of 13 June\". A `date` in the past (with no `valuation_time`) returns that day's historical spot rate.\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\n<a href=\"https://www.bluegamma.io/documentation/integrations/supported-fx-currency-pairs\" target=\"_blank\">View supported currency pairs →</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 (maturity) date in YYYY-MM-DD format. Defaults to the current date — or to `valuation_time` when that is provided (spot as of the snapshot).","required":false,"schema":{"type":"string","format":"date"}},{"name":"valuation_time","in":"query","description":"Historical snapshot the forward is read from, in ISO 8601 format (same convention as /forward_curve and /discount_curve). If omitted, live data is used. FX forward history is stored as one snapshot per day, so any time-of-day component is ignored -- the day's latest snapshot is used. Dates with no stored data (weekends, holidays) fall back to the nearest earlier business day. Returns 404 when no historical data exists for the pair.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}],"responses":{"200":{"description":"Successful retrieval of FX forward rate data.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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."},"extrapolated":{"type":"boolean","description":"True when the forward date lies beyond the pair's last quoted tenor and the rate is derived rather than interpolated from quoted points."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get FX Forwards for a List of Value Dates

> Returns FX forward rates for an explicit list of value dates in a single call, all priced off one curve snapshot. This is the FX equivalent of the rates-side \`/forward\_rates\` endpoint: pass the exact settlement/value dates you need (for example a monthly payment schedule) and get one forward per date, instead of issuing a separate \`/fx\_forward\` request for each. One request counts once against the API usage limit, regardless of the number of dates.\
> \
> Each entry mirrors \`/fx\_forward\`: the forward \`rate\`, its difference to spot, the forward premium and days forward. A value date at or before the snapshot returns that date's spot rate, exactly as \`/fx\_forward\` does — so this is a drop-in for calling \`/fx\_forward\` once per date. Results are returned in \`rates\`, in the order the dates were supplied. Business-day rolling is the caller's responsibility — send the dates already adjusted to trading days.\
> \
> \*\*Long-dated forwards:\*\* dates beyond the pair's last quoted tenor are derived from the interest-rate differential implied by each currency's yield curve and flagged with \`extrapolated: true\`. For pairs where a yield curve is unavailable on one or both legs, rates beyond the quoted tenors are linearly extrapolated instead — still flagged \`extrapolated: true\`.\
> \
> \*\*Historical mode:\*\* pass \`valuation\_time\` to price every date off that day's stored curve instead of live data.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/api/how-to-guides/fetching-fx-forward-rates>" target="\_blank">View guide with examples →\</a>\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/supported-fx-currency-pairs>" target="\_blank">View supported currency pairs →\</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"}},"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."},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/fx_forwards":{"get":{"summary":"Get FX Forwards for a List of Value Dates","operationId":"getFxForwards","tags":["FX"],"description":"Returns FX forward rates for an explicit list of value dates in a single call, all priced off one curve snapshot. This is the FX equivalent of the rates-side `/forward_rates` endpoint: pass the exact settlement/value dates you need (for example a monthly payment schedule) and get one forward per date, instead of issuing a separate `/fx_forward` request for each. One request counts once against the API usage limit, regardless of the number of dates.\n\nEach entry mirrors `/fx_forward`: the forward `rate`, its difference to spot, the forward premium and days forward. A value date at or before the snapshot returns that date's spot rate, exactly as `/fx_forward` does — so this is a drop-in for calling `/fx_forward` once per date. Results are returned in `rates`, in the order the dates were supplied. Business-day rolling is the caller's responsibility — send the dates already adjusted to trading days.\n\n**Long-dated forwards:** dates beyond the pair's last quoted tenor are derived from the interest-rate differential implied by each currency's yield curve and flagged with `extrapolated: true`. For pairs where a yield curve is unavailable on one or both legs, rates beyond the quoted tenors are linearly extrapolated instead — still flagged `extrapolated: true`.\n\n**Historical mode:** pass `valuation_time` to price every date off that day's stored curve instead of live data.\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\n<a href=\"https://www.bluegamma.io/documentation/integrations/supported-fx-currency-pairs\" target=\"_blank\">View supported currency pairs →</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":"dates","in":"query","description":"The value dates to price, in YYYY-MM-DD format, repeated once per date (e.g. `?dates=2026-09-21&dates=2026-10-20`). Up to 500 per request; all are priced off one curve snapshot and need not be sorted. Duplicate dates are priced once per occurrence and returned in the same positions (each counts toward the 500 limit). Business-day rolling is the caller's responsibility.","required":true,"style":"form","explode":true,"schema":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"string","format":"date"}}},{"name":"valuation_time","in":"query","description":"Historical snapshot the forwards are read from, in ISO 8601 format. If omitted (or set to today/now), live data is used. FX forward history is stored as one snapshot per day, so any time-of-day component is ignored. Dates with no stored data (weekends, holidays) fall back to the nearest earlier business day. Returns 404 when no historical data exists for the pair.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}],"responses":{"200":{"description":"Successful retrieval of FX forward rates for the requested value dates.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"currency_pair":{"type":"string","description":"The currency pair requested."},"dates":{"type":"array","description":"The requested value dates, echoed back in input order.","items":{"type":"string","format":"date"}},"valuation_time":{"type":"string","format":"date","nullable":true,"description":"The historical snapshot date requested, echoed back; null for live data."},"spot_rate":{"type":"number","description":"The spot rate of the snapshot every date is priced off."},"rates":{"type":"array","description":"One entry per requested value date, in the order supplied.","items":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"The value date in ISO 8601 format (YYYY-MM-DD)."},"rate":{"type":"number","description":"The forward exchange rate for this value date (that date's spot when it is at or before the snapshot)."},"forward_diff":{"type":"number","description":"Difference between this rate and spot (rate - spot_rate)."},"premium":{"type":"string","description":"Forward premium/discount as a percentage."},"days_forward":{"type":"integer","description":"Number of days from the snapshot date to the value date."},"extrapolated":{"type":"boolean","description":"True when the value date lies beyond the pair's last quoted tenor and the rate is derived rather than interpolated from quoted points."}}}},"timestamp":{"type":"string","description":"The data timestamp of the curve snapshot every date was priced off."}}}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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.\
> \
> \*\*Long-dated forwards:\*\* points beyond the pair's last quoted tenor are derived from the interest rate differential implied by each currency's yield curve, anchored to the last quoted forward. These points are flagged with \`extrapolated: true\`. For pairs where yield curves are unavailable in one or both currencies, points beyond the quoted tenors are linearly extrapolated instead.\
> \
> \*\*Historical curves:\*\* pass \`valuation\_time\` to build the curve from that day's stored forward pillars instead of live data — mirroring the \`/forward\_curve\` and \`/discount\_curve\` endpoints. Works with both modes; tenors and schedules anchor on the snapshot date. Weekends/holidays fall back to the nearest earlier business day with 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>\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/supported-fx-currency-pairs>" target="\_blank">View supported currency pairs →\</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"}},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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\n**Long-dated forwards:** points beyond the pair's last quoted tenor are derived from the interest rate differential implied by each currency's yield curve, anchored to the last quoted forward. These points are flagged with `extrapolated: true`. For pairs where yield curves are unavailable in one or both currencies, points beyond the quoted tenors are linearly extrapolated instead.\n\n**Historical curves:** pass `valuation_time` to build the curve from that day's stored forward pillars instead of live data — mirroring the `/forward_curve` and `/discount_curve` endpoints. Works with both modes; tenors and schedules anchor on the snapshot date. Weekends/holidays fall back to the nearest earlier business day with 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\n<a href=\"https://www.bluegamma.io/documentation/integrations/supported-fx-currency-pairs\" target=\"_blank\">View supported currency pairs →</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"}},{"name":"valuation_time","in":"query","description":"Historical snapshot, in ISO 8601 format (same convention as /forward_curve and /discount_curve). If omitted, live data is used. When set, the curve is built from that day's stored forward pillars and tenors/schedules anchor on that date. FX forward history is stored as one snapshot per day, so any time-of-day component is ignored -- the day's latest snapshot is used. Dates with no stored data (weekends, holidays) fall back to the nearest earlier business day. Returns 404 when no historical data exists for the pair.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}],"responses":{"200":{"description":"Successful retrieval of FX forward curve data.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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)."},"extrapolated":{"type":"boolean","description":"True when this point lies beyond the pair's last quoted tenor and is derived rather than interpolated from quoted points."}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Real-Time FX Streaming (WebSocket)

> Access live foreign exchange market data with real-time mid-prices derived from institutional market feeds.\
> \
> \<a href="<https://www.bluegamma.io/documentation/integrations/supported-fx-currency-pairs>" target="\_blank">View supported currency pairs →\</a>\
> \
> 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; "bid": 1.08445,\
> &#x20; "ask": 1.08455,\
> &#x20; "timestamp": "2025-01-15T14:30:25.123Z"\
> }\
> \`\`\`\
> \
> Connection status (sent once, immediately after connecting):\
> \`\`\`json\
> {"type": "connected", "client\_id": "...", "subscribed": \["EURUSD"]}\
> \`\`\`\
> \
> Subscription confirmations:\
> \`\`\`json\
> {"type": "subscribed", "symbols": \["GBPUSD"]}\
> {"type": "unsubscribed", "symbols": \["EURUSD"]}\
> \`\`\`\
> \
> Heartbeat — the server sends periodic pings to keep the connection open:\
> \`\`\`json\
> {"type": "ping"}\
> {"type": "pong"}\
> \`\`\`\
> \
> Errors:\
> \`\`\`json\
> {"type": "error", "error": "Unknown action: subcribe"}\
> {"type": "error", "error": "Invalid JSON message"}\
> \`\`\`\
> \
> \### Reconnecting\
> \
> WebSocket connections drop — networks change, proxies time out idle\
> connections, servers restart. A long-running integration should expect\
> this and reconnect automatically rather than treating a dropped\
> connection as a failure.\
> \
> A straightforward approach, used in the reference clients below:\
> \
> \- Track when you last received \*\*any\*\* message. Quotes and pings both\
> &#x20; count, so this works during quiet periods too — note that FX markets\
> &#x20; close at weekends, when quotes legitimately stop arriving.\
> \- If nothing arrives for 60 seconds, close the connection and open a\
> &#x20; new one.\
> \- Reconnect with exponential backoff (e.g. 1s, 2s, 4s … capped around\
> &#x20; 30s) plus a little random jitter, so many clients don't reconnect in\
> &#x20; lockstep.\
> \- \*\*Re-send your subscriptions after reconnecting\*\* — subscription\
> &#x20; state belongs to the connection and is not carried across one.\
> \- You can also send \`{"action": "ping"}\` at any time and expect\
> &#x20; \`{"type": "pong"}\` back, if you'd rather probe actively.\
> \
> \*\*Service status.\*\* Live status, incident history and status\
> subscriptions: \<a href="<https://status.bluegamma.io/>" target="\_blank">status.bluegamma.io\</a>.\
> \
> 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"}\
> \`\`\`\
> \
> \### Reference client\
> \
> Both examples reconnect automatically: they watch for any inbound\
> message, back off and reconnect when the stream goes quiet, and\
> re-subscribe on each new connection.\
> \
> Example Usage (JavaScript):\
> \`\`\`javascript\
> const URL = 'wss\://streaming.bluegamma.io/fx\_stream?token=YOUR\_TOKEN';\
> const SYMBOLS = \['EURUSD', 'GBPUSD'];\
> const SILENCE\_LIMIT\_MS = 60000;   // no quote AND no ping for 60s => reconnect\
> \
> let attempt = 0;\
> \
> function connect() {\
> &#x20; const ws = new WebSocket(URL);\
> &#x20; let watchdog;\
> \
> &#x20; // Any inbound message (quote or ping) proves the stream is alive.\
> &#x20; const bump = () => {\
> &#x20;   clearTimeout(watchdog);\
> &#x20;   watchdog = setTimeout(() => ws.close(), SILENCE\_LIMIT\_MS);\
> &#x20; };\
> \
> &#x20; ws.addEventListener('open', () => {\
> &#x20;   attempt = 0;\
> &#x20;   // Subscription state is per connection: always re-subscribe.\
> &#x20;   ws.send(JSON.stringify({action: 'subscribe', symbols: SYMBOLS}));\
> &#x20;   bump();\
> &#x20; });\
> \
> &#x20; ws.addEventListener('message', (event) => {\
> &#x20;   bump();\
> &#x20;   const msg = JSON.parse(event.data);\
> &#x20;   if (msg.type === 'quote') {\
> &#x20;     console.log(\`${msg.symbol} ${msg.mid} (bid ${msg.bid} / ask ${msg.ask})\`);\
> &#x20;   } else if (msg.type === 'error') {\
> &#x20;     console.warn('stream error:', msg.error);\
> &#x20;   }\
> &#x20; });\
> \
> &#x20; ws.addEventListener('close', () => {\
> &#x20;   clearTimeout(watchdog);\
> &#x20;   // Exponential backoff with jitter, capped at 30s.\
> &#x20;   const delay = Math.min(30000, 1000 \* 2 \*\* attempt++) \* (0.5 + Math.random());\
> &#x20;   setTimeout(connect, delay);\
> &#x20; });\
> }\
> \
> connect();\
> \`\`\`\
> \
> Example Usage (Python - websockets):\
> \`\`\`python\
> import asyncio, json, random, websockets\
> \
> URL = "wss\://streaming.bluegamma.io/fx\_stream?token=YOUR\_TOKEN"\
> SYMBOLS = \["EURUSD", "GBPUSD"]\
> SILENCE\_LIMIT\_S = 60  # no quote AND no ping for 60s => reconnect\
> \
> async def run():\
> &#x20;   attempt = 0\
> &#x20;   while True:\
> &#x20;       try:\
> &#x20;           async with websockets.connect(URL) as ws:\
> &#x20;               attempt = 0\
> &#x20;               \# Subscription state is per connection: always re-subscribe.\
> &#x20;               await ws.send(json.dumps({"action": "subscribe", "symbols": SYMBOLS}))\
> &#x20;               while True:\
> &#x20;                   \# Any inbound message (quote or ping) resets the clock;\
> &#x20;                   \# silence past the limit raises and triggers a reconnect.\
> &#x20;                   raw = await asyncio.wait\_for(ws.recv(), timeout=SILENCE\_LIMIT\_S)\
> &#x20;                   msg = json.loads(raw)\
> &#x20;                   if msg.get("type") == "quote":\
> &#x20;                       print(msg\["symbol"], msg\["mid"], msg\["bid"], msg\["ask"])\
> &#x20;                   elif msg.get("type") == "error":\
> &#x20;                       print("stream error:", msg.get("error"))\
> &#x20;       except Exception as exc:\
> &#x20;           delay = min(30, 2 \*\* attempt) \* (0.5 + random.random())\
> &#x20;           attempt += 1\
> &#x20;           print(f"disconnected ({exc}); reconnecting in {delay:.1f}s")\
> &#x20;           await asyncio.sleep(delay)\
> \
> 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 - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"schemas":{"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"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\n<a href=\"https://www.bluegamma.io/documentation/integrations/supported-fx-currency-pairs\" target=\"_blank\">View supported currency pairs →</a>\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  \"bid\": 1.08445,\n  \"ask\": 1.08455,\n  \"timestamp\": \"2025-01-15T14:30:25.123Z\"\n}\n```\n\nConnection status (sent once, immediately after connecting):\n```json\n{\"type\": \"connected\", \"client_id\": \"...\", \"subscribed\": [\"EURUSD\"]}\n```\n\nSubscription confirmations:\n```json\n{\"type\": \"subscribed\", \"symbols\": [\"GBPUSD\"]}\n{\"type\": \"unsubscribed\", \"symbols\": [\"EURUSD\"]}\n```\n\nHeartbeat — the server sends periodic pings to keep the connection open:\n```json\n{\"type\": \"ping\"}\n{\"type\": \"pong\"}\n```\n\nErrors:\n```json\n{\"type\": \"error\", \"error\": \"Unknown action: subcribe\"}\n{\"type\": \"error\", \"error\": \"Invalid JSON message\"}\n```\n\n### Reconnecting\n\nWebSocket connections drop — networks change, proxies time out idle\nconnections, servers restart. A long-running integration should expect\nthis and reconnect automatically rather than treating a dropped\nconnection as a failure.\n\nA straightforward approach, used in the reference clients below:\n\n- Track when you last received **any** message. Quotes and pings both\n  count, so this works during quiet periods too — note that FX markets\n  close at weekends, when quotes legitimately stop arriving.\n- If nothing arrives for 60 seconds, close the connection and open a\n  new one.\n- Reconnect with exponential backoff (e.g. 1s, 2s, 4s … capped around\n  30s) plus a little random jitter, so many clients don't reconnect in\n  lockstep.\n- **Re-send your subscriptions after reconnecting** — subscription\n  state belongs to the connection and is not carried across one.\n- You can also send `{\"action\": \"ping\"}` at any time and expect\n  `{\"type\": \"pong\"}` back, if you'd rather probe actively.\n\n**Service status.** Live status, incident history and status\nsubscriptions: <a href=\"https://status.bluegamma.io/\" target=\"_blank\">status.bluegamma.io</a>.\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\n### Reference client\n\nBoth examples reconnect automatically: they watch for any inbound\nmessage, back off and reconnect when the stream goes quiet, and\nre-subscribe on each new connection.\n\nExample Usage (JavaScript):\n```javascript\nconst URL = 'wss://streaming.bluegamma.io/fx_stream?token=YOUR_TOKEN';\nconst SYMBOLS = ['EURUSD', 'GBPUSD'];\nconst SILENCE_LIMIT_MS = 60000;   // no quote AND no ping for 60s => reconnect\n\nlet attempt = 0;\n\nfunction connect() {\n  const ws = new WebSocket(URL);\n  let watchdog;\n\n  // Any inbound message (quote or ping) proves the stream is alive.\n  const bump = () => {\n    clearTimeout(watchdog);\n    watchdog = setTimeout(() => ws.close(), SILENCE_LIMIT_MS);\n  };\n\n  ws.addEventListener('open', () => {\n    attempt = 0;\n    // Subscription state is per connection: always re-subscribe.\n    ws.send(JSON.stringify({action: 'subscribe', symbols: SYMBOLS}));\n    bump();\n  });\n\n  ws.addEventListener('message', (event) => {\n    bump();\n    const msg = JSON.parse(event.data);\n    if (msg.type === 'quote') {\n      console.log(`${msg.symbol} ${msg.mid} (bid ${msg.bid} / ask ${msg.ask})`);\n    } else if (msg.type === 'error') {\n      console.warn('stream error:', msg.error);\n    }\n  });\n\n  ws.addEventListener('close', () => {\n    clearTimeout(watchdog);\n    // Exponential backoff with jitter, capped at 30s.\n    const delay = Math.min(30000, 1000 * 2 ** attempt++) * (0.5 + Math.random());\n    setTimeout(connect, delay);\n  });\n}\n\nconnect();\n```\n\nExample Usage (Python - websockets):\n```python\nimport asyncio, json, random, websockets\n\nURL = \"wss://streaming.bluegamma.io/fx_stream?token=YOUR_TOKEN\"\nSYMBOLS = [\"EURUSD\", \"GBPUSD\"]\nSILENCE_LIMIT_S = 60  # no quote AND no ping for 60s => reconnect\n\nasync def run():\n    attempt = 0\n    while True:\n        try:\n            async with websockets.connect(URL) as ws:\n                attempt = 0\n                # Subscription state is per connection: always re-subscribe.\n                await ws.send(json.dumps({\"action\": \"subscribe\", \"symbols\": SYMBOLS}))\n                while True:\n                    # Any inbound message (quote or ping) resets the clock;\n                    # silence past the limit raises and triggers a reconnect.\n                    raw = await asyncio.wait_for(ws.recv(), timeout=SILENCE_LIMIT_S)\n                    msg = json.loads(raw)\n                    if msg.get(\"type\") == \"quote\":\n                        print(msg[\"symbol\"], msg[\"mid\"], msg[\"bid\"], msg[\"ask\"])\n                    elif msg.get(\"type\") == \"error\":\n                        print(\"stream error:\", msg.get(\"error\"))\n        except Exception as exc:\n            delay = min(30, 2 ** attempt) * (0.5 + random.random())\n            attempt += 1\n            print(f\"disconnected ({exc}); reconnecting in {delay:.1f}s\")\n            await asyncio.sleep(delay)\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, with backoff — see the\nreference client above.\n\nCurrent service status and incident history:\n<a href=\"https://status.bluegamma.io/\" target=\"_blank\">status.bluegamma.io</a>\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.\
> \
> UK government yield history starts on 5 January 2023: a UK request with an earlier \`valuation\_time\` returns a 400 naming that minimum date.<br>

```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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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.\n\nUK government yield history starts on 5 January 2023: a UK request with an earlier `valuation_time` returns a 400 naming that minimum date.\n","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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"country_code":{"type":"string"},"tenor":{"type":"string"},"valuation_time":{"$ref":"#/components/schemas/DateTime"},"yield":{"type":"number"}}}}}},"400":{"description":"Bad Request - the request can't be served, for example not enough traded bonds for the country on that date, or for UK a `valuation_time` before 5 January 2023, where UK government yield history starts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get Forward Curve

> Returns a forward curve constructed over a schedule of periods between start\_date and end\_date.\
> \
> Supported indices are the values of the \`Index\` schema — retrieve them programmatically via \`GET /v1/indices\`. This is a different list from the one \`GET /fixing\` supports.\
> \
> \<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, FRA rates, 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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"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":"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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\nSupported indices are the values of the `Index` schema — retrieve them programmatically via `GET /v1/indices`. This is a different list from the one `GET /fixing` supports.\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.). The full supported set is the Index enum, also served by GET /v1/indices (note: not the same list as GET /fixing).","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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get Discount Curve

> Returns discount factors for a schedule between start\_date and end\_date using a given index.\
> \
> Supported indices are the values of the \`Index\` schema — retrieve them programmatically via \`GET /v1/indices\`. This is a different list from the one \`GET /fixing\` supports.\
> \
> \<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, FRA rates, 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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"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":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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\nSupported indices are the values of the `Index` schema — retrieve them programmatically via `GET /v1/indices`. This is a different list from the one `GET /fixing` supports.\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.). The full supported set is the Index enum, also served by GET /v1/indices (note: not the same list as GET /fixing).","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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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, FRA rates, 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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"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":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"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":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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. Retrieve this list programmatically via GET /v1/fixing_indices. Includes deliberately-documented discontinued benchmarks (USD/GBP/CHF LIBORs, 3M CDOR) for which /fixing returns the final published fixing. Excludes SAIBOR.","enum":["SOFR","OBFR","Fed Funds","ESTR","1W EURIBOR","1M EURIBOR","3M EURIBOR","6M EURIBOR","12M EURIBOR","SONIA","SARON","SWESTR","DESTR","CITA","NOWA","AONIA","TONAR","CORRA","SORA","THOR","7D REPO","CDI","91D CD","1M EIBOR","3M EIBOR","6M EIBOR","12M EIBOR","1M HIBOR","3M HIBOR","6M HIBOR","3M BUBOR","6M BUBOR","12M CIBOR","Overnight MIBOR","1M KLIBOR","3M KLIBOR","6M KLIBOR","1M BKBM","2M BKBM","3M BKBM","SW WIBOR","1M WIBOR","3M WIBOR","6M WIBOR","3M TRYIBOR","3M TAIBOR","6M TAIBOR","3M JIBAR","6M JIBAR","ZARONIA","3M BBSW","6M BBSW","3M BBSY","6M BBSY","28 Day TIIE","1M Term SOFR","3M Term SOFR","6M Term SOFR","12M Term SOFR","1M Term CORRA","3M Term CORRA","1M Compounded CORRA","3M Compounded CORRA","1M Compounded SOFR","3M Compounded SOFR","6M Compounded SOFR","12M Compounded SOFR","1M Compounded SONIA","3M Compounded SONIA","6M Compounded SONIA","12M Compounded SONIA","1M Compounded SARON","3M Compounded SARON","6M Compounded SARON","12M Compounded SARON","1M Compounded ZARONIA","3M Compounded ZARONIA","6M Compounded ZARONIA","12M Compounded ZARONIA","FED Federal Funds Target Rate","BOE Bank Rate","ECB Main Refinancing Rate","ECB Deposit 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","OCR","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","Prime Rate","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","1M CHF-LIBOR","6M CHF-LIBOR","3M CDOR","6M MIFOR","3M TELBOR"]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"Fixing not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get Historical Fixings

> Returns a benchmark's published fixings over a date range in a single request, one row per published print, oldest first. Days without a published fixing (weekends, holidays) have no row; for the single-date most-recent-at-or-before lookup, use GET /fixing instead.\
> Responses are capped at 10,000 rows; when a range would exceed the cap the earliest rows are returned and \`truncated\` is set to true. Some licensing-restricted benchmarks are not available over this endpoint and return 403.

```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. Retrieve this list programmatically via GET /v1/fixing_indices. Includes deliberately-documented discontinued benchmarks (USD/GBP/CHF LIBORs, 3M CDOR) for which /fixing returns the final published fixing. Excludes SAIBOR.","enum":["SOFR","OBFR","Fed Funds","ESTR","1W EURIBOR","1M EURIBOR","3M EURIBOR","6M EURIBOR","12M EURIBOR","SONIA","SARON","SWESTR","DESTR","CITA","NOWA","AONIA","TONAR","CORRA","SORA","THOR","7D REPO","CDI","91D CD","1M EIBOR","3M EIBOR","6M EIBOR","12M EIBOR","1M HIBOR","3M HIBOR","6M HIBOR","3M BUBOR","6M BUBOR","12M CIBOR","Overnight MIBOR","1M KLIBOR","3M KLIBOR","6M KLIBOR","1M BKBM","2M BKBM","3M BKBM","SW WIBOR","1M WIBOR","3M WIBOR","6M WIBOR","3M TRYIBOR","3M TAIBOR","6M TAIBOR","3M JIBAR","6M JIBAR","ZARONIA","3M BBSW","6M BBSW","3M BBSY","6M BBSY","28 Day TIIE","1M Term SOFR","3M Term SOFR","6M Term SOFR","12M Term SOFR","1M Term CORRA","3M Term CORRA","1M Compounded CORRA","3M Compounded CORRA","1M Compounded SOFR","3M Compounded SOFR","6M Compounded SOFR","12M Compounded SOFR","1M Compounded SONIA","3M Compounded SONIA","6M Compounded SONIA","12M Compounded SONIA","1M Compounded SARON","3M Compounded SARON","6M Compounded SARON","12M Compounded SARON","1M Compounded ZARONIA","3M Compounded ZARONIA","6M Compounded ZARONIA","12M Compounded ZARONIA","FED Federal Funds Target Rate","BOE Bank Rate","ECB Main Refinancing Rate","ECB Deposit 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","OCR","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","Prime Rate","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","1M CHF-LIBOR","6M CHF-LIBOR","3M CDOR","6M MIFOR","3M TELBOR"]},"Date":{"type":"string","format":"date","description":"A date in ISO 8601 only date format (YYYY-MM-DD)"},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/historical_fixings":{"get":{"summary":"Get Historical Fixings","operationId":"getHistoricalFixings","tags":["Central Bank and Benchmark Rates"],"description":"Returns a benchmark's published fixings over a date range in a single request, one row per published print, oldest first. Days without a published fixing (weekends, holidays) have no row; for the single-date most-recent-at-or-before lookup, use GET /fixing instead.\nResponses are capped at 10,000 rows; when a range would exceed the cap the earliest rows are returned and `truncated` is set to true. Some licensing-restricted benchmarks are not available over this endpoint and return 403.","parameters":[{"name":"index","in":"query","description":"The benchmark whose published fixings to retrieve (e.g., SONIA, SOFR, 3M EURIBOR).","required":true,"schema":{"$ref":"#/components/schemas/FixingIndex"}},{"name":"start_date","in":"query","description":"Start of the date range (inclusive).","required":true,"schema":{"$ref":"#/components/schemas/Date"}},{"name":"end_date","in":"query","description":"End of the date range (inclusive). Defaults to today.","required":false,"schema":{"$ref":"#/components/schemas/Date"}}],"responses":{"200":{"description":"Successful retrieval of historical fixings.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"start_date":{"$ref":"#/components/schemas/Date"},"end_date":{"$ref":"#/components/schemas/Date"},"count":{"type":"integer","description":"Number of fixings returned."},"truncated":{"type":"boolean","description":"True when the range matched more than 10,000 rows and the response was cut at the cap."},"fixings":{"type":"array","items":{"type":"object","properties":{"date":{"$ref":"#/components/schemas/Date"},"rate":{"type":"number"}}}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"description":"The requested benchmark is not available for licensing reasons.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"404":{"description":"No fixings found for the requested index.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Invalid date range (end_date earlier than start_date).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## List Fixing Indices

> Returns the list of indices supported by GET /fixing and GET /historical\_fixings, so the supported set can be discovered programmatically (a licensing-restricted subset is refused by /historical\_fixings with a 403). The list matches the FixingIndex enum documented in this specification and includes deliberately-documented discontinued benchmarks (USD/GBP/CHF LIBORs, 3M CDOR) for which /fixing returns the final published fixing.\
> For the indices supported by the curve, swap and rate endpoints (a different list), see GET /indices.

```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"}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"schemas":{"FixingIndex":{"type":"string","description":"Interest rate benchmarks and indices available for fixing rate retrieval. Retrieve this list programmatically via GET /v1/fixing_indices. Includes deliberately-documented discontinued benchmarks (USD/GBP/CHF LIBORs, 3M CDOR) for which /fixing returns the final published fixing. Excludes SAIBOR.","enum":["SOFR","OBFR","Fed Funds","ESTR","1W EURIBOR","1M EURIBOR","3M EURIBOR","6M EURIBOR","12M EURIBOR","SONIA","SARON","SWESTR","DESTR","CITA","NOWA","AONIA","TONAR","CORRA","SORA","THOR","7D REPO","CDI","91D CD","1M EIBOR","3M EIBOR","6M EIBOR","12M EIBOR","1M HIBOR","3M HIBOR","6M HIBOR","3M BUBOR","6M BUBOR","12M CIBOR","Overnight MIBOR","1M KLIBOR","3M KLIBOR","6M KLIBOR","1M BKBM","2M BKBM","3M BKBM","SW WIBOR","1M WIBOR","3M WIBOR","6M WIBOR","3M TRYIBOR","3M TAIBOR","6M TAIBOR","3M JIBAR","6M JIBAR","ZARONIA","3M BBSW","6M BBSW","3M BBSY","6M BBSY","28 Day TIIE","1M Term SOFR","3M Term SOFR","6M Term SOFR","12M Term SOFR","1M Term CORRA","3M Term CORRA","1M Compounded CORRA","3M Compounded CORRA","1M Compounded SOFR","3M Compounded SOFR","6M Compounded SOFR","12M Compounded SOFR","1M Compounded SONIA","3M Compounded SONIA","6M Compounded SONIA","12M Compounded SONIA","1M Compounded SARON","3M Compounded SARON","6M Compounded SARON","12M Compounded SARON","1M Compounded ZARONIA","3M Compounded ZARONIA","6M Compounded ZARONIA","12M Compounded ZARONIA","FED Federal Funds Target Rate","BOE Bank Rate","ECB Main Refinancing Rate","ECB Deposit 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","OCR","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","Prime Rate","1M USD-LIBOR","3M USD-LIBOR","6M USD-LIBOR","1M GBP-LIBOR","3M GBP-LIBOR","6M GBP-LIBOR","1M CHF-LIBOR","6M CHF-LIBOR","3M CDOR","6M MIFOR","3M TELBOR"]},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}}},"responses":{"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/fixing_indices":{"get":{"summary":"List Fixing Indices","operationId":"listFixingIndices","tags":["Central Bank and Benchmark Rates"],"description":"Returns the list of indices supported by GET /fixing and GET /historical_fixings, so the supported set can be discovered programmatically (a licensing-restricted subset is refused by /historical_fixings with a 403). The list matches the FixingIndex enum documented in this specification and includes deliberately-documented discontinued benchmarks (USD/GBP/CHF LIBORs, 3M CDOR) for which /fixing returns the final published fixing.\nFor the indices supported by the curve, swap and rate endpoints (a different list), see GET /indices.","responses":{"200":{"description":"Successful retrieval of the supported fixing indices.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"indices":{"type":"array","items":{"$ref":"#/components/schemas/FixingIndex"}}}}}}},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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":{"allOf":[{"$ref":"#/components/schemas/Index"}],"description":"The reference rate index (e.g., SOFR, 3M EURIBOR, SONIA). The full supported set is the Index enum, also served by GET /v1/indices."},"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."}}},"Index":{"type":"string","description":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"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":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"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), from the pay-fixed side. Positive means the swap gains when rates rise; the same sign for overnight (OIS) and term-rate indices."},"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwapPricerResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"index":{"type":"string"},"tenors":{"type":"array","items":{"type":"string"}}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## List Supported Indices

> Returns the list of indices supported by the curve, swap and rate endpoints (/forward\_curve, /discount\_curve, /swap\_rate, /get\_swap\_curve, /forward\_rate, /discount\_factor, /zero\_rate and related), so the supported set can be discovered programmatically. The list matches the Index enum documented in this specification and includes discontinued-but-served legacy benchmarks (USD/GBP/CHF LIBORs, 3M CDOR and similar), which are valued via ISDA-fallback conventions.\
> Note this is NOT the list of indices supported by GET /fixing -- for that, see GET /fixing\_indices.

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Forward & Discount Curves","description":"Forward curves, discount curves, FRA rates, 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"}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"schemas":{"Index":{"type":"string","description":"The authoritative set of interest rate indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /zero_rate, ...). Retrieve it programmatically via GET /v1/indices. Note this is NOT the same list as GET /fixing supports -- fixings cover published benchmark values (see FixingIndex and GET /v1/fixing_indices).","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","ESTR","AONIA","CITA","DESTR","12M EIBOR","6M EIBOR","3M EIBOR","1M EIBOR","CDI","CORRA","3M CDOR","SARON","1M CHF-LIBOR","6M CHF-LIBOR","6M PRIBOR","3M HIBOR","1M HIBOR","6M BUBOR","3M TELBOR","12M CIBOR","6M CIBOR","3M CIBOR","1M CIBOR","Overnight MIBOR","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","12M EURIBOR","3M PRIBOR","6M HIBOR","3M BUBOR","1M BKBM","3M WIBOR","6M STIBOR","1M BBSW","1M BBSY","HONIA","IBR","NOWA","NZONIA","SHIR","ZARONIA","SWESTR","STINA","TNA","TIIEON","THOR","OCR","3M BBSY","6M BBSY","7D REPO","3M TIBOR","6M TIBOR","POLONIA","3M JPY-LIBOR","6M JPY-LIBOR"]},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}}},"responses":{"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/indices":{"get":{"summary":"List Supported Indices","operationId":"listIndices","tags":["Forward & Discount Curves"],"description":"Returns the list of indices supported by the curve, swap and rate endpoints (/forward_curve, /discount_curve, /swap_rate, /get_swap_curve, /forward_rate, /discount_factor, /zero_rate and related), so the supported set can be discovered programmatically. The list matches the Index enum documented in this specification and includes discontinued-but-served legacy benchmarks (USD/GBP/CHF LIBORs, 3M CDOR and similar), which are valued via ISDA-fallback conventions.\nNote this is NOT the list of indices supported by GET /fixing -- for that, see GET /fixing_indices.","responses":{"200":{"description":"Successful retrieval of the supported indices.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"indices":{"type":"array","items":{"$ref":"#/components/schemas/Index"}}}}}}},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get Bond

> Returns descriptive metadata and indicative pricing for a single bond by ISIN.\
> \
> \*\*Pricing source:\*\* 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 supported bonds. 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 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"}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}},"schemas":{"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}}},"paths":{"/bond":{"get":{"summary":"Get Bond","operationId":"getBond","tags":["Bonds"],"description":"Returns descriptive metadata and indicative pricing for a single bond by ISIN.\n\n**Pricing source:** 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 supported bonds. 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 indicative pricing.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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":"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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get Bond Price

> Returns the bond mid price (indicative quote) for an ISIN as\
> of a given valuation date. Returns the most recent quote on or before\
> the valuation date (lookback up to 30 days).\
> \
> \*\*Pricing source:\*\* Indicative quote — this is not a\
> live market quote and should be treated as an indicative reference price only.<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Bonds","description":"Descriptive bond metadata and 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"}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/bond_price":{"get":{"summary":"Get Bond Price","operationId":"getBondPrice","tags":["Bonds"],"description":"Returns the bond mid price (indicative quote) for an ISIN as\nof a given valuation date. Returns the most recent quote on or before\nthe valuation date (lookback up to 30 days).\n\n**Pricing source:** Indicative quote — this is not a\nlive market quote and should be treated as an indicative reference price only.\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}$"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Bond price as of the valuation date.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"isin":{"type":"string"},"valuation_time":{"type":"string","format":"date-time"},"trade_date":{"type":"string","format":"date","nullable":true},"price":{"type":"number","nullable":true}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get Bond Yield

> Returns the bond yield-to-maturity (indicative quote) for an\
> ISIN as of a given valuation date. Returns the most recent yield on or\
> before the valuation date (lookback up to 30 days).\
> \
> \*\*Pricing source:\*\* Indicative quote — this is not a\
> live market quote and should be treated as an indicative reference yield only.<br>

```json
{"openapi":"3.1.0","info":{"title":"BlueGamma API","version":"1.0.0"},"tags":[{"name":"Bonds","description":"Descriptive bond metadata and 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"}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"NotFound":{"description":"Not Found - The requested resource or data could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/bond_yield":{"get":{"summary":"Get Bond Yield","operationId":"getBondYield","tags":["Bonds"],"description":"Returns the bond yield-to-maturity (indicative quote) for an\nISIN as of a given valuation date. Returns the most recent yield on or\nbefore the valuation date (lookback up to 30 days).\n\n**Pricing source:** Indicative quote — this is not a\nlive market quote and should be treated as an indicative reference yield only.\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}$"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Bond yield as of the valuation date.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"type":"object","properties":{"isin":{"type":"string"},"valuation_time":{"type":"string","format":"date-time"},"trade_date":{"type":"string","format":"date","nullable":true},"yield":{"type":"number","nullable":true}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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 HICP excluding tobacco (HICPxT), published by Eurostat (Bloomberg CPTFEMU). This is the index EUR zero-coupon inflation swaps settle on; it is not the EU all-items aggregate or headline euro-area HICP. (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. \"EU HICP\" is euro-area HICP excluding tobacco (HICPxT; Bloomberg CPTFEMU), the index EUR zero-coupon inflation swaps settle on.","enum":["UK RPI","UK CPI","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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"UnprocessableEntity":{"description":"Unprocessable Entity - a parameter failed validation. `detail` is a message string for the checks BlueGamma runs itself (dates, tenors, ranges), or a list of per-field errors when a parameter is missing or does not match its type or pattern.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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 HICP excluding tobacco (HICPxT), published by Eurostat (Bloomberg CPTFEMU). This is the index EUR zero-coupon inflation swaps settle on; it is not the EU all-items aggregate or headline euro-area HICP. (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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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)"},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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/Date"}},{"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 over the compounded rate, as a decimal fraction (e.g. 0.0025 = 25bp, 0.0375 = 3.75%). Not basis points and not a percentage. Values above 1 (100%) are rejected with a 422. 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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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, as a decimal fraction (0.0025 = 25bp)"},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"Unprocessable Entity - Invalid parameters provided (e.g., end date before start date, unsupported index).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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":"Forward & Discount Curves","description":"Forward curves, discount curves, FRA rates, 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":{"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","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Bad Request - the parameters are well-formed but cannot be served, for example an unknown or discontinued index. `detail` says what to change.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/fras":{"get":{"summary":"Get FRAs","operationId":"getFras","tags":["Forward & Discount Curves"],"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.","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"description":"No FRA rates found for the given index and valuation time.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"Unprocessable Entity - FRA rates not available for the given index.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## 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, TIIEON, 91D CD,\
> 7D REPO.\
> \
> \*\*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"}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"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."},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"responses":{"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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, TIIEON, 91D CD,\n7D REPO.\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","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"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), interpolated from the market-quoted swaption volatility surface."},"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)."}}}}}},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"Validation Error - Invalid input parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
````

## 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, TIIEON, 91D CD,\
> 7D REPO.\
> \
> \*\*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\`.\
> \
> \*\*Term-rate indices (EURIBOR, TIBOR, PRIBOR, BUBOR and other IBOR-style rates):\*\* a\
> period whose rate has already fixed on the valuation date (its fixing date, e.g. two\
> business days before the period starts for EURIBOR, is on or before it) carries no\
> optionality and is not priced. A cap starting at spot therefore prices from its second\
> period. Overnight indices (SOFR, SONIA and others) compound in arrears, so every\
> period is priced.\
> \
> 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"}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"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."}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"responses":{"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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, TIIEON, 91D CD,\n7D REPO.\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\n**Term-rate indices (EURIBOR, TIBOR, PRIBOR, BUBOR and other IBOR-style rates):** a\nperiod whose rate has already fixed on the valuation date (its fixing date, e.g. two\nbusiness days before the period starts for EURIBOR, is on or before it) carries no\noptionality and is not priced. A cap starting at spot therefore prices from its second\nperiod. Overnight indices (SOFR, SONIA and others) compound in arrears, so every\nperiod is priced.\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","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapFloorPriceResponse"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"Validation Error - Invalid input parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
````

## 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. On term-rate indices a first period that has already fixed still takes its own list entry, so the list stays aligned with the schedule."},"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":"A time period represented as a number followed by a period indicator (D=days, W=weeks, M=months, Y=years)","pattern":"^[0-9]+[DWMY]$"},"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."}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"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","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CapFloorPricePostResponse"}}}},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"Validation Error - Invalid input parameters.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get Central Bank Probabilities

> Market-implied probabilities for the next scheduled central bank decision.\
> \
> Returns the next scheduled decision date, the current policy rate, and the probability that the bank hikes, holds or cuts at that decision. Probabilities are percentages and sum to 100.\
> \
> These figures are the first column of \`GET /v1/central\_bank\_probability\_matrix\` aggregated against the current policy level, so the two endpoints always agree. That endpoint carries the rest of the detail for this decision — the expected change in basis points, the days until it, and the full distribution over rate levels — on the first entry of its \`meetings\` array.\
> \
> \*\*How the expected move is derived.\*\* Each decision's expected move is read from the overnight index swap forward covering the exact window between that decision and the next scheduled one — the period over which the rate set at that decision is actually in force. The first decision is measured against the forward covering today to that decision, which is the only window in the strip containing no decision at all.\
> \
> \*\*Policy rate versus overnight fixing.\*\* Overnight index fixings do not sit exactly at the policy rate: some fix a few basis points below their policy anchor and some above. Forwards are therefore shifted into policy-rate space before any probability is computed, using the spread between the fixing and the policy rate measured over the window before the first decision and held constant across the horizon. Every rate on this response is a policy rate, not a fixing.\
> \
> \*\*Target ranges.\*\* Where the central bank targets a range rather than a single rate (currently USD only), \`current\_policy\_rate\` is the \*\*mid\*\* of that range — 3.625 for a 3.50–3.75% range — and \`target\_range\` carries the bounds. \`target\_range\` is null for every other currency, whose published policy rate is used directly.\
> \
> \*\*The dead zone.\*\* Differences smaller than 1bp between adjacent inter-meeting forwards are below the resolution of the instruments the curve is built from, so expected moves under 1bp are suppressed towards zero by a linear taper — scaled by \`|move| / 1bp\` — reaching zero only at zero. The taper keeps the published probability continuous as a currency drifts across the threshold instead of stepping. Moves at or above 1bp are carried through unmodified: a 5bp expected move produces a 20% probability of a hike.\
> \
> \*\*\`valuation\_time\`\*\* echoes the resolved snapshot the calculation used — the value passed in, or the current time when omitted. \`timestamp\` is the time of the market data behind the curve, which is not the same thing.\
> \
> \*\*\`provisional\_meeting\_date\`\*\* is true when the publishing central bank has not yet finalised the date — the decision is scheduled and traded, but may move.<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":{"CentralBankCurrency":{"type":"string","description":"Currency whose central bank is covered by the probability endpoints.","enum":["AUD","CAD","CHF","EUR","GBP","JPY","NZD","USD"]},"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."},"CentralBankProbabilities":{"type":"object","description":"Market-implied outlook for one central bank's next scheduled decision.","properties":{"currency":{"$ref":"#/components/schemas/CentralBankCurrency"},"meeting_date":{"type":"string","format":"date","description":"Next scheduled policy decision."},"provisional_meeting_date":{"type":"boolean","description":"True when the publishing central bank has not yet finalised this date. The decision is scheduled and traded, but may move."},"current_policy_rate":{"type":"number","description":"Current policy rate in percent. Where the central bank targets a range, this is the mid of that range (3.625 for a 3.50-3.75% range), because the overnight rate trades inside the range rather than at its bounds. Where the bank sets a single rate, it is that rate."},"target_range":{"$ref":"#/components/schemas/CentralBankTargetRange"},"pending_rate":{"type":"number","nullable":true,"description":"Set only while a decided change is announced but not yet effective and the published policy rate still shows the old level (the ECB's ~6-day announcement-to-effect lag is the main case). This is the announced rate that every expected rate and matrix level in this response is anchored to; null at all other times. When set, read current_policy_rate as \"still in force until pending_rate_effective_date\"."},"pending_rate_effective_date":{"type":"string","format":"date","nullable":true,"description":"The date the pending_rate takes effect. Null whenever pending_rate is null."},"hike_probability":{"type":"number","description":"Percent. Probability the policy rate is above the current level after this decision."},"hold_probability":{"type":"number","description":"Percent. Probability the policy rate is unchanged after this decision."},"cut_probability":{"type":"number","description":"Percent. Probability the policy rate is below the current level after this decision."},"base_case":{"type":"string","description":"The most likely of the three outcomes. Ties resolve to Hold.","enum":["Hike","Hold","Cut"]},"observation_basis":{"type":"string","enum":["intraday","eod"],"description":"Cadence of the market data behind this currency's numbers. \"intraday\" curves refresh through the trading day; \"eod\" curves update once per day at the prior close, so their timestamp can trail the valuation time by up to a day. Currently NZD is the one end-of-day currency. Use this to label per-currency freshness; the staleness itself is always valuation_time minus timestamp."},"valuation_time":{"type":"string","format":"date-time","description":"The resolved snapshot the calculation used - the valuation_time passed in, or the current time when it was omitted. Not the same as timestamp, which is the time of the market data behind the curve."},"timestamp":{"type":"string","format":"date-time","description":"Time of the market data the curve was built from."}}},"CentralBankTargetRange":{"type":"object","nullable":true,"description":"Bounds of the current target range, present only where the central bank targets a range rather than a single rate (currently USD only). Null for every other currency. When present, current_policy_rate and every matrix[].rate_level are mids of 25bp-wide ranges rather than bounds.","properties":{"low":{"type":"number"},"high":{"type":"number"}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/central_bank_probabilities":{"get":{"summary":"Get Central Bank Probabilities","operationId":"getCentralBankProbabilities","tags":["Central Bank and Benchmark Rates"],"description":"Market-implied probabilities for the next scheduled central bank decision.\n\nReturns the next scheduled decision date, the current policy rate, and the probability that the bank hikes, holds or cuts at that decision. Probabilities are percentages and sum to 100.\n\nThese figures are the first column of `GET /v1/central_bank_probability_matrix` aggregated against the current policy level, so the two endpoints always agree. That endpoint carries the rest of the detail for this decision — the expected change in basis points, the days until it, and the full distribution over rate levels — on the first entry of its `meetings` array.\n\n**How the expected move is derived.** Each decision's expected move is read from the overnight index swap forward covering the exact window between that decision and the next scheduled one — the period over which the rate set at that decision is actually in force. The first decision is measured against the forward covering today to that decision, which is the only window in the strip containing no decision at all.\n\n**Policy rate versus overnight fixing.** Overnight index fixings do not sit exactly at the policy rate: some fix a few basis points below their policy anchor and some above. Forwards are therefore shifted into policy-rate space before any probability is computed, using the spread between the fixing and the policy rate measured over the window before the first decision and held constant across the horizon. Every rate on this response is a policy rate, not a fixing.\n\n**Target ranges.** Where the central bank targets a range rather than a single rate (currently USD only), `current_policy_rate` is the **mid** of that range — 3.625 for a 3.50–3.75% range — and `target_range` carries the bounds. `target_range` is null for every other currency, whose published policy rate is used directly.\n\n**The dead zone.** Differences smaller than 1bp between adjacent inter-meeting forwards are below the resolution of the instruments the curve is built from, so expected moves under 1bp are suppressed towards zero by a linear taper — scaled by `|move| / 1bp` — reaching zero only at zero. The taper keeps the published probability continuous as a currency drifts across the threshold instead of stepping. Moves at or above 1bp are carried through unmodified: a 5bp expected move produces a 20% probability of a hike.\n\n**`valuation_time`** echoes the resolved snapshot the calculation used — the value passed in, or the current time when omitted. `timestamp` is the time of the market data behind the curve, which is not the same thing.\n\n**`provisional_meeting_date`** is true when the publishing central bank has not yet finalised the date — the decision is scheduled and traded, but may move.\n","parameters":[{"name":"currency","in":"query","description":"ISO currency code. Omit to return every supported central bank in a single call, under a `probabilities` array.","required":false,"schema":{"$ref":"#/components/schemas/CentralBankCurrency"}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful response","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CentralBankProbabilities"},{"type":"object","properties":{"valuation_time":{"type":"string","format":"date-time"},"probabilities":{"type":"array","items":{"$ref":"#/components/schemas/CentralBankProbabilities"}}}}]}}}},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"Validation Error - unsupported currency, or no scheduled decision available for the requested currency.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
```

## Get Central Bank Probability Matrix

> Full market-implied distribution of policy rate levels by meeting date.\
> \
> \*\*Shape.\*\* \`matrix\` holds the rows: one entry per policy rate level, in descending rate order, each spaced one standard move (\`step\_bp\`) from the next around the current policy level. \`meetings\` holds the columns: one entry per scheduled decision, ordered oldest to newest.\
> \
> Each cell is self-describing:\
> \
> \`\`\`json\
> {"rate\_level": 3.875, "probabilities": \[\
> &#x20; {"meeting\_date": "2026-09-16", "probability": 60.37},\
> &#x20; {"meeting\_date": "2026-10-28", "probability": 55.09}\
> ]}\
> \`\`\`\
> \
> So \`probability\` is the chance, in percent, that the policy rate is at that row's \`rate\_level\` after the decision on that cell's \`meeting\_date\`. No parallel array has to be tracked to read a row.\
> \
> Consistency you can rely on, though you do not have to depend on ordering: every row carries exactly one cell per entry in \`meetings\`, in the same chronological order, with \`meeting\_date\` values matching \`meetings\[].meeting\_date\` one for one. For any single priced meeting date, the probabilities across all rows sum to 100 (see null columns below).\
> \
> The cells for the first decision, aggregated against \`current\_policy\_rate\`, reproduce the figures from \`GET /v1/central\_bank\_probabilities\` exactly: summing the cells on rows above the current level gives its \`hike\_probability\`, the cell on the row at the current level gives \`hold\_probability\`, and the rows below give \`cut\_probability\`.\
> \
> \*\*How each decision is priced.\*\* A decision's expected move is taken from the overnight index swap forward spanning that decision to the next scheduled one — the period over which the rate set at that decision is actually in force — differenced against the forward for the preceding window. That expected move is then split across the two adjacent grid levels that bracket it, in the proportions that reproduce it exactly: an expected +32bp on a 25bp grid reads as a 72% chance of one hike and a 28% chance of two. Those per-decision distributions are convolved forward across meetings, so probability spreads over more levels as decisions accumulate.\
> \
> \*\*Policy rate versus overnight fixing.\*\* Overnight index fixings do not sit exactly at the policy rate: some fix a few basis points below their policy anchor and some above. Forwards are shifted into policy-rate space before any probability is computed, using the spread between the fixing and the policy rate measured over the window before the first decision and held constant across the horizon. Every rate on this response is a policy rate, not a fixing.\
> \
> \*\*Target ranges.\*\* Where the central bank targets a range rather than a single rate (currently USD only), \`current\_policy\_rate\` and every \`matrix\[].rate\_level\` are \*\*mids\*\* of 25bp-wide ranges — 3.625 for a 3.50–3.75% range, then 3.875, 4.125 and so on — and \`target\_range\` carries the current bounds. \`target\_range\` is null for every other currency.\
> \
> \*\*\`implied\_change\_bp\` and the dead zone.\*\* Per decision, in basis points, and incremental rather than cumulative. Differences smaller than 1bp between adjacent inter-meeting forwards are below the resolution of the instruments the curve is built from, so expected moves under 1bp are suppressed towards zero by a linear taper — scaled by \`|move| / 1bp\` — reaching zero only at zero, which keeps the published number continuous as a decision drifts across the threshold. Moves at or above 1bp are published unmodified. \`expected\_rate\` is the current policy rate plus the running sum of \`implied\_change\_bp\` up to and including that decision, and equals the probability-weighted level of that matrix column.\
> \
> \*\*Pending decisions.\*\* Between a decision's announcement and its effective date (the ECB applies changes from the start of the next reserve maintenance period, \~6 days after the announcement), the published policy rate still shows the old level while the market already trades the announced one. During that window every \`expected\_rate\` and \`matrix\[].rate\_level\` is anchored to the announced rate, reported as \`pending\_rate\` alongside \`pending\_rate\_effective\_date\`; \`current\_policy\_rate\` keeps showing the published rate still in force. Both fields are null at all other times.\
> \
> \*\*\`step\_bp\`\*\* is the size of one standard move for this central bank and the spacing between adjacent matrix rows. It is per-bank configuration; all eight covered banks are on a 25bp grid today.\
> \
> \*\*Cut, hold and hike in \`meetings\` are cumulative against today's level\*\*, not conditional on that decision alone: the hike figure for a given meeting is the sum of every matrix cell above the current level in that column, hold is the single cell at it, and cut is the sum below. Holding at today's level therefore becomes less likely the further out you look, because it requires every intervening decision to be a hold.\
> \
> \*\*Null columns.\*\* The final decision a central bank has published cannot be priced: its expected move is read from the forward window running from it to the \*next\* decision, and no next decision exists yet to close that window. It is still a real scheduled decision, so it is published rather than hidden — as a \*\*null column\*\*.\
> \
> In \`meetings\` it appears in chronological position with its known facts filled in (\`meeting\_date\`, \`days\_until\`, \`provisional\`) and every derived field null: \`implied\_change\_bp\`, \`expected\_rate\`, \`cut\_probability\`, \`hold\_probability\`, \`hike\_probability\`, \`base\_case\`. Those go null together, never partially, so testing one is enough. Every matrix row carries a matching cell with \`"probability": null\`.\
> \
> Null means "not yet priceable", and it resolves itself: the column fills in automatically once the bank schedules the following decision. Treat it as distinct from a zero. \*\*Within a priced column a zero is a real statement\*\* — that level is unreachable by that decision — and never missing data.\
> \
> At most one null column appears, and only when that final published decision falls inside the horizon. Decisions beyond the horizon are simply absent; they are out of scope rather than unpriceable.\
> \
> Every consistency guarantee — columns summing to 100, the cumulative cut/hold/hike aggregation, the expected-rate path — applies to priced columns. The null column carries no probability mass and takes no part.\
> \
> \*\*\`valuation\_time\`\*\* echoes the resolved snapshot the calculation used — the value passed in, or the current time when omitted. \`timestamp\` is the time of the market data behind the curve, which is not the same thing.<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":{"CentralBankCurrency":{"type":"string","description":"Currency whose central bank is covered by the probability endpoints.","enum":["AUD","CAD","CHF","EUR","GBP","JPY","NZD","USD"]},"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."},"CentralBankProbabilityMatrix":{"type":"object","description":"Market-implied distribution of one central bank's policy rate by scheduled decision date.","properties":{"currency":{"$ref":"#/components/schemas/CentralBankCurrency"},"current_policy_rate":{"type":"number","description":"Current policy rate in percent, and the anchor the matrix rows are spaced around. The mid of the target range where the central bank targets a range."},"target_range":{"$ref":"#/components/schemas/CentralBankTargetRange"},"pending_rate":{"type":"number","nullable":true,"description":"Set only while a decided change is announced but not yet effective and the published policy rate still shows the old level (the ECB's ~6-day announcement-to-effect lag is the main case). This is the announced rate that every expected rate and matrix level in this response is anchored to; null at all other times. When set, read current_policy_rate as \"still in force until pending_rate_effective_date\"."},"pending_rate_effective_date":{"type":"string","format":"date","nullable":true,"description":"The date the pending_rate takes effect. Null whenever pending_rate is null."},"step_bp":{"type":"integer","description":"Size of one standard move for this central bank, in basis points. Adjacent matrix rows are spaced this far apart."},"matrix":{"type":"array","description":"Matrix rows: one entry per policy rate level, in descending rate order. Each row carries one self-describing cell per entry in meetings. For any single priced meeting date the probabilities across all rows sum to exactly 100.00 -- published probabilities are apportioned so the invariant is exact, not a rounding tolerance; a null column carries no mass.","items":{"$ref":"#/components/schemas/CentralBankMatrixRow"}},"meetings":{"type":"array","description":"Matrix columns: one entry per scheduled decision, ordered oldest to newest. Every matrix row carries one cell per entry here, matched by meeting_date. Also carries the per-decision summary - days until, expected change in basis points, expected rate and cumulative cut/hold/hike. Covers every scheduled decision inside the horizon except the final one the central bank has published, which has no later decision to close its forward window (see the endpoint description).","items":{"$ref":"#/components/schemas/CentralBankMeetingSummary"}},"observation_basis":{"type":"string","enum":["intraday","eod"],"description":"Cadence of the market data behind this currency's numbers. \"intraday\" curves refresh through the trading day; \"eod\" curves update once per day at the prior close, so their timestamp can trail the valuation time by up to a day. Currently NZD is the one end-of-day currency. Use this to label per-currency freshness; the staleness itself is always valuation_time minus timestamp."},"valuation_time":{"type":"string","format":"date-time","description":"The resolved snapshot the calculation used - the valuation_time passed in, or the current time when it was omitted. Not the same as timestamp, which is the time of the market data behind the curve."},"timestamp":{"type":"string","format":"date-time","description":"Time of the market data the curve was built from."}}},"CentralBankTargetRange":{"type":"object","nullable":true,"description":"Bounds of the current target range, present only where the central bank targets a range rather than a single rate (currently USD only). Null for every other currency. When present, current_policy_rate and every matrix[].rate_level are mids of 25bp-wide ranges rather than bounds.","properties":{"low":{"type":"number"},"high":{"type":"number"}}},"CentralBankMatrixRow":{"type":"object","properties":{"rate_level":{"type":"number","description":"Policy rate level in percent, and the label for this row - rows are self-describing, so no separate levels array is returned. Quoted as a target range mid where the central bank targets a range (3.625, 3.875, 4.125 ... for 25bp-wide USD ranges)."},"probabilities":{"type":"array","description":"One self-describing cell per priced decision, ordered oldest to newest. Every row carries exactly one cell per entry in the meetings array, with matching meeting_date values, so a row can be read without tracking a parallel array of dates. For any single meeting date the probabilities across all rows sum to 100.","items":{"type":"object","properties":{"meeting_date":{"type":"string","format":"date","description":"The decision this cell belongs to. Matches an entry in the meetings array."},"probability":{"type":"number","nullable":true,"description":"Percent chance the policy rate is at this row's rate_level after that decision. Null on a null column - a published decision that cannot yet be priced (see the endpoint description). A zero is a real statement, not missing data: that level is unreachable by that decision."}}}}}},"CentralBankMeetingSummary":{"type":"object","properties":{"meeting_date":{"type":"string","format":"date"},"days_until":{"type":"integer"},"provisional":{"type":"boolean","description":"True when the publishing central bank has not yet finalised this date."},"implied_change_bp":{"type":"number","nullable":true,"description":"Null on a null column - a published decision not yet priceable. Expected change at this decision alone, in basis points - incremental, not cumulative. An expected move under 1bp in absolute value is reported as exactly 0.0 (see the endpoint description) and that decision contributes no spread to the distribution."},"expected_rate":{"type":"number","nullable":true,"description":"Probability-weighted policy rate after this decision, in percent. Equals the current policy rate plus the running sum of implied_change_bp up to and including this decision, and equals the probability-weighted level of this matrix column."},"cut_probability":{"type":"number","nullable":true,"description":"Percent. Cumulative against today's level - the sum of every matrix cell below the current level in this column, not the probability of a cut at this decision alone."},"hold_probability":{"type":"number","nullable":true,"description":"Percent. The single matrix cell at the current level, so it falls the further out you look: staying at today's level requires every intervening decision to be a hold."},"hike_probability":{"type":"number","nullable":true,"description":"Percent. Cumulative against today's level - the sum of every matrix cell above the current level in this column."},"base_case":{"type":"string","nullable":true,"enum":["Hike","Hold","Cut",null],"description":"Null on a null column (see the endpoint description); the derived fields on a meeting go null together, never partially."}}},"GatewayErrorResponse":{"type":"object","description":"Returned by the API gateway before a request reaches BlueGamma: a missing or invalid API key, or a rate or quota limit. Note the field is `message`, not `detail`.","required":["message"],"properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","description":"Error body returned by the BlueGamma API itself: `detail` is a human-readable message.","required":["detail"],"properties":{"detail":{"type":"string"}}},"ValidationErrorResponse":{"type":"object","description":"Returned with 422 when a parameter is missing or does not match its type or pattern: one entry per failing field.","required":["detail"],"properties":{"detail":{"type":"array","items":{"$ref":"#/components/schemas/ValidationErrorItem"}}}},"ValidationErrorItem":{"type":"object","description":"One parameter that failed validation.","required":["type","loc","msg"],"properties":{"type":{"type":"string","description":"Machine-readable error type, e.g. `missing` or `string_pattern_mismatch`."},"loc":{"type":"array","description":"Where the error is: the request part (`query` or `body`) followed by the field path.","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"type":"string","description":"Human-readable explanation."},"input":{"description":"The rejected value as sent; null when the field was missing."},"ctx":{"type":"object","additionalProperties":true,"description":"Extra context for some error types, such as the pattern a value failed to match."}}}},"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. A valuation_time far enough in the future that no market data can be read for it is rejected with a 422; to price a forward-starting instrument, leave valuation_time unset and use the instrument's own start date.","required":false,"schema":{"$ref":"#/components/schemas/DateTime"}}},"headers":{"RateLimit-Policy":{"description":"The key's limits in IETF RateLimit-Policy format (draft-ietf-httpapi-ratelimit-headers), `q` requests per `w` seconds. Best-effort; absent means unchanged.","schema":{"type":"string"}},"Retry-After":{"description":"Seconds to wait before retrying. Sent on a 429 from the per-second rate limit.","schema":{"type":"integer"}}},"responses":{"Forbidden":{"description":"Forbidden - the API key is missing or invalid (from the gateway, with `message`), or the key is not allowed this endpoint, index or parameter, or its trial has ended (from the API, with `detail`).","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/GatewayErrorResponse"},{"$ref":"#/components/schemas/ErrorResponse"}]}}}},"TooManyRequests":{"description":"Too Many Requests - the key's rate limit was hit (`Too Many Requests`, retry after `Retry-After` seconds) or, on plans with a daily quota, the quota was used up (`Limit Exceeded`, until 00:00 UTC). [Contact sales](https://www.bluegamma.io/contact) for higher limits.","headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"InternalServerError":{"description":"Internal Server Error - the request failed on our side; retrying later may succeed. Most return `detail`; an unexpected failure can return a plain-text body, and a gateway misconfiguration returns `message`.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/GatewayErrorResponse"}]}},"text/plain":{"schema":{"type":"string"}}}},"BadGateway":{"description":"Bad Gateway - the request crashed before BlueGamma could answer (for example it ran out of memory). Retry with backoff; report it if it persists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}},"GatewayTimeout":{"description":"Gateway Timeout - the request took longer than the 29-second gateway limit, usually a very long date range or many dates in one call. Narrow the request or split it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayErrorResponse"}}}}}},"paths":{"/central_bank_probability_matrix":{"get":{"summary":"Get Central Bank Probability Matrix","operationId":"getCentralBankProbabilityMatrix","tags":["Central Bank and Benchmark Rates"],"description":"Full market-implied distribution of policy rate levels by meeting date.\n\n**Shape.** `matrix` holds the rows: one entry per policy rate level, in descending rate order, each spaced one standard move (`step_bp`) from the next around the current policy level. `meetings` holds the columns: one entry per scheduled decision, ordered oldest to newest.\n\nEach cell is self-describing:\n\n```json\n{\"rate_level\": 3.875, \"probabilities\": [\n  {\"meeting_date\": \"2026-09-16\", \"probability\": 60.37},\n  {\"meeting_date\": \"2026-10-28\", \"probability\": 55.09}\n]}\n```\n\nSo `probability` is the chance, in percent, that the policy rate is at that row's `rate_level` after the decision on that cell's `meeting_date`. No parallel array has to be tracked to read a row.\n\nConsistency you can rely on, though you do not have to depend on ordering: every row carries exactly one cell per entry in `meetings`, in the same chronological order, with `meeting_date` values matching `meetings[].meeting_date` one for one. For any single priced meeting date, the probabilities across all rows sum to 100 (see null columns below).\n\nThe cells for the first decision, aggregated against `current_policy_rate`, reproduce the figures from `GET /v1/central_bank_probabilities` exactly: summing the cells on rows above the current level gives its `hike_probability`, the cell on the row at the current level gives `hold_probability`, and the rows below give `cut_probability`.\n\n**How each decision is priced.** A decision's expected move is taken from the overnight index swap forward spanning that decision to the next scheduled one — the period over which the rate set at that decision is actually in force — differenced against the forward for the preceding window. That expected move is then split across the two adjacent grid levels that bracket it, in the proportions that reproduce it exactly: an expected +32bp on a 25bp grid reads as a 72% chance of one hike and a 28% chance of two. Those per-decision distributions are convolved forward across meetings, so probability spreads over more levels as decisions accumulate.\n\n**Policy rate versus overnight fixing.** Overnight index fixings do not sit exactly at the policy rate: some fix a few basis points below their policy anchor and some above. Forwards are shifted into policy-rate space before any probability is computed, using the spread between the fixing and the policy rate measured over the window before the first decision and held constant across the horizon. Every rate on this response is a policy rate, not a fixing.\n\n**Target ranges.** Where the central bank targets a range rather than a single rate (currently USD only), `current_policy_rate` and every `matrix[].rate_level` are **mids** of 25bp-wide ranges — 3.625 for a 3.50–3.75% range, then 3.875, 4.125 and so on — and `target_range` carries the current bounds. `target_range` is null for every other currency.\n\n**`implied_change_bp` and the dead zone.** Per decision, in basis points, and incremental rather than cumulative. Differences smaller than 1bp between adjacent inter-meeting forwards are below the resolution of the instruments the curve is built from, so expected moves under 1bp are suppressed towards zero by a linear taper — scaled by `|move| / 1bp` — reaching zero only at zero, which keeps the published number continuous as a decision drifts across the threshold. Moves at or above 1bp are published unmodified. `expected_rate` is the current policy rate plus the running sum of `implied_change_bp` up to and including that decision, and equals the probability-weighted level of that matrix column.\n\n**Pending decisions.** Between a decision's announcement and its effective date (the ECB applies changes from the start of the next reserve maintenance period, ~6 days after the announcement), the published policy rate still shows the old level while the market already trades the announced one. During that window every `expected_rate` and `matrix[].rate_level` is anchored to the announced rate, reported as `pending_rate` alongside `pending_rate_effective_date`; `current_policy_rate` keeps showing the published rate still in force. Both fields are null at all other times.\n\n**`step_bp`** is the size of one standard move for this central bank and the spacing between adjacent matrix rows. It is per-bank configuration; all eight covered banks are on a 25bp grid today.\n\n**Cut, hold and hike in `meetings` are cumulative against today's level**, not conditional on that decision alone: the hike figure for a given meeting is the sum of every matrix cell above the current level in that column, hold is the single cell at it, and cut is the sum below. Holding at today's level therefore becomes less likely the further out you look, because it requires every intervening decision to be a hold.\n\n**Null columns.** The final decision a central bank has published cannot be priced: its expected move is read from the forward window running from it to the *next* decision, and no next decision exists yet to close that window. It is still a real scheduled decision, so it is published rather than hidden — as a **null column**.\n\nIn `meetings` it appears in chronological position with its known facts filled in (`meeting_date`, `days_until`, `provisional`) and every derived field null: `implied_change_bp`, `expected_rate`, `cut_probability`, `hold_probability`, `hike_probability`, `base_case`. Those go null together, never partially, so testing one is enough. Every matrix row carries a matching cell with `\"probability\": null`.\n\nNull means \"not yet priceable\", and it resolves itself: the column fills in automatically once the bank schedules the following decision. Treat it as distinct from a zero. **Within a priced column a zero is a real statement** — that level is unreachable by that decision — and never missing data.\n\nAt most one null column appears, and only when that final published decision falls inside the horizon. Decisions beyond the horizon are simply absent; they are out of scope rather than unpriceable.\n\nEvery consistency guarantee — columns summing to 100, the cumulative cut/hold/hike aggregation, the expected-rate path — applies to priced columns. The null column carries no probability mass and takes no part.\n\n**`valuation_time`** echoes the resolved snapshot the calculation used — the value passed in, or the current time when omitted. `timestamp` is the time of the market data behind the curve, which is not the same thing.\n","parameters":[{"name":"currency","in":"query","description":"ISO currency code. Omit to return every supported central bank in a single call, under a `matrices` array.","required":false,"schema":{"$ref":"#/components/schemas/CentralBankCurrency"}},{"name":"horizon_months","in":"query","description":"How far forward to publish scheduled decisions.","required":false,"schema":{"type":"integer","minimum":1,"maximum":36,"default":18}},{"$ref":"#/components/parameters/valuation_time"}],"responses":{"200":{"description":"Successful response","headers":{"RateLimit-Policy":{"$ref":"#/components/headers/RateLimit-Policy"}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CentralBankProbabilityMatrix"},{"type":"object","properties":{"valuation_time":{"type":"string","format":"date-time"},"matrices":{"type":"array","items":{"$ref":"#/components/schemas/CentralBankProbabilityMatrix"}}}}]}}}},"403":{"$ref":"#/components/responses/Forbidden"},"422":{"description":"Validation Error - unsupported currency, or fewer than two scheduled decisions available for the requested currency.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ErrorResponse"},{"$ref":"#/components/schemas/ValidationErrorResponse"}]}}}},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"},"502":{"$ref":"#/components/responses/BadGateway"},"504":{"$ref":"#/components/responses/GatewayTimeout"}}}}}}
````


---

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

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

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

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

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

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

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