The Financial Contracts API provides you with an easy way to compute quantitative analytics that you can easily integrate into a multitude of contexts and workflows. For example, the Financial Contracts API can be used to:
Using Financial Contracts API you can retrieve the data for different market instruments.
The analytics calculated for a market instrument will be based on a set of defaults and assumptions described in this document.
For more advanced usage, the API allows you to easily apply different pricing and market data parameters based on your own market assumptions.
You can also can send financial contract requests in an asynchronous mode (when they contain thousands of instruments and/or take long time to be executed). For more details, plese refer here: IPA Financial Contracts: Asynchronous Mode.
The API currently supports the following financial contracts:
Keep in mind that this list is constantly updating since new supported financial instruments are added.
Besides, you can submit a request for a new financial instrument.
For many of the instruments in the list the Cash Flows analysis is available. For multi-currency portfolios the Cash Flow Currency Conversion Service can be useful.
There is also a list of API parameters and Market Conventions (e.g., calendars, currencies, index names, day count conventions, frequencies, tenors etc.) that can be used across different financial contracts (if such convention applies to a financial contract, a corresponding link is added in the contract's documentation).
For more details on the calculation of the fields, please refer to IPA Financial Contracts: Fields Calculation.
To start using the Financial Contracts API, you need to provide a valid token. It can be retrieved from the oauth2 API. Please refer to the quick start guide for details on how to get the authorization token.
To retrieve quantitative analytics for a financial contract, you need to send the POST request to the endpoint as listed below:
POST - https://api.refinitiv.com/data/quantitative-analytics/v1/financial-contracts
The request is structured as follows:
{
"fields": [
"InstrumentCode",
"BondType",
"IssueDate",
"RedemptionDate",
"CouponRatePercent",
"Accrued",
"CleanPrice",
"DirtyPrice",
"YieldPercent"
],
"outputs": [
"Headers",
"Data"
],
"universe": [
{
"instrumentType": "Bond",
"instrumentDefinition": {
"instrumentTag": "TreasuryBond_10Y",
"instrumentCode": "US10YT=RR"
},
"pricingParameters": {
"valuationDate": "2021-10-21",
"priceSide": "Ask"
}
}
]
}
Below is the description of the properties that can be used in the API request:
TIP: if you don't specify any fields, the API call will return the most relevant fields for that instrument. |
The API response contains the different sections defined in the output property of the request.
{
"headers": [
{
"type": "String",
"name": "InstrumentCode"
},
{
"type": "String",
"name": "BondType"
},
{
"type": "Date",
"name": "IssueDate"
},
{
"type": "Date",
"name": "RedemptionDate"
},
{
"type": "Float",
"name": "CouponRatePercent"
},
{
"type": "Float",
"name": "Accrued"
},
{
"type": "Float",
"name": "CleanPrice"
},
{
"type": "Float",
"name": "DirtyPrice"
},
{
"type": "Float",
"name": "YieldPercent"
}
],
"data": [
[
"US10YT=RR",
"FixedRateBond",
"2021-08-16",
"2031-08-15",
1.25,
0.22758152173913,
96.3125,
96.5400815217391,
1.65848140104608
]
]
}
The headers property will contain the same number of objects as the fields specified in the request.