# Financial Datasets — Treasury Yields (Historical)

Get historical US Treasury yield curves via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Financial Datasets, pass parameters such as end_date, start_date, and retrieve structured data including yield curve reference date for yield curve chart, and economic dataset, ready for production pipelines and AI agent automation.

Documentation: https://openany.si/financial-datasets/financial-datasets-treasury-yields-historical/e055d520-8ee0-4937-a2b0-ca4504be7431/
API ID: e055d520-8ee0-4937-a2b0-ca4504be7431
Provider: financialdatasets
Contract revision: 4
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/financialdatasets/macro/yield-curve
Page update time: 2026-12-03T02:49:08.513Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: none
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.02 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:49:07.832Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "20000",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Financial Datasets Yield Curve History API

Set optional start\_date and end\_date. yield\_curve is an array of dated curve objects, with individual tenor keys such as 3\_month, 2\_year and 10\_year. Rates are par yields in percent; preserve null tenors when a value was unavailable for that date.

## What You Can Build

- **Yield curve chart**: Compare tenor rates for selected reference dates.
- **Economic dataset**: Store dated curve observations without replacing missing tenors with zero.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `yield_curve[].date` | Yield curve reference date |
| `yield_curve[].3_month` | Three-month par yield in percent |
| `yield_curve[].2_year` | Two-year par yield in percent |
| `yield_curve[].10_year` | Ten-year par yield in percent |
| `yield_curve[].30_year` | Thirty-year par yield in percent |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Financial Datasets — Treasury Yields (Historical) request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "start_date": {
          "type": "string",
          "description": "The first date to return, inclusive, in YYYY-MM-DD format. Defaults to one year before end_date when both dates are omitted; omit it with an end_date to get all available history through that date."
        },
        "end_date": {
          "type": "string",
          "description": "The last date to return, inclusive, in YYYY-MM-DD format. Defaults to today."
        },
        "cursor": {
          "type": "string",
          "description": "Opaque pagination cursor from a previous response's next_page_url. When provided, all other query parameters are ignored: the cursor carries the original request's filters. Treat it as opaque; do not construct or modify it."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {}
    }
  },
  "required": [
    "path",
    "query",
    "headers"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "yield_curve": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "10_year": {
            "type": "number"
          },
          "1_5_month": {
            "type": "number"
          },
          "1_month": {
            "type": "number"
          },
          "1_year": {
            "type": "number"
          },
          "20_year": {
            "type": "number"
          },
          "2_month": {
            "type": "number"
          },
          "2_year": {
            "type": "number"
          },
          "30_year": {
            "type": "number"
          },
          "3_month": {
            "type": "number"
          },
          "3_year": {
            "type": "number"
          },
          "4_month": {
            "type": "number"
          },
          "5_year": {
            "type": "number"
          },
          "6_month": {
            "type": "number"
          },
          "7_year": {
            "type": "number"
          },
          "date": {
            "type": "string"
          }
        }
      }
    }
  }
}
```

## Request example
Scenario: Official example (HTTP assumed)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/financialdatasets/macro/yield-curve?end_date=2026-03-31&start_date=2026-01-01' \
  -X GET \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Configured HTTP 200; actual status is unverified.
```json
{
  "yield_curve": [
    {
      "10_year": 4.19,
      "1_5_month": 3.71,
      "1_month": 3.72,
      "1_year": 3.47,
      "20_year": 4.81,
      "2_month": 3.66,
      "2_year": 3.47,
      "30_year": 4.86,
      "3_month": 3.65,
      "3_year": 3.55,
      "4_month": 3.62,
      "5_year": 3.74,
      "6_month": 3.58,
      "7_year": 3.95,
      "date": "2026-01-02"
    }
  ]
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Are tenor values prices of Treasury securities?
No. They are reported par yields in percent.

### Does every calendar day have a curve?
The historical series is organized by business-day observations. Use returned dates rather than filling missing calendar days with zero.

### How should a missing tenor be handled?
Preserve null or unavailable values separately from a reported zero yield.

### How do I continue through the results?
Use the opaque cursor from the pagination response on this same OpenAny endpoint, retaining required inputs. Keep the original query scope when continuing; a new filter selection starts a new request without that cursor.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Review the pricing area for the selected API implementation before calling. Follow its billing unit and terms; retrieving additional pages requires additional requests.

## Available implementations
- financialdatasets: https://openany.si/financial-datasets/financial-datasets-treasury-yields-historical/e055d520-8ee0-4937-a2b0-ca4504be7431/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
