> ## Documentation Index
> Fetch the complete documentation index at: https://docs.financialdatasets.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Snapshot

> Get the latest US Treasury par yield curve: 1-month to 30-year yields for the most recent business day.

### Overview

The Treasury Yields Snapshot API returns the most recent business day's par yield curve as one object with one key per tenor.

We source the data directly from authoritative government sources. The snapshot refreshes each evening after the day's final curve is published.

To get started, please create an account and grab your <b>API key</b> at [financialdatasets.ai](https://financialdatasets.ai).

You will use the API key to authenticate your API requests.

### Coverage

| History             | Tenors | Updated |
| ------------------- | ------ | ------- |
| Latest business day | 14     | Daily   |

### Tenors

The object carries `date` plus these keys: `1_month`, `1_5_month`, `2_month`, `3_month`, `4_month`, `6_month`, `1_year`, `2_year`, `3_year`, `5_year`, `7_year`, `10_year`, `20_year`, `30_year`. A tenor is `null` when it was not published that day.

### Getting Started

There are only 2 steps for making a successful API call:

1. Add your API key to the header of the request as `X-API-KEY`.
2. Execute the API request.

### Example

```python Treasury Yields Snapshot theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
import requests

# add your API key to the headers
headers = {
    "X-API-KEY": "your_api_key_here"
}

# create the URL
url = 'https://api.financialdatasets.ai/macro/yield-curve/snapshot'

# make API request
response = requests.get(url, headers=headers)

# parse the latest yield curve from the response
yield_curve = response.json().get('yield_curve')
```

### Example Response

```json theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
{
  "yield_curve": {
    "date": "2026-01-02",
    "1_month": 3.72,
    "1_5_month": 3.71,
    "2_month": 3.66,
    "3_month": 3.65,
    "4_month": 3.62,
    "6_month": 3.58,
    "1_year": 3.47,
    "2_year": 3.47,
    "3_year": 3.55,
    "5_year": 3.74,
    "7_year": 3.95,
    "10_year": 4.19,
    "20_year": 4.81,
    "30_year": 4.86
  }
}
```


## OpenAPI

````yaml GET /macro/yield-curve/snapshot
openapi: 3.0.1
info:
  title: Financial Datasets API
  description: >-
    Stock market API with real-time and historical financial data for 27,000+
    tickers over 30+ years. Financial statements, equity prices, insider trades,
    SEC filings, and more.
  version: 1.0.0
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  contact:
    name: API Support
    url: mailto:support@financialdatasets.ai
    email: support@financialdatasets.ai
  termsOfService: https://financialdatasets.ai/terms-of-use
servers:
  - url: https://api.financialdatasets.ai/
    description: Production server
security:
  - X-API-KEY: []
tags:
  - name: Financial Statements
    description: Access to income statements, balance sheets, and cash flow statements
  - name: Market Data
    description: Real-time and historical price data
  - name: Company Information
    description: Company facts like ticker, name, and description
  - name: Earnings
    description: Earnings data and related information
  - name: News
    description: Real-time and historical news articles
  - name: SEC Filings
    description: SEC filings and regulatory documents
  - name: Insider Trades
    description: Insider trading activity and transactions
  - name: Activist Ownership
    description: Activist stakes from SEC Schedule 13D filings, in real time
  - name: Beneficial Ownership
    description: >-
      Holders of more than 5% of a company's shares, from SEC Schedules 13D and
      13G
  - name: Insider Ownership
    description: Insider ownership statements from SEC Forms 3 and 5
  - name: Institutional Holdings
    description: SEC-direct 13F equity holdings of institutional investment managers
  - name: IPOs
    description: >-
      Upcoming IPOs from SEC registration statements (Form S-1), with extracted
      pre-IPO financial statements
  - name: Index Funds
    description: >-
      ETF and index-fund holdings, weights, and the funds that hold a given
      security
  - name: Financial Metrics
    description: Financial ratios, metrics, and key performance indicators
  - name: Macroeconomics
    description: Real-time and historical macroeconomic data like interest rates
  - name: KPIs
    description: Sector-specific operational KPIs extracted from earnings releases.
  - name: Agent Account
    description: Self-serve account creation and funding for AI agents.
paths:
  /macro/yield-curve/snapshot:
    get:
      tags:
        - Macroeconomics
      summary: Treasury Yields (Snapshot)
      description: >-
        The most recent business day's US Treasury par yield curve as one object
        with one key per tenor. Refreshed each evening after the day's final
        curve is published.
      operationId: getYieldCurveSnapshot
      parameters: []
      responses:
        '200':
          description: Yield curve snapshot response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/YieldCurveSnapshotResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/PaymentRequiredError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    YieldCurveSnapshotResponse:
      type: object
      properties:
        yield_curve:
          $ref: '#/components/schemas/YieldCurve'
    YieldCurve:
      type: object
      properties:
        date:
          type: string
          description: The business day of the curve in YYYY-MM-DD format.
        1_month:
          type: number
          nullable: true
          description: >-
            1-month par yield in percent. Null when this tenor was not published
            on that date.
        1_5_month:
          type: number
          nullable: true
          description: >-
            1.5-month par yield in percent. Null when this tenor was not
            published on that date.
        2_month:
          type: number
          nullable: true
          description: >-
            2-month par yield in percent. Null when this tenor was not published
            on that date.
        3_month:
          type: number
          nullable: true
          description: >-
            3-month par yield in percent. Null when this tenor was not published
            on that date.
        4_month:
          type: number
          nullable: true
          description: >-
            4-month par yield in percent. Null when this tenor was not published
            on that date.
        6_month:
          type: number
          nullable: true
          description: >-
            6-month par yield in percent. Null when this tenor was not published
            on that date.
        1_year:
          type: number
          nullable: true
          description: >-
            1-year par yield in percent. Null when this tenor was not published
            on that date.
        2_year:
          type: number
          nullable: true
          description: >-
            2-year par yield in percent. Null when this tenor was not published
            on that date.
        3_year:
          type: number
          nullable: true
          description: >-
            3-year par yield in percent. Null when this tenor was not published
            on that date.
        5_year:
          type: number
          nullable: true
          description: >-
            5-year par yield in percent. Null when this tenor was not published
            on that date.
        7_year:
          type: number
          nullable: true
          description: >-
            7-year par yield in percent. Null when this tenor was not published
            on that date.
        10_year:
          type: number
          nullable: true
          description: >-
            10-year par yield in percent. Null when this tenor was not published
            on that date.
        20_year:
          type: number
          nullable: true
          description: >-
            20-year par yield in percent. Null when this tenor was not published
            on that date.
        30_year:
          type: number
          nullable: true
          description: >-
            30-year par yield in percent. Null when this tenor was not published
            on that date.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: A short error message.
        message:
          type: string
          description: A more detailed error message.
  responses:
    UnauthorizedError:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Unauthorized
            message: Invalid API key provided
    PaymentRequiredError:
      description: The request requires a paid subscription
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Payment Required
            message: >-
              This endpoint requires a paid subscription. Please upgrade your
              plan.
    NotFoundError:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Not Found
            message: Ticker XXXX not found
  securitySchemes:
    X-API-KEY:
      type: apiKey
      name: X-API-KEY
      description: API key for authentication.
      in: header

````