IPA Financial Contracts: Getting Started

Overview

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:

  • compute quantitative analytics like premiums and risk measures for a wide range of market instruments.
  • compute and analyze cash flows for a list of instruments.
  • run what-if scenarios for a specific instrument.
  • get analytics to dynamically manage your portfolio.
  • get Intraday and/or historical portfolio valuation.
  • compute spreads to curves or to other benchmark instruments.

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.

Financial Instruments Supported

The API currently supports the following financial contracts:

  • FX Spots
  • FX Forwards
  • FX Swaps
  • Interest Rate Swaps
  • Credit default swaps
  • Bonds
  • Equity options
  • Repos
  • Options
  • Bond Futures
  • Swaption
  • Cap Floor
  • Term Depositis

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.

email us: You can submit a request for a new financial instrument.

 

Before You Begin

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. 

Performing a Request

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/beta1/financial-contracts

The request is structured as follows:

    	
            {
"fields":["<Field>"],
"universe":[
{
"instrumentType":"<Instrument-type>",
"instrumentDefinition":{},
"pricingParameters":{}
}
],
"outputs":["Headers","Data"]
}

Below is the description of the properties that can be used in the API request:

Fields (array)- contains the list of Analytics that the quantitative analytic service will compute. The list of Analytics depends on the instrument type sent in the request.

The list below contains links to the analytics available for each instrument type:

 TIP: if you don't specify any fields, the API call will return all available fields for that instrument.

Universe (array of objects) contains the list of financial contracts you want to price. Each object of the list will contain the following properties:

  • instrumentType: defines the financial contract described in the instrumentDefinition object. The possible values are:
    • FxCross
    • Swap
    • Cds
    • Option
    • Repos
    • Options
    • Bond Futures
    • Swaption
    • Cap Floor
    • Term Deposits
  • instrumentDefinition (object): contains the properties you may use to define a financial contract. The list of the properties depends on the type of instrument defined for the instrumentType property. The list below contains links to the properties available for each instrument type:
  • pricingParameters (object): contains the properties that may be used to control the calculation.
    It mainly covers dates, market data assumptions (e.g. interpolation), and pricing model preferences. Some Parameters are common to all financial contracts, others are specific to a particular contract.

Outputs (array): contains the sections that will be returned by the API. The possible values are:

  • Data

If specified, the response will contain the data tabular object.
This object will contain rows for each instrument object defined in the universe array and columns for each calculation field defined in the fields array of the request. This is the main output, which contains the requested calculations, and is mandatory.

  • Headers

If specified, the response will contain the headers object.
This object will contain the list of requested fields and their types.

  • Statuses

If specified, the response will contain the statuses tabular object.
This object will contain rows for each object defined in the universe array and columns for each calculation field defined in the fields array of the request. The following status may be returned:

0 - Not Applicable. There is no applicable status for this field.

1 - User Override. This data item was provided in the request.

2 - From Market Data. This data has been derived from market data (e.g. interpolated).

3 - Computed output. This field has been computed.

4 - Error. The calculation has returned an error.  If you need more details about the returned error, specify the "ErrorCode" and/or "ErrorMessage" properties in the fields array and  send the request again.

Getting a Response

The API response contains the different sections defined in the output property of the request. 

    	
            

{

  "headers":[

    { 

      "name": "Field1",

      "type" : String

    },

    { 

      "name": "Field2",

      "type" : Float

    }

  ],

  "data":[

    [

      "value1",

      100.490150990375

    ]

  ]

}

The headers property will contain the same number of objects as the fields specified in the request.