### POST /api/v1/muni_pricing_latest Request Example Source: https://docs.terrapinfinance.com/api-endpoints/us-municipal-bond-latest-pricing-data This example demonstrates how to structure a POST request to the /api/v1/muni_pricing_latest endpoint. It includes the `as_of_date` and a list of `isins` for which pricing data is requested. ```json { "as_of_date": "2025-08-11", "isins": [ "US828641ZF03" ] } ``` -------------------------------- ### POST /api/v1/muni_pricing_latest Response Example Source: https://docs.terrapinfinance.com/api-endpoints/us-municipal-bond-latest-pricing-data This is an example of a successful response from the /api/v1/muni_pricing_latest endpoint. It contains pricing data for the requested ISINs, including trade details and yield information. ```json { "data": [ { "amount": 10000, "id": "pPwoatVrqhKC8LdABwjqiQ", "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": "US828641ZF03", "price": 103.835, "settlement_date": "2025-08-05", "trade_datetime": "2025-08-04T18:48:08", "trade_type": "customer_bought", "ytc_continuous": 4.4593, "ytc_money_market": null, "ytc_semi_annual": 4.5094, "ytm_continuous": 4.92084, "ytm_money_market": null, "ytm_semi_annual": 4.9819 } ], "total": 1 } ``` -------------------------------- ### Cash Flows (Government and Corporate) Source: https://docs.terrapinfinance.com/llms.txt Get cash flow schedules for fixed or zero rate bonds. ```APIDOC ## Cash Flows (Government and Corporate) ### Description Get cash flow schedules for fixed or zero rate bonds. ### Method GET ### Endpoint /government-and-corporate-cashflows ### Parameters #### Query Parameters - **isin** (string) - Required - The ISIN of the bond. ### Response #### Success Response (200) - **cash_flows** (array[object]) - A list of cash flow events. - **date** (string) - The date of the cash flow (YYYY-MM-DD). - **amount** (number) - The amount of the cash flow. - **type** (string) - The type of cash flow (e.g., 'coupon', 'principal'). ``` -------------------------------- ### Cash Flows (US Agency) Source: https://docs.terrapinfinance.com/llms.txt Get cash flow schedules for fixed or zero rate bonds. ```APIDOC ## Cash Flows (US Agency) ### Description Get cash flow schedules for fixed or zero rate bonds. ### Method GET ### Endpoint /us-agency-cashflows ### Parameters #### Query Parameters - **isin** (string) - Required - The ISIN of the bond. ### Response #### Success Response (200) - **cash_flows** (array[object]) - A list of cash flow events. - **date** (string) - The date of the cash flow (YYYY-MM-DD). - **amount** (number) - The amount of the cash flow. - **type** (string) - The type of cash flow (e.g., 'coupon', 'principal'). ``` -------------------------------- ### Reference Data (Government and Corporate) Source: https://docs.terrapinfinance.com/llms.txt Get full government and corporate bond reference data for a given set of ISINs. ```APIDOC ## Reference Data (Government and Corporate) ### Description Get full government and corporate bond reference data for a given set of ISINs. ### Method GET ### Endpoint /government-and-corporate-reference-data ### Parameters #### Query Parameters - **isins** (array[string]) - Required - A list of ISINs. ### Response #### Success Response (200) - **reference_data** (array[object]) - Reference data for the provided ISINs. - **isin** (string) - The ISIN of the bond. - **issuer_name** (string) - The name of the issuer. - **coupon** (number) - The coupon rate of the bond. - **maturity_date** (string) - The maturity date of the bond (YYYY-MM-DD). - **currency** (string) - The currency of the bond. - **ticker** (string) - The ticker symbol of the bond. - **other_fields** (object) - Additional reference data fields. ``` -------------------------------- ### Latest Pricing (Government and Corporate) Source: https://docs.terrapinfinance.com/llms.txt Get latest end of day government and corporate bond pricing data for a given set of ISINs. ```APIDOC ## Latest Pricing (Government and Corporate) ### Description Get latest end of day government and corporate bond pricing data for a given set of ISINs. ### Method GET ### Endpoint /government-and-corporate-latest-pricing-data ### Parameters #### Query Parameters - **isins** (array[string]) - Required - A list of ISINs. ### Response #### Success Response (200) - **latest_prices** (array[object]) - Latest pricing data for the provided ISINs. - **isin** (string) - The ISIN of the bond. - **date** (string) - The date of the latest pricing data (YYYY-MM-DD). - **price** (number) - The latest end of day price. - **yield** (number) - The latest end of day yield. ``` -------------------------------- ### Get Bond Reference Data Source: https://docs.terrapinfinance.com/api-endpoints/government-and-corporate-reference-data This endpoint allows you to fetch detailed reference data for a list of government and corporate bonds by providing their ISINs. ```APIDOC ## POST /api/v1/bond_reference ### Description Get full government and corporate bond reference data for a given set of ISINs. ### Method POST ### Endpoint /api/v1/bond_reference ### Request Body - **isins** (array[string]) - Required - International Securities Identification Number (ISIN), unique 12-character code for the security. ### Request Example ```json { "isins": [ "XS2724510792" ] } ``` ### Response #### Success Response (200) - **data** (array) - List of response data objects, often capped to 1000. - **asset_class** (string) - Asset class of the bond. - **cfi_code** (string) - CFI code of the bond. - **composite_issue_rating** (string) - Composite issue rating. - **composite_issuer_rating** (string) - Composite issuer rating. - **country** (string) - Country of issuance. - **coupon** (number) - Coupon rate of the bond. - **coupon_frequency** (number) - Frequency of coupon payments. - **currency** (string) - Currency of the bond. - **figi** (string) - FIGI identifier. - **first_coupon_date** (string) - Date of the first coupon payment. - **handle** (any) - Handle information. - **industry_group** (string) - Industry group of the issuer. - **integral_multiple** (number) - Integral multiple for trading. - **interest_accrual_convention** (string) - Interest accrual convention. - **interest_accrual_date** (string) - Date for interest accrual. - **interest_type** (string) - Type of interest (e.g., fixed, variable). - **is_144a** (boolean) - Indicates if the bond is 144A. - **is_callable** (boolean) - Indicates if the bond is callable. - **is_covered** (any) - Indicates if the bond is covered. - **is_green** (any) - Indicates if the bond is green. - **is_inflation_linked** (any) - Indicates if the bond is inflation-linked. - **is_outstanding** (boolean) - Indicates if the bond is outstanding. - **is_puttable** (boolean) - Indicates if the bond is puttable. - **is_regs** (boolean) - Indicates if the bond is registered. - **isin** (string) - ISIN of the bond. - **issue_date** (string) - Date of issuance. - **issue_rating_group** (string) - Issue rating group. - **issued_amount** (number) - Amount issued. - **issuer_name** (string) - Name of the issuer. - **issuer_rating_group** (string) - Issuer rating group. - **issuer_type** (string) - Type of the issuer. - **lei** (string) - Legal Entity Identifier of the issuer. - **lei_direct_parent** (string) - LEI of the direct parent. - **lei_ultimate_parent** (string) - LEI of the ultimate parent. - **maturity_date** (string) - Date of maturity. - **maturity_type** (string) - Type of maturity. - **minimum_denomination** (number) - Minimum denomination. - **name** (string) - Name of the bond. - **rank** (string) - Rank of the bond. - **registration_type** (string) - Type of registration. - **sector** (string) - Sector of the bond. - **ticker** (string) - Ticker symbol. - **total** (number) - Total number of results. #### Response Example ```json { "data": [ { "asset_class": "medium-term note", "cfi_code": "DTFUFB", "composite_issue_rating": "BBB+", "composite_issuer_rating": "BBB", "country": "Greece", "coupon": 5.875, "coupon_frequency": 1, "currency": "EUR", "figi": "BBG01K89S0G8", "first_coupon_date": "2024-11-28", "handle": null, "industry_group": "banks", "integral_multiple": 100000, "interest_accrual_convention": "act/act (ICMA)", "interest_accrual_date": "2023-11-28", "interest_type": "variable rate", "is_144a": true, "is_callable": true, "is_covered": null, "is_green": null, "is_inflation_linked": null, "is_outstanding": true, "is_puttable": false, "is_regs": true, "isin": "XS2724510792", "issue_date": "2023-11-28", "issue_rating_group": "investment_grade", "issued_amount": 500000000, "issuer_name": "EUROBANK SA", "issuer_rating_group": "investment_grade", "issuer_type": "corporate", "lei": "213800KGF4EFNUQKAT69", "lei_direct_parent": "JEUVK5RWVJEN8W0C9M24", "lei_ultimate_parent": "JEUVK5RWVJEN8W0C9M24", "maturity_date": "2029-11-28", "maturity_type": "fixed", "minimum_denomination": 100000, "name": "EUROBANK SA FRN 2029", "rank": "senior unsecured", "registration_type": "bearer", "sector": "financials", "ticker": "EUROB V5.875 11/28/29 EMTN" } ], "total": 1 } ``` ``` -------------------------------- ### Bulk Municipal Historical Pricing Data Source: https://docs.terrapinfinance.com/api-endpoints/us-municipal-bond-daily-historical-pricing-data Get historical US municipal bond pricing data for all ISINs at a given day. ```APIDOC ## POST /api/v1/muni_pricing_daily_history ### Description Get historical US municipal bond pricing data for all ISINs at a given day. ### Method POST ### Endpoint https://terrapinfinance.com/api/v1/muni_pricing_daily_history ### Parameters #### Request Body - **trade_date** (string) - Required - Trade date in ISO-8601 format (YYYY-MM-DD). ### Request Example ```json { "trade_date": "2025-07-01" } ``` ### Response #### Success Response (200) - **data** (array) - List of response data objects, often capped to 1000. - **amount** (number) - Amount of the trade, the total face value (principal) of bonds traded in this transaction. - **id** (string) - Unique trade identifier. - **is_alt_trading_system** (boolean) - Whether this is an alternative trading system (ATS) trade. - **is_cancelled** (boolean) - Whether the trade has been cancelled. - **is_list_offering_price** (boolean) - Whether this is a list offering price. - **is_non_transaction_compensation** (boolean) - Whether this trade involves non-transactional compensation. - **is_weighted_avg_price_trade** (boolean) - Whether this is a weighted average price trade. - **is_when_issued_trade** (boolean) - Whether this is a when-issued trade. - **isin** (string) - ISIN of the bond. - **price** (number) - The price of the bond. - **settlement_date** (string) - Settlement date of the trade. - **trade_datetime** (string) - The date and time the trade occurred. - **trade_type** (string) - The type of trade (e.g., customer_bought). - **ytc_continuous** (number) - Yield to Call (continuous). - **ytc_money_market** (number) - Yield to Call (money market). - **ytc_semi_annual** (number) - Yield to Call (semi-annual). - **ytm_continuous** (number) - Yield to Maturity (continuous). - **ytm_money_market** (number) - Yield to Maturity (money market). - **ytm_semi_annual** (number) - Yield to Maturity (semi-annual). - **total** (number) - Total number of records available. #### Response Example ```json { "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:00Z", "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:00Z", "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 } ``` ``` -------------------------------- ### Historical Pricing (Government and Corporate) Source: https://docs.terrapinfinance.com/llms.txt Get historical government and corporate bond end of day pricing data for a given ISIN. ```APIDOC ## Historical Pricing (Government and Corporate) ### Description Get historical government and corporate bond end of day pricing data for a given ISIN. ### Method GET ### Endpoint /government-and-corporate-historical-pricing-data ### Parameters #### Query Parameters - **isin** (string) - Required - The ISIN of the bond. - **start_date** (string) - Optional - The start date for the historical data (YYYY-MM-DD). - **end_date** (string) - Optional - The end date for the historical data (YYYY-MM-DD). ### Response #### Success Response (200) - **pricing_data** (array[object]) - Historical pricing data. - **date** (string) - The date of the pricing data (YYYY-MM-DD). - **price** (number) - The end of day price. - **yield** (number) - The end of day yield. ``` -------------------------------- ### Latest Pricing (US Agency) Source: https://docs.terrapinfinance.com/llms.txt Get latest end of day US agency bond pricing data for a given set of ISINs. ```APIDOC ## Latest Pricing (US Agency) ### Description Get latest end of day US agency bond pricing data for a given set of ISINs. ### Method GET ### Endpoint /us-agency-latest-pricing-data ### Parameters #### Query Parameters - **isins** (array[string]) - Required - A list of ISINs. ### Response #### Success Response (200) - **latest_prices** (array[object]) - Latest pricing data for the provided ISINs. - **isin** (string) - The ISIN of the bond. - **date** (string) - The date of the latest pricing data (YYYY-MM-DD). - **price** (number) - The latest end of day price. - **yield** (number) - The latest end of day yield. ``` -------------------------------- ### Daily Historical Pricing (US Municipal Bonds) Source: https://docs.terrapinfinance.com/llms.txt Get historical US municipal bond pricing data for all ISINs at a given day. ```APIDOC ## Daily Historical Pricing (US Municipal Bonds) ### Description Get historical US municipal bond pricing data for all ISINs at a given day. ### Method GET ### Endpoint /us-municipal-bond-daily-historical-pricing-data ### Parameters #### Query Parameters - **date** (string) - Required - The date for which to retrieve pricing data (YYYY-MM-DD). ### Response #### Success Response (200) - **pricing_data** (array[object]) - Historical pricing data for the specified date. - **isin** (string) - The ISIN of the bond. - **price** (number) - The end of day price. - **yield** (number) - The end of day yield. ``` -------------------------------- ### Latest Pricing (US Municipal Bonds) Source: https://docs.terrapinfinance.com/llms.txt Get the latest end of day US municipal bond pricing data for a given set of ISINs. ```APIDOC ## Latest Pricing (US Municipal Bonds) ### Description Get the latest end of day US municipal bond pricing data for a given set of ISINs. ### Method GET ### Endpoint /us-municipal-bond-latest-pricing-data ### Parameters #### Query Parameters - **isins** (array[string]) - Required - A list of ISINs. ### Response #### Success Response (200) - **latest_prices** (array[object]) - Latest pricing data for the provided ISINs. - **isin** (string) - The ISIN of the bond. - **date** (string) - The date of the latest pricing data (YYYY-MM-DD). - **price** (number) - The latest end of day price. - **yield** (number) - The latest end of day yield. ``` -------------------------------- ### Get Bond Pricing History Source: https://docs.terrapinfinance.com/api-endpoints/government-and-corporate-historical-pricing-data Fetches historical government and corporate bond end-of-day pricing data for a given ISIN and date range. ```APIDOC ## POST /api/v1/bond_pricing_history ### Description Get historical government and corporate bond end of day pricing data for a given ISIN. ### Method POST ### Endpoint /api/v1/bond_pricing_history ### Parameters #### Request Body - **end_date** (string) - Required - Maximum trade date in ISO-8601 format (YYYY-MM-DD). - **isin** (string) - Required - International Securities Identification Number (ISIN), unique 12-character code for the security. - **start_date** (string) - Required - Minimum trade date in ISO-8601 format (YYYY-MM-DD). ### Request Example { "end_date": "2024-01-01", "isin": "XS1610682764", "start_date": "2023-12-01" } ### Response #### Success Response (200) - **data** (array) - List of response data objects, often capped to 1000. - **convexity** (number) - Macaulay convexity, as calculated on `date` at `price`. - **date** (string) - Trade date in ISO-8601 format (YYYY-MM-DD). - **duration** (number) - Macaulay duration, as calculated on `date` at `price`. - **estimated_volume** (number) - Estimated notional traded volume of the bond at `date`. - **id** (string) - Unique identifier for the pricing record. - **isin** (string) - International Securities Identification Number. - **modified_duration** (number) - Modified duration, as calculated on `date` at `price`. - **price** (number) - The bond's price at the end of the trading day. - **yield_to_maturity** (number) - The bond's yield to maturity at the end of the trading day. - **total** (number) - Total number of records available. #### Response Example { "data": [ { "convexity": 0.19682, "date": "2023-12-18", "duration": 1.94584, "estimated_volume": 12000, "id": "F_w3S4wJYXQBNYd4HwEOKA", "isin": "XS1610682764", "modified_duration": 1.86347, "price": 97.40597, "yield_to_maturity": 4.4202 }, { "convexity": 0.21109, "date": "2023-12-22", "duration": 1.93499, "estimated_volume": 20000, "id": "1kRHbI9HVhbWvq-tv631Tg", "isin": "XS1610682764", "modified_duration": 1.85682, "price": 97.8, "yield_to_maturity": 4.2098 } ], "total": 2 } ``` -------------------------------- ### Get US Agency Cashflows Source: https://docs.terrapinfinance.com/api-endpoints/us-agency-cashflows This endpoint retrieves cash flow schedules for fixed or zero-rate bonds. You can specify one or more International Securities Identification Numbers (ISINs) to get their respective cash flow data. ```APIDOC ## POST /api/v1/agency_cashflows ### Description Get cash flow schedules for fixed or zero rate bonds. ### Method POST ### Endpoint /api/v1/agency_cashflows ### Parameters #### Request Body - **isins** (array[string]) - Required - International Securities Identification Number (ISIN), unique 12-character code for the security. ### Request Example ```json { "isins": [ "US3134H1HN66" ] } ``` ### Response #### Success Response (200) - **data** (array[object]) - List of response data objects, often capped to 1000. - **isin** (string) - The ISIN of the bond. - **cashflows** (array[object]) - List of cashflows for the bond. - **amount** (number) - Amount of the cashflow in the bond's currency. - **date** (string) - Date of the cashflow event in ISO-8601 format (YYYY-MM-DD). - **type** (string) - Type of cashflow: 'principal' or 'interest'. - **total** (number) - Total number of results. #### Response Example ```json { "data": [ { "cashflows": [ { "amount": 2.75, "date": "2024-04-20", "type": "interest" }, { "amount": 100, "date": "2028-10-20", "type": "principal" } ], "isin": "US3134H1HN66" } ], "total": 1 } ``` ``` -------------------------------- ### Get Latest Municipal Bond Pricing Data Source: https://docs.terrapinfinance.com/api-endpoints/us-municipal-bond-latest-pricing-data This endpoint retrieves the latest end-of-day US municipal bond pricing data for a specified set of ISINs. You can optionally provide an 'as_of_date' to get data as of a particular date. ```APIDOC ## POST /api/v1/muni_pricing_latest ### Description Get the latest end of day US municipal bond pricing data for a given set of ISINs. ### Method POST ### Endpoint /api/v1/muni_pricing_latest ### Parameters #### Request Body - **as_of_date** (string) - Optional - Set this date (in ISO-8601 format (YYYY-MM-DD)) to get the latest pricing data as of a specific date. When not set, the latest pricing data is returned. - **isins** (array of strings) - Required - International Securities Identification Number (ISIN), unique 12-character code for the security. ### Request Example ```json { "as_of_date": "2025-08-11", "isins": [ "US828641ZF03" ] } ``` ### Response #### Success Response (200) - **data** (array) - List of response data objects, often capped to 1000. - **amount** (number) - Amount of the trade, the total face value (principal) of bonds traded in this transaction. - **id** (string) - Unique trade identifier. - **is_alt_trading_system** (boolean) - Whether this is an alternative trading system (ATS) trade. - **is_cancelled** (boolean) - Whether the trade has been cancelled. - **is_list_offering_price** (boolean) - Whether this is a list offering price. - **is_non_transaction_compensation** (boolean) - Whether this is a non-transactional compensation trade. - **is_weighted_avg_price_trade** (boolean) - Whether this is a weighted average price trade. - **is_when_issued_trade** (boolean) - Whether this is a when-issued trade. - **isin** (string) - The ISIN of the security. - **price** (number) - The price of the bond. - **settlement_date** (string) - The settlement date of the trade. - **trade_datetime** (string) - The date and time the trade occurred. - **trade_type** (string) - The type of trade (e.g., customer_bought). - **ytc_continuous** (number) - Yield to Call (continuous). - **ytc_money_market** (number) - Yield to Call (money market). - **ytc_semi_annual** (number) - Yield to Call (semi-annual). - **ytm_continuous** (number) - Yield to Maturity (continuous). - **ytm_money_market** (number) - Yield to Maturity (money market). - **ytm_semi_annual** (number) - Yield to Maturity (semi-annual). - **total** (number) - Total number of results. ### Response Example ```json { "data": [ { "amount": 10000, "id": "pPwoatVrqhKC8LdABwjqiQ", "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": "US828641ZF03", "price": 103.835, "settlement_date": "2025-08-05", "trade_datetime": "2025-08-04T18:48:08", "trade_type": "customer_bought", "ytc_continuous": 4.4593, "ytc_money_market": null, "ytc_semi_annual": 4.5094, "ytm_continuous": 4.92084, "ytm_money_market": null, "ytm_semi_annual": 4.9819 } ], "total": 1 } ``` ``` -------------------------------- ### Get US Agency Latest End of Day Pricing Data Source: https://docs.terrapinfinance.com/api-endpoints/us-agency-latest-pricing-data This endpoint retrieves the latest end-of-day pricing data for US agency bonds based on provided ISINs. You can optionally specify a date to get data as of that specific date. ```APIDOC ## POST /api/v1/agency_pricing_latest ### Description Get latest end of day US agency bond pricing data for a given set of ISINs. ### Method POST ### Endpoint https://terrapinfinance.com/api/v1/agency_pricing_latest ### Parameters #### Request Body - **isins** (array[string]) - Required - International Securities Identification Number (ISIN), unique 12-character code for the security. - **as_of_date** (string) - Optional - Set this date (in ISO-8601 format (YYYY-MM-DD)) to get the latest pricing data as of a specific date. When not set, the latest pricing data is returned. ### Request Example ```json { "as_of_date": "2026-04-01", "isins": [ "US3135G05Q27" ] } ``` ### Response #### Success Response (200) - **data** (array) - List of response data objects, often capped to 1000. - **convexity** (number) - Macaulay convexity, as calculated on `date` at `price`. - **date** (string) - Trade date in ISO-8601 format (YYYY-MM-DD). - **duration** (number) - Macaulay duration, as calculated on `date` at `price`. - **estimated_volume** (number) - Estimated notional traded volume of the bond at `date`. This value will necessarily be an underestimation of the actual traded volume due to the lack of complete reported trades. - **id** (string) - Unique trade identifier. - **isin** (string) - International Securities Identification Number (ISIN), unique 12-character code for the security. - **modified_duration** (number) - Modified duration. - **price** (number) - Bond price. - **yield_to_maturity** (number) - Yield to maturity. - **total** (number) - Total number of results. #### Response Example ```json { "data": [ { "convexity": 1.13809, "date": "2026-02-26", "duration": 4.35469, "estimated_volume": 140000, "id": "08iULjxKuBxsJl7kCIa5OQ", "isin": "US3135G05Q27", "modified_duration": 4.20544, "price": 89.23, "yield_to_maturity": 3.5489 } ], "total": 1 } ``` ``` -------------------------------- ### Authentication Source: https://docs.terrapinfinance.com/api-endpoints/us-agency-historical-pricing-data Details on how to authenticate API requests using bearer tokens. ```APIDOC ## Authentication ### Security Schemes - **authorization** (http) - Scheme: bearer. This indicates that API requests should be authenticated using a Bearer token. ``` -------------------------------- ### Cash Flows (US Municipal Bonds) Source: https://docs.terrapinfinance.com/llms.txt Get cash flow schedules for US municipal bonds. ```APIDOC ## Cash Flows (US Municipal Bonds) ### Description Get cash flow schedules for US municipal bonds. ### Method GET ### Endpoint /us-municipal-bond-cashflows ### Parameters #### Query Parameters - **isin** (string) - Required - The ISIN of the municipal bond. ### Response #### Success Response (200) - **cash_flows** (array[object]) - A list of cash flow events. - **date** (string) - The date of the cash flow (YYYY-MM-DD). - **amount** (number) - The amount of the cash flow. - **type** (string) - The type of cash flow (e.g., 'coupon', 'principal'). ``` -------------------------------- ### Bond Interest Rate and Payment Schedule Source: https://docs.terrapinfinance.com/api-endpoints/us-municipal-bond-reference Details on how to specify bond interest rates, including fixed rates and variable rates tied to benchmarks, as well as periodic payment schedules. ```APIDOC ## Bond Interest Rate and Payment Schedule ### Description This section details the structure for representing bond interest rates and periodic payment schedules. Interest rates can be a fixed number or a variable rate based on a benchmark with a spread. Payment schedules define the frequency and amount of payments. ### Parameters #### interest_rate - **type**: number or object - Required/Optional - The interest rate of the bond. Can be a fixed number or an object specifying benchmark, pct_of_benchmark, and spread_in_bps. - **benchmark** (string) - Description for benchmark - **pct_of_benchmark** (number) - Required/Optional - Percentage of the benchmark rate. - **spread_in_bps** (number) - Required/Optional - Spread in basis points. #### periodic_schedule - **type**: object - Required/Optional - Defines the periodic payment schedule. - **period_amount** (integer) - Required - The amount to be paid each period. - **period_type** (string) - Required - The type of period (e.g., 'month', 'week'). - **until** (string) - Required/Optional - The date until which the schedule is valid (format: date). #### payment_date - **type**: object - Required - Details about the payment date, including day of week, month, week of month, and year. - **day_of_week** (integer) - Required - The day of the week. - **month** (integer) - Required - The month. - **week_of_month** (integer) - Required - The week of the month. - **year** (integer) - Required/Optional - The year. ### Request Example ```json { "interest_rate": { "benchmark": "SOFR", "spread_in_bps": 50 }, "payment_date": { "day_of_week": 3, "month": 6, "week_of_month": 2, "year": 2024 }, "periodic_schedule": { "period_amount": 1000, "period_type": "month", "until": "2025-12-31" } } ``` ### Response Example ```json { "interest_rate": { "benchmark": "SOFR", "spread_in_bps": 50 }, "payment_date": { "day_of_week": 3, "month": 6, "week_of_month": 2, "year": 2024 }, "periodic_schedule": { "period_amount": 1000, "period_type": "month", "until": "2025-12-31" } } ``` ``` -------------------------------- ### POST /api/v1/muni_price_to_yield Source: https://docs.terrapinfinance.com/api-endpoints/us-municipal-bond-price-to-yield Calculate yield metrics for municipal securities based on price and settlement date. ```APIDOC ## POST /api/v1/muni_price_to_yield ### Description Calculate yield metrics for municipal securities based on price and settlement date. ### Method POST ### Endpoint /api/v1/muni_price_to_yield ### Parameters #### Request Body - **isin** (string) - Required - International Securities Identification Number (ISIN), unique 12-character code for the security. - **trade_data** (array) - Required - An array of trade data objects. - **price** (number) - Required - Price at which to calculate metrics, expressed as a percentage of the bond's face value. - **settlement_date** (string) - Required - Settlement date at which to calculate metrics in ISO-8601 format (YYYY-MM-DD). ### Request Example ```json [ { "isin": "US005824LP01", "trade_data": [ { "price": 101.78, "settlement_date": "2025-01-01" } ] } ] ``` ### Response #### Success Response (200) - **data** (array) - List of response data objects. - **isin** (string) - International Securities Identification Number (ISIN), unique 12-character code for the security. - **trade_data** (array) - An array of calculated trade data. - **price** (number) - Price at which to calculate metrics. - **settlement_date** (string) - Settlement date at which to calculate metrics. - **ytc_continuous** (number) - Yield to Call (continuous). - **ytc_money_market** (number) - Yield to Call (money market). - **ytc_semi_annual** (number) - Yield to Call (semi-annual). - **ytm_continuous** (number) - Yield to Maturity (continuous). - **ytm_money_market** (number) - Yield to Maturity (money market). - **ytm_semi_annual** (number) - Yield to Maturity (semi-annual). - **total** (integer) - Total number of results. #### Response Example ```json { "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 } ``` ``` -------------------------------- ### POST /api/v1/bond_pricing_latest OpenAPI Specification Source: https://docs.terrapinfinance.com/api-endpoints/government-and-corporate-latest-pricing-data This OpenAPI specification defines the structure and behavior of the POST /api/v1/bond_pricing_latest endpoint. It details the request parameters, including the optional as_of_date and the required list of ISINs, as well as the structure of the response data. ```yaml openapi: 3.0.0 info: title: Terrapin API version: 1.0.0 servers: - url: https://terrapinfinance.com variables: {} security: - authorization: [] tags: [] paths: /api/v1/bond_pricing_latest: post: tags: [] summary: Government and corporate latest end of day pricing data description: >- Get latest end of day government and corporate bond pricing data for a given set of ISINs. operationId: post_bond_pricing_latest parameters: [] requestBody: content: application/json: example: as_of_date: '2024-07-17' isins: - XS1610682764 schema: additionalProperties: false properties: as_of_date: description: >- Set this date (in ISO-8601 format (YYYY-MM-DD)) to get the latest pricing data as of a specific date. When not set, the latest pricing data is returned. format: date type: string x-struct: null x-validate: null isins: description: >- International Securities Identification Number (ISIN), unique 12-character code for the security. items: example: CH0282526133 maxLength: 12 minLength: 12 nullable: false type: string x-struct: null x-validate: null type: array x-check: valid_check_digit x-check-error: Invalid ISIN check digit x-struct: null x-transform: upcase x-validate: null required: - isins type: object x-struct: null x-validate: null required: true responses: '200': content: application/json: example: data: - convexity: 0.15703 date: '2024-07-17' duration: 1.38783 estimated_volume: 20000 id: nbAgC0e11AOfgCoiondwUQ isin: XS1610682764 modified_duration: 1.33952 price: 99.21 yield_to_maturity: 3.60638 total: 1 schema: additionalProperties: false properties: data: description: List of response data objects, often capped to 1000. items: additionalProperties: false properties: convexity: description: >- Macaulay convexity, as calculated on `date` at `price`. nullable: true type: number x-struct: null x-validate: null date: description: Trade date in ISO-8601 format (YYYY-MM-DD). format: date nullable: false type: string x-struct: null x-validate: null duration: description: >- Macaulay duration, as calculated on `date` at `price`. nullable: true type: number x-struct: null x-validate: null estimated_volume: description: >- Estimated notional traded volume of the bond at `date`. This value will necessarily be an underestimation of the actual traded volume due to the lack of complete reported trades. nullable: true type: number x-struct: null x-validate: null id: description: Unique trade identifier. nullable: false type: string x-struct: null x-validate: null isin: description: >- International Securities Identification Number (ISIN), unique 12-character code for the security. ```