Request Tick History Time and Sales Data using Python

Jonathan Legrand
LSEG Developer Community
2 min readMar 1, 2023

--

Find’s Moragodkrit Chumsri’s full article on the Developer Portal right here!

Refinitiv Tick History (RTH) is a product on the DataScope Select platform that offers unparalleled access to historical high-frequency data across global asset classes dating back to 1996. RTH provides both SOAP-based and REST APIs, but the legacy SOAP-based API is scheduled to be sunset. As a result, clients still using the SOAP-based API may need to migrate to the REST API instead.

One of the primary use cases for an application using RTH API is to request Time and Sales data for RICs. For the SOAP-based API, clients can use the SubmitRequest method to request this data. However, to migrate to the new API, clients must re-implement their applications to use the REST API.

This article presents an example of how to use the new REST API to request Time and Sales data. It also demonstrates how to interact with the REST API using Python programming instead of the REST API Toolkit.Net SDK, as Python scripts can work across operating systems and are easy to use for HTTP requests. This example follows the steps provided in the RTH REST API tutorial section, which can be found on the Developer Portal.

The full article, on the Developer Portal, goes through the following:

On-Demand extraction request

Basically, there are two kinds of Tick History custom solution that are

  • On-Demand extractions- all report attributes specified in the single HTTP request that is submitted to run immediately.
  • Stored & scheduled- The user defines report attributes, stored for future use, and schedules the report to run at set times or triggered by events.

This example uses only On-Demand extraction to request Tick data/Tick History Time and Sales. However, the raw data extraction workflow can apply to several types of On Demand historical data requests. More details can be found at Tick History API User Guide.

In this ‘On-Demand extraction request’ section, we go through the following:

  1. Authentication Request
  2. Send On-Demand Request
  3. Check request status
  4. Retrieve data

After which we provide Python examples:

  1. Step1: Get Authentication Token from DSS server
  2. Step2: Send On Demand Extraction request
  3. Step3: Polling request status from the server
  4. Step4: Retrieve the data using the JobID and Write to file

So Don’t hesitate to give it a read on the Developer Portal!

--

--