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

# Government Yield Curve

> Retrieve government yield curve points for a given date, region, and curve type.

Benchmark curve returns the EoD yields of the benchmark instruments, and their respective years to maturity.

Zero curve returns the zero rates (or term rates) at exact tenors. The zero curve is constructed via monotone convex bootstrapping of available EoD trades for benchmark instruments. Due to a lack of available EoD trades for very short maturity bills, the earliest tenor available starts at 1 year.

Par curve returns the par yields at exact tenors. The par curve is derived from the zero curve.




## OpenAPI

````yaml post /api/v1/government_yield_curve
openapi: 3.0.0
info:
  title: Terrapin API
  version: 1.0.0
servers:
  - url: https://terrapinfinance.com
    variables: {}
security:
  - authorization: []
tags: []
paths:
  /api/v1/government_yield_curve:
    post:
      tags: []
      summary: Government yield curve
      description: >
        Retrieve government yield curve points for a given date, region, and
        curve type.


        Benchmark curve returns the EoD yields of the benchmark instruments, and
        their respective years to maturity.


        Zero curve returns the zero rates (or term rates) at exact tenors. The
        zero curve is constructed via monotone convex bootstrapping of available
        EoD trades for benchmark instruments. Due to a lack of available EoD
        trades for very short maturity bills, the earliest tenor available
        starts at 1 year.


        Par curve returns the par yields at exact tenors. The par curve is
        derived from the zero curve.
      operationId: government_yield_curve
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              date: '2026-07-23'
              region: us
              type: par
            schema:
              additionalProperties: false
              properties:
                date:
                  description: Curve date in ISO-8601 format (YYYY-MM-DD).
                  format: date
                  nullable: false
                  type: string
                  x-struct: null
                  x-validate: null
                region:
                  description: Region for which to retrieve the curve.
                  enum:
                    - de
                    - uk
                    - us
                  nullable: false
                  type: string
                  x-struct: null
                  x-validate: null
                type:
                  description: >
                    Curve type:

                    - `zero`: zero curve. Lists zero rates at exact tenors.

                    - `par`: par yield curve. Lists par yields at exact tenors.

                    - `benchmark`: benchmark, or 'actives' curve. Lists
                    benchmark instrument yields, and their exact years to
                    maturity.
                  enum:
                    - benchmark
                    - par
                    - zero
                  nullable: false
                  type: string
                  x-struct: null
                  x-validate: null
              required:
                - date
                - region
                - type
              type: object
              x-struct: null
              x-validate: null
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  - rate: 4.135
                    years_to_maturity: 1
                  - rate: 4.348
                    years_to_maturity: 2
                  - rate: 4.386
                    years_to_maturity: 3
                  - rate: 4.455
                    years_to_maturity: 5
                  - rate: 4.57
                    years_to_maturity: 7
                  - rate: 4.702
                    years_to_maturity: 10
                  - rate: 5.047
                    years_to_maturity: 15
                  - rate: 5.158
                    years_to_maturity: 30
                  - rate: 5.193
                    years_to_maturity: 25
                  - rate: 5.198
                    years_to_maturity: 20
                total: 10
              schema:
                additionalProperties: false
                properties:
                  data:
                    description: List of response data objects, often capped to 1000.
                    items:
                      additionalProperties: false
                      properties:
                        rate:
                          description: Rate in percent (e.g. 4.0 for 4%).
                          example: 3.852
                          nullable: false
                          type: number
                          x-struct: null
                          x-validate: null
                        years_to_maturity:
                          description: Years to maturity from the curve date.
                          example: 2
                          nullable: false
                          type: number
                          x-struct: null
                          x-validate: null
                      required:
                        - rate
                        - years_to_maturity
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                  total:
                    description: >-
                      Total number of results in the database that match the
                      query filters.
                    type: integer
                    x-struct: null
                    x-validate: null
                required:
                  - data
                  - total
                title: GovernmentYieldCurveResponse
                type: object
                x-struct: null
                x-validate: null
          description: Government yield curve
        '401':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Unauthorized
                          type: string
                          x-struct: null
                          x-validate: null
                        reason:
                          example: >-
                            Your account tier does not allow this operation.
                            Contact team@terrapinfinance.com for an upgrade.
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Payment Required
                          type: string
                          x-struct: null
                          x-validate: null
                        reason:
                          example: >-
                            You have run out of your granted quota for this
                            resource as defined by your account tier. Contact
                            team@terrapinfinance.com for an upgrade.
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Payment Required
        '403':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Forbidden
                          type: string
                          x-struct: null
                          x-validate: null
                        reason:
                          example: >-
                            Your account tier does not allow this operation.
                            Contact team@terrapinfinance.com for an upgrade.
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Forbidden
        '422':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          example: 'Invalid string. Got: integer'
                          type: string
                          x-struct: null
                          x-validate: null
                        source:
                          properties:
                            pointer:
                              example: /isins/0
                              type: string
                              x-struct: null
                              x-validate: null
                          required:
                            - pointer
                          type: object
                          x-struct: null
                          x-validate: null
                        title:
                          example: Invalid value
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                        - source
                        - title
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Too Many Requests
                          type: string
                          x-struct: null
                          x-validate: null
                        reason:
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Internal Server Error
                          type: string
                          x-struct: null
                          x-validate: null
                        reason:
                          type: string
                          x-struct: null
                          x-validate: null
                      required:
                        - detail
                      type: object
                      x-struct: null
                      x-validate: null
                    type: array
                    x-struct: null
                    x-validate: null
                required:
                  - errors
                type: object
                x-struct: null
                x-validate: null
          description: Internal Server Error
      callbacks: {}
components:
  securitySchemes:
    authorization:
      scheme: bearer
      type: http

````