Introduction to the Request-Response API

 

Last update January 2023
Operating System Any
Interpreter Python 3.x, Postman

What is request-response API

Refinitiv Data Platform (RDP) offers streaming and non-streaming data access. The non-streaming data services are provided as REST based web service, offering ease of use and flexible choice of programming language. Both the streaming and non-streaming requests require that user application be authenticated, before making a data call, i.e. able to access a protected resource. This authentication system and provisioning of access token is based on OAuth 2.0 specification.

This step by step tutorial, will show how to build a simple application, which gets the time-series data from RDP. The language for building this application will be Python, but any major programming language can be used instead. The raw HTTP request/response interactions are also shown in Postman REST application.

Application Workflow

Refer to application diagram shown below. An application starts by getting an access token for protected resource. A protected resource in RDP context, is the REST API which provide market data. There are different techniques to request an access token, which are valid for a short period of time (few minutes). Once a valid token is received, this token is sent with every request to get data. The RDP component Security Token Service (STS) verifies that a token is included in the data request. If the token is still valid and has appropriate scope, request is allowed to access the protected resource.

Diagram

The root endpoint for REST API calls is:

https://api.refinitiv.com

The data URI's are based off this root like:

  • Token Service: /auth/oauth2/VERSION/token
  • Historical Time Series data: /data/historical-pricing/VERSION/views/summaries
  • Company fundamental data: /data/estimates/VERSION/views/income-statement

* The VERSION number will keep changing as the platform and API's evolve.

Pre-Requisites

To follow the example in your own machine, please install Python and setup environment as shown in next tutorial. Also install Postman, which is a tool within the Chrome browser extension or a standalone application, and is used to debug web services.

The user will need following information to follow the tutorial step-by-step. Please contact your account manager to get appropriate username/password for protected RDP resource.

Variable Definition
USERNAME  The username/password required to access RDP request-response API (typically email).
PASSWORD The password for username above -- used to get access token.
CLIENT_ID A unique ID defined for an application making the request. Users can generate/manage their application ID's here

API documentation

The web documentation for Request/Response REST API can be accessed from Refinitiv Developers Portal.

Tutorial Group: 

Introductory Tutorials