POST
/
api
/
v1
/
muni_price_to_yield
Municipal price to yield conversion
curl --request POST \
  --url https://terrapinfinance.com/api/v1/muni_price_to_yield \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '[
  {
    "isin": "US005824LP01",
    "trade_data": [
      {
        "price": 101.78,
        "settlement_date": "2025-01-01"
      }
    ]
  }
]'
{
  "data": [
    {
      "isin": "US005824LP01",
      "trade_data": [
        {
          "price": 101.78,
          "settlement_date": "2025-01-01",
          "ytc_continuous": 4.6472,
          "ytc_money_market": null,
          "ytc_semi_annual": 4.7017,
          "ytm_continuous": 4.71611,
          "ytm_money_market": null,
          "ytm_semi_annual": 4.7722
        }
      ]
    }
  ],
  "total": 1
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json · object[]
isin
string
required

International Securities Identification Number (ISIN), unique 12-character code for the security.

Required string length: 12
trade_data
object[]
required

Response

Calculated yield metrics

data
object[]
required

List of response data objects, often capped to 1000.

total
integer
required

Total number of results in the database that match the query filters.