Thomson Reuters Tick History (TRTH) - REST API

Close Menu
Expand All Collapse All
Introductory Tutorials Tutorials Introduction Video introduction to the TRTH REST API Programming without SDK Tutorial REST API Tutorials REST API Tutorials Introduction REST API Tutorial 1: Connecting to the server REST API Tutorial 2: Retrieving VBD files REST API Tutorial 3: On Demand data extraction workflow REST API Tutorial 4: On Demand tick data extraction REST API Tutorial 5: On Demand market depth extraction REST API Tutorial 6: On Demand intraday bars extraction REST API Tutorial 7: On Demand End of Day extraction REST API Tutorial 8: On Demand raw data extraction REST API Tutorial 9: On Demand corporate actions extraction REST API Tutorial 10: On Demand Histo Reference extraction REST API Tutorial 11: On Demand extraction: instrument list REST API Tutorial 12: GUI control calls: immediate extract REST API Tutorial 13: Historical Search REST API Tutorial 14: Historical Criteria Search REST API Tutorial 15: Historical Chain Constituents Search REST API Tutorial 16: Search by Instrument REST API Tutorial 17: Search for an Equity REST API Tutorial 18: Search for a Future or Option .Net SDK Tutorials .Net SDK Tutorial 1: Connecting to the server .Net SDK Tutorial 2: Retrieving VBD files .Net SDK Tutorial 3: GUI control calls: List, report, sched .Net SDK Tutorial 4: GUI control calls: Validate, extraction .Net SDK Tutorial 5: On Demand extraction, file IO Google BigQuery Tutorials Introduction and environment set-up Data retrieval and tick filters Data analytics Query optimization

REST API Tutorial 2: Retrieving VBD files

Last update February 2020
Environment Any
Language Any HTTP is supported
Compilers None
Prerequisites DSS login, internet access
Source code Below

Tutorial purpose

This tutorial explains how to download the latest Venue by Day (VBD) files of interest, for a set of exchanges. This requires the following steps:

  • Retrieve the list of user packages for which we have permission (for the TRTH VBD subscription this corresponds to the list of venues, i.e. exchanges).
  • Select a few, based on a list of exchange names we are interested in.
  • For each selected user package, we:
    • Retrieve the full list of users package deliveries (data files);
    • Select those with the most recent date (i.e. the previous or current day);
    • Select those where the file type is in our list of interest;
    • Retrieve those files.

These steps illustrate a typical use case and use the API calls, except the filtering steps, which do not require the API.

 

Table of contents

 

Domain objects: explanations

This section explains some key concepts, illustrated with the relevant API calls. These concepts are essential to understand the code. For more information, refer to the API User Guide.

Subscriptions

An account can have permission for one or several subscriptions, like Ownership and Profiles, StreetEvents, Insider, or TRTH Venue by Day.

Each subscription has a subscription Id and name, which does not change. For Tick History Venue by Day they are 0x0400dc1d24a00cb4 and TRTH Venue by Day respectively.

API call to retrieve the list of all subscriptions (regardless of permissions), and return their Ids and names:

GET https://hosted.datascopeapi.reuters.com/RestApi/v1//StandardExtractions/Subscriptions

 

Packages

Each subscription delivers a set of packages. For the TRTH Venue by Day subscription the package list is the list of venues (exchanges or data providers).

Each package has a package Id.

API call to retrieve the list of all available packages for all subscriptions, and return all package Ids and names:

GET https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/Packages

API call to retrieve all available packages for a specific subscription Id:

GET https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/PackageGetPackagesBySubscriptionId(Id='0x0400dc1d24a00cb4')

API call to retrieve the list of all user packages, i.e. packages to which I am entitled (for all subscriptions), and return the user package Id, user package name and the corresponding subscription name:

GET https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackages

This tutorial uses this last API call.

 

Package deliveries

Package deliveries are data files.

For TRTH Venue by Day, these are of several file types:

  • Market data file types, formatted or raw:
    • NORMALIZEDMP         Tick-by-tick: Auction, Correction, Market Condition, Quote and Trade
    • NORMALIZEDLL2         Market by price (25 levels)
    • MARKETPRICE            NORMALIZEDMP in raw format
    • LEGACYLEVEL2           NORMALIZEDLL2 in raw format

Formatted files are the preferred choice as they do not require subsequent treatment by the developer.

  • Other file types:
    • CORP                Corporate Actions: dividend, earning, capital change, share type & stock split
    • REF                   Asset specific reference data: metadata, terms & conditions, symbology changes, etc.
    • Instruments     All the venue’s active instruments. Based on your entitlements, you will receive 1 or more files.

Some file types include not only a data file but also an associated report file that mentions if an instrument was inactive, or its period of activity. Market data is usually active (except for banking holidays and non volatile instruments). Corporate actions and reference data are usually inactive. Here is a small extract for market data:

#RIC,Start (UTC),End (UTC),Status,Details,Count
ABS.MW,,,Inactive,,0
IBM.MW,2016-06-09T05:00:00.605323202Z,2016-06-09T20:00:00.618220426Z,Active,,51

API call to retrieve the list of all user package deliveries for a specific subscription Id and a specific date range, and return the file names and sizes:

GET https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackageDeliveryGetUserPackageDeliveriesByDateRange(SubscriptionId='0x0400dc1d24a00cb4',FromDate=2016-10-12T19:33:10.709Z,ToDate=2016-10-14T19:33:10.709Z)

The servers keep VBD files for 30 days; after that they are discarded.

API call to retrieve the list of all user package deliveries for a specific user package Id, and return the file names and sizes:

GET
https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackageDeliveryGetUserPackageDeliveriesByPackageId(PackageId='0x04f21a8d13c59cb1')

This tutorial uses this last API call.

Other methods to retrieve user package deliveries (lazy loading, paging and change tracking) are illustrated in the REST API C# example application that was presented in the Quick Start.

 

Programming steps

The aim is to download the latest Venue by Day (VBD) files of interest, for a set of exchanges.

Main steps:

 

Get the list of all user packages - HTTP request

We start by retrieving the entire list of user packages, i.e. those for which we have permission.

Note: for all requests we need a user token, set in the header. The token was retrieved in Tutorial 1.

URL:

https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackages

Method:          GET

Headers:

Prefer: respond-async
Content-Type: application/json
Authorization: Token F0ABE9A3FFF2E02E10AE2765ED872C59B8CC3B40EBB61B30E295E71DE31C254B8648DB9434C2DF9299FDC668AA123501F322D99D45C8B93438063C912BC936C7B87062B0CF812138863F5D836A7B31A32DCA67EF07B3B50B2FC4978DF6F76784FDF35FCB523A8430DA93613BC5730CDC310D4D241718F9FC3F2E55465A24957CC287BDEC79046B31AD642606275AEAD76318CB221BD843348E1483670DA13968D8A242AAFCF9E13E23240C905AE46DED9EDCA9BB316B4C5C767B18DB2EA7ADD100817ADF059D01394BC6375BECAF6138C25DBA57577F0061

 

Get the list of all user packages - HTTP response

If the token is valid, this is the response we get:

Status:                        200 OK

Relevant headers:

Content-Type: application/json; charset=utf-8

Body:

Notes:

  • The number of values in the response depends on the entitlements for the account we use.
  • The response will contain packages for all subscriptions, not only TRTH Venue by Day.
  • Here is the beginning of a typical response.
{
  "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#UserPackages",
  "value": [
    {
      "UserPackageId": "0x04f21a8d13459cb1",
      "PackageId": "0x04f21a8d13459cb1",
      "PackageName": "ADC - NASD Alternative Display Facility for NYSE/AMEX Issues",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },
    {
      "UserPackageId": "0x04f21a8d13759cb1",
      "PackageId": "0x04f21a8d13759cb1",
      "PackageName": "ADE - ATHENS DERIVATIVES EXCHANGE",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },
    {
      "UserPackageId": "0x04f21a8d13859cb1",
      "PackageId": "0x04f21a8d13859cb1",
      "PackageName": "ADF - NASD Alternative Display Facility for Nasdaq Large Cap",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },
    {
      "UserPackageId": "0x04f21a8d13a59cb1",
      "PackageId": "0x04f21a8d13a59cb1",
      "PackageName": "ADS - NASD Alternative Display Facility for Nasdaq Capital Market",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },

This goes on with all the other available packages. Here is the last part:

    {
      "UserPackageId": "0x06559b6f5b6b2f96",
      "PackageId": "0x06559b6f5b6b2f96",
      "PackageName": "RRUS - Regulatory Russian Sanctions",
      "SubscriptionId": "0x06516d2d08ab3036",
      "SubscriptionName": "Regulatory Subscriptions"
    },
    {
      "UserPackageId": "0x06af6b1a4720c1bf",
      "PackageId": "0x06af6b1a4720c1bf",
      "PackageName": "EMB - Euronext Access Brussels",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },
    {
      "UserPackageId": "0x06baab580e50d65f",
      "PackageId": "0x06baab580e50d65f",
      "PackageName": "PSX - Pakistan Stock Exchange",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    }
  ]
}

Note: the PackageId is unique to the each package.

 

Select the TRTH VBD user packages

The results of the previous call include all packages for all subscriptions we are entitled to.

Our next step is to filter the results by SubscriptionName, to keep only those where the value is “TRTH Venue by Day”. This is a simple string comparison.

This filtering operation does not use API calls, it is therefore out of scope for this tutorial.

Note:

  • One could be tempted to consider that the contents of this list will not change, and to just save it instead of using calls to retrieve it. This is not recommended, as permission changes would not be taken into account !

 

Filter the list based on exchange code (optional)

The results of the previous step include all TRTH VBD packages for all subscriptions we are entitled to.

The next (optional) step would be to further filter the results by PackageName, to keep only those of interest. This is again based on a string comparison.

 This second filtering might not be required, as the permissioning should reflect the data needs.

This filtering operation does not use API calls, it is therefore out of scope for this tutorial.

The important point at this stage of the workflow is to end up with a list of PackageId for which we want to retrieve data.

In what follows we will limit our list to one single package, for exchange PHS:

    {
      "UserPackageId": "0x04f21a8d28f59cb1",
      "PackageId": "0x04f21a8d28f59cb1",
      "PackageName": "PHS - Philippine Stock Exchange",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "SubscriptionName": "TRTH Venue by Day"
    },

 

Get the list of user package deliveries - HTTP request

For each selected PackageId we retrieve the entire list of user package deliveries (data files). The PackageId is a parameter set in the URL.

URL:

https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackageDeliveryGetUserPackageDeliveriesByPackageId(PackageId='0x04f21a8d28f59cb1')

Method:          GET

Headers:

Prefer: respond-async
Content-Type: application/json
Authorization: Token F0ABE9A3FFF2E02E10AE2765ED872C59B8CC3B40EBB61B30E295E71DE31C254B8648DB9434C2DF9299FDC668AA123501F322D99D45C8B93438063C912BC936C7B87062B0CF812138863F5D836A7B31A32DCA67EF07B3B50B2FC4978DF6F76784FDF35FCB523A8430DA93613BC5730CDC310D4D241718F9FC3F2E55465A24957CC287BDEC79046B31AD642606275AEAD76318CB221BD843348E1483670DA13968D8A242AAFCF9E13E23240C905AE46DED9EDCA9BB316B4C5C767B18DB2EA7ADD100817ADF059D01394BC6375BECAF6138C25DBA57577F0061

 

Get the list of user package deliveries - HTTP response

If the token and PackageId are valid, this is the response we get:

Status:                        200 OK

Relevant headers:

Content-Type: application/json; charset=utf-8

Body:

Notes:

  • There are several files per day (one per file type).
  • The servers keep VBD files for 30 days; after that they are discarded.

Here is the beginning of a typical response:

{
  "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#UserPackageDeliveries",
  "value": [
    {
      "PackageDeliveryId": "0x06fe961e57016137",
      "UserPackageId": "0x04f21a8d28f59cb1",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "Name": "PHS-2020-02-24-LEGACYLEVEL2-Report-1-of-1.csv.gz",
      "ReleaseDateTime": "2020-02-24T12:00:00.000Z",
      "FileSizeBytes": 8161,
      "Frequency": "Daily",
      "ContentMd5": "90ba1ab5408ec2ac8518f31f73faaf5f"
    },
    {
      "PackageDeliveryId": "0x06fe9707ed61613e",
      "UserPackageId": "0x04f21a8d28f59cb1",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "Name": "PHS-2020-02-24-LEGACYLEVEL2-Data-1-of-1.csv.gz",
      "ReleaseDateTime": "2020-02-24T12:00:00.000Z",
      "FileSizeBytes": 9406177,
      "Frequency": "Daily",
      "ContentMd5": "7dc36fe12422ed48d446366b2a3842f7"
    },
    {
      "PackageDeliveryId": "0x06fe9363d4a16128",
      "UserPackageId": "0x04f21a8d28f59cb1",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "Name": "PHS-2020-02-24-NORMALIZEDLL2-Data-1-of-1.csv.gz",
      "ReleaseDateTime": "2020-02-24T12:00:00.000Z",
      "FileSizeBytes": 3850840,
      "Frequency": "Daily",
      "ContentMd5": "8a07f63c3d4cc2ff98a9bbc0b36bf34c"
    },

This goes on with all the other available packages deliveries. Here is the last part:

    {
      "PackageDeliveryId": "0x06fc020280615bd7",
      "UserPackageId": "0x04f21a8d28f59cb1",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "Name": "PHS-2020-02-16-LEGACYLEVEL2-Data-1-of-1.csv.gz",
      "ReleaseDateTime": "2020-02-16T12:00:00.000Z",
      "FileSizeBytes": 172787,
      "Frequency": "Daily",
      "ContentMd5": "37e807047f11d2a0753694abef0dbc84"
    },
    {
      "PackageDeliveryId": "0x06fbff46bf515bc2",
      "UserPackageId": "0x04f21a8d28f59cb1",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "Name": "PHS-2020-02-16-NORMALIZEDLL2-Report-1-of-1.csv.gz",
      "ReleaseDateTime": "2020-02-16T12:00:00.000Z",
      "FileSizeBytes": 3290,
      "Frequency": "Daily",
      "ContentMd5": "1e03443ab73fe95069d6dd19df55d4b6"
    },
    {
      "PackageDeliveryId": "0x06fc03d505715be4",
      "UserPackageId": "0x04f21a8d28f59cb1",
      "SubscriptionId": "0x0400dc1d24a00cb4",
      "Name": "PHS-2020-02-16-NORMALIZEDLL2-Data-1-of-1.csv.gz",
      "ReleaseDateTime": "2020-02-16T12:00:00.000Z",
      "FileSizeBytes": 230,
      "Frequency": "Daily",
      "ContentMd5": "aea69465f84bad58fa485a7f347afaf3"
    }
  ],
  "@odata.nextlink": "https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackageDeliveryGetUserPackageDeliveriesByPackageId(PackageId='0x04f21a8d28f59cb1')?$skiptoken='MjAyMC0wMi0xNlQwODoxODo1MC4zNjAwMDAwfDF8'"
}

The data might be followed by a nextlink which leads to more available files (older ones).

 

Select the most recent user package deliveries

The results of the previous call include all package deliveries (data files) for a specific UserPackageId. This covers a range of 30 days of data, and all file types.

In this example scenario we decided to select the most recent data set. This is just an example; other workflows can be implemented to fit whatever use case you require. The REST API C# example application described in the Quick Start illustrates other ways of proceeding, like requesting package deliveries by date range, or change tracking to detect new files. It also shows how to manage paging in case the number of results is very large.

We therefore filter the results by date, to keep only the more recent ones. This can be done using either the date in the file name, or the release date time.

Note:

  • Venue by Day data for a specific exchange is made available after the exchange has closed. Depending on the relative geographic location, time of day and time zone of the exchange and the computer where the call is run, the most recent data could be dated of the current or previous day.
  • To detect the most recent data set, one can simply use a string comparison between the package delivery names and a date, starting with today’s date, for the case where data is already available. If this delivers no results then try yesterday’s date.

As an illustration, here is the list of the files names for one day, for exchange PHS. Depending on your data permissions, your list might contain more or less files than this example:

PHS-2020-02-24-LEGACYLEVEL2-Report-1-of-1.csv.gz
PHS-2020-02-24-LEGACYLEVEL2-Data-1-of-1.csv.gz
PHS-2020-02-24-NORMALIZEDLL2-Data-1-of-1.csv.gz
PHS-2020-02-24-NORMALIZEDLL2-Report-1-of-1.csv.gz
PHS-2020-02-24-MARKETPRICE-Data-1-of-1.csv.gz
PHS-2020-02-24-MARKETPRICE-Report-1-of-1.csv.gz
PHS-2020-02-24-NORMALIZEDMP-Report-1-of-1.csv.gz
PHS-2020-02-24-NORMALIZEDMP-Data-1-of-1.csv.gz
PHS-2020-02-24-CORP-Report-1-of-1.csv.gz
PHS-2020-02-24-CORP-Data-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-SEDOL-1-of-1.csv.gz
PHS-2020-02-24-REF-Report-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-CUSIP-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-GICS-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-CUSIP-GICS-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-CUSIP-SEDOL-GICS-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-SEDOL-GICS-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-CUSIP-SEDOL-1-of-1.csv.gz
PHS-2020-02-24-Instruments-GICS-1-of-1.csv.gz
PHS-2020-02-24-Instruments-CUSIP-SEDOL-1-of-1.csv.gz
PHS-2020-02-24-Instruments-1-of-1.csv.gz
PHS-2020-02-24-Instruments-CUSIP-SEDOL-GICS-1-of-1.csv.gz
PHS-2020-02-24-Instruments-SEDOL-1-of-1.csv.gz
PHS-2020-02-24-Instruments-SEDOL-GICS-1-of-1.csv.gz
PHS-2020-02-24-Instruments-CUSIP-GICS-1-of-1.csv.gz
PHS-2020-02-24-Instruments-CUSIP-1-of-1.csv.gz

This filtering operation does not use API calls, it is therefore out of scope for this tutorial.

 

Filter the list based on file type (optional)

The results of the previous step include all package deliveries (data files) for a specific UserPackageId and day, and contain all file types.

File types were described above under section: Package deliveries. Depending on the use case, maybe only a subset of the files might be required. The choice would typically be based on either or both of:

  • The file type

    Formatted files are the preferred choice as they do not require subsequent treatment by the developer; the raw ones are rarely required.
  • Report files

    These deliver additional information on instruments (in)activity, but require additional processing.

To filter on the file type we can simply make a string comparison between the package delivery names and a list of file type names we are interested in.

As an illustration, here is the shorter list of files names, excluding those that contain raw data (MARKETPRICE and LEGACYLEVEL2):

PHS-2020-02-24-NORMALIZEDLL2-Data-1-of-1.csv.gz
PHS-2020-02-24-NORMALIZEDLL2-Report-1-of-1.csv.gz
PHS-2020-02-24-NORMALIZEDMP-Report-1-of-1.csv.gz
PHS-2020-02-24-NORMALIZEDMP-Data-1-of-1.csv.gz
PHS-2020-02-24-CORP-Report-1-of-1.csv.gz
PHS-2020-02-24-CORP-Data-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-SEDOL-1-of-1.csv.gz
PHS-2020-02-24-REF-Report-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-CUSIP-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-GICS-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-CUSIP-GICS-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-CUSIP-SEDOL-GICS-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-SEDOL-GICS-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-1-of-1.csv.gz
PHS-2020-02-24-REF-Data-CUSIP-SEDOL-1-of-1.csv.gz
PHS-2020-02-24-Instruments-GICS-1-of-1.csv.gz
PHS-2020-02-24-Instruments-CUSIP-SEDOL-1-of-1.csv.gz
PHS-2020-02-24-Instruments-1-of-1.csv.gz
PHS-2020-02-24-Instruments-CUSIP-SEDOL-GICS-1-of-1.csv.gz
PHS-2020-02-24-Instruments-SEDOL-1-of-1.csv.gz
PHS-2020-02-24-Instruments-SEDOL-GICS-1-of-1.csv.gz
PHS-2020-02-24-Instruments-CUSIP-GICS-1-of-1.csv.gz
PHS-2020-02-24-Instruments-CUSIP-1-of-1.csv.gz

This filtering operation does not use API calls, it is therefore out of scope for this tutorial.

The important point at this stage of the workflow is to end up with a list of PackageDeliveryId of all the files we want to retrieve.

 

Get the selected user package deliveries - HTTP request

In this last step we retrieve the files using an octet stream, in order to save them to local disk.

This is done one file at a time. The PackageDeliveryId is a parameter set in the URL.

As an example, let us retrieve this file:

{
  "PackageDeliveryId": "0x06fe927a55916120",
  "UserPackageId": "0x04f21a8d28f59cb1",
  "SubscriptionId": "0x0400dc1d24a00cb4",
  "Name": "PHS-2020-02-24-NORMALIZEDMP-Data-1-of-1.csv.gz",
  "ReleaseDateTime": "2020-02-24T12:00:00.000Z",
  "FileSizeBytes": 4687942,
  "Frequency": "Daily",
  "ContentMd5": "e88d29a0541648b237ee45754f397f70"
},

URL:

https://hosted.datascopeapi.reuters.com/RestApi/v1/StandardExtractions/UserPackageDeliveries('0x06fe927a55916120')/$value

Method:          GET

Headers:

Prefer: respond-async
Content-Type:application/octet-stream
Authorization: Token F0ABE9A3FFF2E02E10AE2765ED872C59B8CC3B40EBB61B30E295E71DE31C254B8648DB9434C2DF9299FDC668AA123501F322D99D45C8B93438063C912BC936C7B87062B0CF812138863F5D836A7B31A32DCA67EF07B3B50B2FC4978DF6F76784FDF35FCB523A8430DA93613BC5730CDC310D4D241718F9FC3F2E55465A24957CC287BDEC79046B31AD642606275AEAD76318CB221BD843348E1483670DA13968D8A242AAFCF9E13E23240C905AE46DED9EDCA9BB316B4C5C767B18DB2EA7ADD100817ADF059D01394BC6375BECAF6138C25DBA57577F0061

 

Get the selected user package deliveries - HTTP response

If the token and PackageDeliveryId are valid, this is the response we get:

Status:                        200 OK

Relevant headers:

Note: the content type is different from the other queries, it is text/plain.

Content-Type: text/plain

Body:

Here is the beginning of the response:

#RIC,Domain,Date-Time,GMT Offset,Type,Ex/Cntrb.ID,LOC,Price,Volume,Market VWAP,Buyer ID,Bid Price,Bid Size,No. Buyers,Seller ID,Ask Price,Ask Size,No. Sellers,Qualifiers,Seq. No.,Exch Time,Block Trd,PE Ratio,Yield,Bid Yld,Ask Yld,ISMA Bid Yld,ISMA Ask Yld,Duration,Mod Durtn,BPV,Convexity,Bench Spd,Swp Spd,Asst Swp Spd,Swap Point,UpLim Price,LoLim Price,Theo. Price,Parity,Premium,Bid Imp. Vol,Ask Imp. Vol,Imp. Vol.,Crack,Top,Freight Pr.,Offer,Actual,Prior,Revised,Forecast,Frcst High,Frcst Low,No. Frcts,Date,Bid Tic,Tick Dir.,Open,High,Low,Open Interest,Bench Price,Acc. Volume,Turnover,Mid Price,Original Date,Original Price,Original Volume,Original Seq. No.,Original Exch Time,Trade Price Currency,Unique Trade Identification,Net Change,Original Unique Trade Identification,ISIN,Unique Quote Identification
.PSAL,Market Price,2020-02-24T01:30:01.556889847Z,+8,Trade,,,4306.02,0,,,,,,,,,,,,01:30:00.000000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2020-02-24,,v,4306.02,4306.02,4306.02,,,0,0,,,,,,,,,,,,
.PSAL,Market Price,2020-02-24T01:31:01.437066143Z,+8,Trade,,,4301.31,30748,,,,,,,,,,,,01:31:00.000000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2020-02-24,,v,4306.02,4306.02,4301.31,,,30748250,108829255,,,,,,,,,,,,
.PSAL,Market Price,2020-02-24T01:32:01.468267839Z,+8,Trade,,,4307.05,2999,,,,,,,,,,,,01:32:00.000000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2020-02-24,,^,4306.02,4307.05,4301.31,,,33747085,127181593,,,,,,,,,,,,
.PSAL,Market Price,2020-02-24T01:33:01.468835416Z,+8,Trade,,,4306.68,3158,,,,,,,,,,,,01:33:00.000000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2020-02-24,,v,4306.02,4307.05,4301.31,,,36905265,140414987,,,,,,,,,,,,
.PSAL,Market Price,2020-02-24T01:34:01.545606636Z,+8,Trade,,,4299.06,3285,,,,,,,,,,,,01:34:00.000000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2020-02-24,,v,4306.02,4307.05,4299.06,,,40190990,151749899,,,,,,,,,,,,
.PSAL,Market Price,2020-02-24T01:35:01.240809214Z,+8,Trade,,,4296.98,2606,,,,,,,,,,,,01:35:00.000000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2020-02-24,,v,4306.02,4307.05,4296.98,,,42796885,168932758,,,,,,,,,,,,
.PSAL,Market Price,2020-02-24T01:36:01.333410266Z,+8,Trade,,,4294.44,3294,,,,,,,,,,,,01:36:00.000000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2020-02-24,,v,4306.02,4307.05,4294.44,,,46090455,195649046,,,,,,,,,,,,
.PSAL,Market Price,2020-02-24T01:37:01.513132347Z,+8,Trade,,,4291.83,4642,,,,,,,,,,,,01:37:00.000000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2020-02-24,,v,4306.02,4307.05,4291.83,,,50732185,224475327,,,,,,,,,,,,
.PSAL,Market Price,2020-02-24T01:38:01.454314888Z,+8,Trade,,,4289.12,2430,,,,,,,,,,,,01:38:00.000000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2020-02-24,,v,4306.02,4307.05,4289.12,,,53162115,240115974,,,,,,,,,,,,
.PSAL,Market Price,2020-02-24T01:39:01.497485764Z,+8,Trade,,,4288.29,2250,,,,,,,,,,,,01:39:00.000000000,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,2020-02-24,,v,4306.02,4307.05,4288.29,,,55412685,251305473,,,,,,,,,,,,

Saving the file contents to disk does not use API calls, it is therefore out of scope for this tutorial.

Note: Postman might fail and crash when retrieving very large files. If you want to test this, choose a small file.

 

Conclusions

This tutorial illustrated several API calls in a simple scenario to retrieve the latest TRTH Venue By Day data, for a set of exchanges. The explanations have been kept simple to concentrate on the API functionality and simultaneously achieve a tangible result.

For more information and code snippets, refer to the the API User Guide and the C# example application described in the Quick Start.

Tutorial Group: 
REST API Tutorials