Skip to main content
POST
/
api
/
v1
/
muni_stats_trade_activity
US municipal bond trade activity statistics
curl --request POST \
  --url https://terrapinfinance.com/api/v1/muni_stats_trade_activity \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "end_date": "2025-02-28",
  "start_date": "2025-02-01",
  "states": [
    "IL"
  ]
}
'
{
  "data": [
    {
      "customer_bought_count": 921,
      "customer_sold_count": 614,
      "inter_dealer_count": 337,
      "trade_count": 1872,
      "trade_volume": 84320000
    }
  ],
  "total": 1
}

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.

Authorizations

Authorization
string
header
required

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

Body

application/json
end_date
string<date>
required

Latest trade date to include, in ISO-8601 format (YYYY-MM-DD).

start_date
string<date>
required

Earliest trade date to include, in ISO-8601 format (YYYY-MM-DD).

capital_purpose
enum<string>[]

Capital purpose, indicating whether the bond proceeds are used for new projects, to refund prior bonds, or both.

Available options:
mixed,
new money,
refunding
interest_types
enum<string>[]

Types of interest:

  • fixed rate: The bond pays a fixed interest rate throughout its life.
  • cab: Capital Appreciation Bond (CAB), interest accrues and is paid at maturity rather than periodically.
  • variable rate: The bond's interest rate can change over time, typically based on a reference rate or formula (e.g., SOFR, CPI).
  • term rate: The bond pays interest at a rate set for a specific term or period.
  • cab-to-fixed: The bond starts as a capital appreciation bond and converts to a fixed rate bond.
  • step rate: The bond's interest rate increases ("steps up") at predetermined intervals.
  • zero rate / discount rate: A bond that does not pay or accrue interest.
Available options:
cab,
cab-to-fixed,
fixed rate,
step rate,
term rate,
variable rate,
zero rate / discount rate
is_amt
boolean

Whether the bond is an Alternative Minimum Tax (AMT) bond.

is_bank_qualified
boolean

Whether the bond is bank qualified.

is_federally_taxable
boolean

Whether the bond is federally taxable.

is_green
boolean

Whether the bond is a green bond.

is_insured
boolean

Whether the bond is insured by a bond insurance company.

is_pac
boolean

Whether the bond is a Planned Amortization Class (PAC) bond.

is_social
boolean

Whether the bond is a social bond.

is_sustainable
boolean

Whether the bond is a sustainable bond.

rating_group
enum<string> | null

Credit rating group:

  • investment_grade: Bonds with high credit quality, typically considered safe and low risk.
  • high_yield: Bonds with lower credit quality, typically considered riskier and higher yield.
Available options:
high_yield,
investment_grade
seniority
enum<string>[]

Seniority of the bond, derived from the series name, ordered from most senior to most junior.

Available options:
first_lien,
junior,
second_lien,
senior,
subordinate
sources_of_repayment
enum<string>[]

Sources of repayment for municipal bonds. Determines how the bond will be repaid.

  • Revenue: Repaid from specific project revenues (e.g., tolls, utilities).
  • General Obligation: Repaid from the issuer's general fund.
  • Double Barrel: A combination of General Obligation and Revenue sources.
Available options:
Double Barrel,
General Obligation,
Revenue
states
string[]

US states or territory where the bond is issued (ANSI 2-letter code).

Required string length: 2
use_categories
enum<string>[]

Filter bonds by use categories (middle level of use of funds hierarchy).

For the complete taxonomy, see the Use of Funds Taxonomy reference page.

Available options:
airport,
bridges,
communication,
culture,
economic development,
electrical,
essential services,
gas,
gas prepay,
general purpose,
health system,
higher education,
hospitals,
industrial development,
military housing,
miscellaneous,
multi-family housing,
parking,
port,
power,
pre-school,
primary and secondary education,
public housing,
public transit,
recreational,
roads,
senior living,
single family housing,
student loan,
waste removal,
water and sewer
use_sectors
enum<string>[]

Filter bonds by use sectors (top level of use of funds hierarchy).

For the complete taxonomy, see the Use of Funds Taxonomy reference page.

Available options:
development,
education,
government,
healthcare,
housing,
miscellaneous,
recreation,
securitized,
transportation,
utility
uses_of_proceeds
enum<string>[]

Filter bonds by uses of proceeds (most granular level of use of funds hierarchy).

For the complete taxonomy, see the Use of Funds Taxonomy reference page.

Available options:
airport,
alternative source power,
assisted living,
broadband,
buses,
charter school,
coal power,
combined port authority,
community centre,
community college,
continuing care retirement community,
correctional facilities,
courts,
critical access hospital,
development district,
electrical infrastructure,
ferries,
fire,
flood control,
gas infrastructure,
gas power,
gas prepay,
health system,
hospitality,
independent living,
industrial development,
irrigation,
library,
local hfa multi-family housing,
local hfa single family housing,
local standalone multi-family housing,
local standalone single family housing,
military housing,
miscellaneous,
museum,
non-toll bridges,
non-toll roads,
nuclear power,
nursing home,
office buildings,
parking facilities,
parks,
police,
pollution control,
pre-school and daycare,
private college,
public buildings,
public college,
public housing,
public school district,
regional toll bridges,
regional toll roads,
sewer,
shopping centres,
solar power,
specialty hospital,
stadium,
standalone hospital,
standalone port,
standalone public school,
state hfa multi-family housing,
state hfa single family housing,
state toll bridges,
state toll roads,
storm water,
student housing,
student loan,
telephone,
trains,
tribal,
waste removal,
water,
wind power

Response

Trade activity statistics

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.