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

# Getting Discount Factors

Use /discount\_factor for a single date, /discount\_factors for several dates in one call, or /discount\_curve for a full schedule of discount factors.

Use `/discount_factor` for a single date, `/discount_factors` for several dates in one call, or `/discount_curve` for a schedule. See the [API Reference](/documentation/integrations/api/api-reference.md) for every parameter.

```python
# Single discount factor
url = "https://api.bluegamma.io/v1/discount_factor"
params = {
    "index": "SOFR",
    "date": "2030-12-31"
}
response = requests.get(url, headers=headers, params=params)
print(response.json())

```

```bash
curl -X GET "https://api.bluegamma.io/v1/discount_factor?index=SOFR&date=2030-12-31" \
  -H "x-api-key: your_api_key_here"
```

```python
# Several discount factors in one call: dates or tenors, repeated
url = "https://api.bluegamma.io/v1/discount_factors"
params = {
    "index": "SOFR",
    "dates": ["1Y", "2027-12-31", "5Y"]
}
response = requests.get(url, headers=headers, params=params)
for point in response.json()["discount_factors"]:
    print(point["date"], point["discount_factor"])
```

```bash
curl -X GET "https://api.bluegamma.io/v1/discount_factors?index=SOFR&dates=1Y&dates=2027-12-31&dates=5Y" \
  -H "x-api-key: your_api_key_here"
```

For a schedule of discount factors at a fixed frequency, see [Fetching a Discount Curve](/documentation/integrations/api/how-to-guides/fetching-a-discount-curve.md).

***

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


---

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

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

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

```
GET https://www.bluegamma.io/documentation/integrations/api/how-to-guides/getting-discount-factors.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.
