> ## 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.

# Bulk Pricing

> Get historical US municipal bond pricing data for all ISINs at a given day.

Not available as an MCP tool: see [REST-only endpoints](https://docs.terrapinfinance.com/mcp/introduction.md#rest-only-endpoints).


## OpenAPI

````yaml post /api/v1/muni_pricing_daily_history
openapi: 3.0.0
info:
  title: Terrapin API
  version: 1.0.0
servers:
  - url: https://terrapinfinance.com
    variables: {}
security:
  - authorization: []
tags: []
paths:
  /api/v1/muni_pricing_daily_history:
    post:
      tags: []
      summary: Bulk municipal historical pricing data for a given day.
      description: >-
        Get historical US municipal bond pricing data for all ISINs at a given
        day.
      operationId: post_muni_pricing_daily_history
      parameters: []
      requestBody:
        content:
          application/json:
            example:
              trade_date: '2025-07-01'
              updated_since: '2025-07-01T15:30:00Z'
            schema:
              additionalProperties: false
              properties:
                trade_date:
                  description: >
                    Trade date in ISO-8601 format (YYYY-MM-DD).


                    Returns every trade whose UTC `trade_datetime` falls on this
                    date, i.e. between

                    00:00:00 UTC and 23:59:59 UTC.
                  format: date
                  type: string
                updated_since:
                  description: >
                    Optional filter to only return trades added or changed since
                    the given UTC instant, in

                    ISO-8601 date-time format (YYYY-MM-DDThh:mm:ssZ).


                    To poll for new trades, pass the time of your previous
                    request and upsert the results by

                    `id`: some may be trades you already have.


                    Trades can still be added or changed days after their
                    `trade_date`, so re-request recent

                    dates in full to catch them.
                  format: date-time
                  nullable: false
                  type: string
              required:
                - trade_date
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                data:
                  - amount: 100000
                    id: rnCB5ECbo3ZUetZO4g5jRA
                    is_alt_trading_system: false
                    is_cancelled: false
                    is_list_offering_price: false
                    is_non_transaction_compensation: false
                    is_weighted_avg_price_trade: false
                    is_when_issued_trade: false
                    isin: US38656NAD84
                    price: 75.391
                    settlement_date: '2025-07-01'
                    trade_datetime: '2025-07-01T00:00:00'
                    trade_type: customer_bought
                    ytc_continuous: 9.3783
                    ytc_money_market: null
                    ytc_semi_annual: 9.6017
                    ytm_continuous: 5.77235
                    ytm_money_market: null
                    ytm_semi_annual: 5.8565
                  - amount: 500000
                    id: 2krB5rQuZbbM-bYZ02g7rw
                    is_alt_trading_system: false
                    is_cancelled: false
                    is_list_offering_price: false
                    is_non_transaction_compensation: false
                    is_weighted_avg_price_trade: false
                    is_when_issued_trade: false
                    isin: US05355ABT34
                    price: 94.947
                    settlement_date: '2025-07-01'
                    trade_datetime: '2025-07-01T00:00:00'
                    trade_type: customer_bought
                    ytc_continuous: 6.2244
                    ytc_money_market: null
                    ytc_semi_annual: 6.3223
                    ytm_continuous: 5.782
                    ytm_money_market: null
                    ytm_semi_annual: 5.8664
                total: 2
              schema:
                additionalProperties: false
                properties:
                  data:
                    description: >-
                      All results, in one response: this endpoint isn't
                      paginated.
                    items:
                      additionalProperties: false
                      properties:
                        amount:
                          description: >
                            Amount of the trade, the total face value
                            (principal) of bonds traded in this transaction.
                          nullable: true
                          type: number
                        id:
                          description: Unique trade identifier.
                          nullable: false
                          type: string
                        is_alt_trading_system:
                          description: >
                            Whether this is an alternative trading system (ATS)
                            trade. An ATS is a non-exchange trading venue that
                            matches buyers and sellers of securities.
                          nullable: false
                          type: boolean
                        is_cancelled:
                          description: Whether the trade has been cancelled.
                          nullable: false
                          type: boolean
                        is_list_offering_price:
                          description: >
                            Whether this is a list offering price, which is a
                            price that is set by the issuer (primary market) and
                            is used to determine the price of the bond in the
                            secondary market.
                          nullable: false
                          type: boolean
                        is_non_transaction_compensation:
                          description: >
                            Whether this is a non-transaction compensation
                            trade, which is a trade that is reported for
                            regulatory or compensation purposes, but does not
                            represent an actual transaction between a buyer and
                            seller.
                          nullable: false
                          type: boolean
                        is_weighted_avg_price_trade:
                          description: >
                            Whether this is a weighted average price trade,
                            which is a trade that is executed at the weighted
                            average price of multiple executions at different
                            prices, typically when a dealer fills an order in
                            pieces.


                            Weighted average price trades aggregate several
                            executions into one reported trade at the average
                            price.
                          nullable: false
                          type: boolean
                        is_when_issued_trade:
                          description: >
                            Whether this is a when-issued trade, which is a
                            trade that is executed before the official issuance
                            and delivery of the bond.
                          nullable: false
                          type: boolean
                        isin:
                          description: >-
                            International Securities Identification Number
                            (ISIN), unique 12-character code for the security.
                          example: US64966HW301
                          maxLength: 12
                          minLength: 12
                          nullable: false
                          type: string
                          x-check: valid_check_digit
                          x-check-error: Invalid ISIN check digit
                          x-transform: upcase
                        price:
                          description: >
                            Trade price of the municipal bond, expressed as a
                            percentage of the bond's face value.
                          nullable: false
                          type: number
                        settlement_date:
                          description: Settlement date in ISO-8601 format (YYYY-MM-DD).
                          format: date
                          nullable: false
                          type: string
                        trade_datetime:
                          description: >-
                            Trade datetime in UTC, in ISO-8601 format
                            (YYYY-MM-DDTHH:MM:SS)
                          format: date_time
                          nullable: false
                          type: string
                        trade_type:
                          description: |
                            Type of trade:

                            - `customer_bought`: Customer bought from a dealer
                            - `customer_sold`: Customer sold to a dealer
                            - `inter_dealer`: Trade between dealers
                          enum:
                            - customer_bought
                            - customer_sold
                            - inter_dealer
                          nullable: true
                          type: string
                        ytc_continuous:
                          description: Yield to call (continuous compounding).
                          nullable: true
                          type: number
                        ytc_money_market:
                          description: Yield to call (money market convention).
                          nullable: true
                          type: number
                        ytc_semi_annual:
                          description: Yield to next call, compounded semi-annually.
                          nullable: true
                          type: number
                        ytm_continuous:
                          description: Yield to maturity (continuous compounding).
                          nullable: true
                          type: number
                        ytm_money_market:
                          description: Yield to maturity (money market convention).
                          nullable: true
                          type: number
                        ytm_semi_annual:
                          description: Yield to maturity, compounded semi-annually.
                          nullable: true
                          type: number
                      required:
                        - amount
                        - id
                        - is_alt_trading_system
                        - is_cancelled
                        - is_list_offering_price
                        - is_non_transaction_compensation
                        - is_weighted_avg_price_trade
                        - is_when_issued_trade
                        - isin
                        - price
                        - settlement_date
                        - trade_datetime
                        - trade_type
                        - ytc_continuous
                        - ytc_money_market
                        - ytc_semi_annual
                        - ytm_continuous
                        - ytm_money_market
                        - ytm_semi_annual
                      type: object
                    type: array
                  total:
                    description: >-
                      Total number of results in the database that match the
                      query filters.
                    type: integer
                required:
                  - data
                  - total
                title: MuniPricingDailyHistoryResponse
                type: object
          description: >-
            A list of all US municipal bond trades and pricing data for the
            specified date.
        '401':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Unauthorized
                          type: string
                        reason:
                          example: >-
                            Your account tier does not allow this operation.
                            Contact team@terrapinfinance.com for an upgrade.
                          type: string
                      required:
                        - detail
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: Unauthorized
        '402':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Payment Required
                          type: string
                        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
                      required:
                        - detail
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: Payment Required
        '403':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Forbidden
                          type: string
                        reason:
                          example: >-
                            Your account tier does not allow this operation.
                            Contact team@terrapinfinance.com for an upgrade.
                          type: string
                      required:
                        - detail
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: Forbidden
        '422':
          content:
            application/json:
              schema:
                properties:
                  errors:
                    items:
                      properties:
                        detail:
                          example: 'Invalid string. Got: integer'
                          type: string
                        source:
                          properties:
                            pointer:
                              example: /isins/0
                              type: string
                          required:
                            - pointer
                          type: object
                        title:
                          example: Invalid value
                          type: string
                      required:
                        - detail
                        - source
                        - title
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: Unprocessable Entity
        '429':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Too Many Requests
                          type: string
                        reason:
                          type: string
                      required:
                        - detail
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: Too Many Requests
        '500':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  errors:
                    items:
                      additionalProperties: false
                      properties:
                        detail:
                          example: Internal Server Error
                          type: string
                        reason:
                          type: string
                      required:
                        - detail
                      type: object
                    type: array
                required:
                  - errors
                type: object
          description: Internal Server Error
      callbacks: {}
components:
  securitySchemes:
    authorization:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.