question

Upvotes
Accepted
50 11 20 28

RAW data download

Hi, we wanted to download RAW(TAS,MD etc) data for given columns only. How can we achieve it? Please provide an example while providing solution.

tick-history-rest-apinda-raw
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @Ayan

Do you mean you wish to get specific data fields only? i.e. only last trade and trade time?

If it is inaccurate, some clarifications would help.

Yes, we want to get only specific data fileds that we will mention while requesting the data.

1 Answer

· Write an Answer
Upvotes
Accepted
4.4k 10 6 9

Hi @Ayan

First I would like to point out that there are four Tick history templates:

  1. TickHistoryRaw
  2. TickHistoryMarketDepth
  3. TickHistoryTimeAndSales
  4. TickHistoryIntraday

For TimeAndSales, Intraday, and MarketDepth, you can specify multiple data fields in the template and the result data will have your specified fields only.

But for Raw, you can either specify ONE field or not specify field at all and get all fields. This is Raw template limitation.

Moreover, you have to use schedule data extraction as you cannot use custom temple in on-demand data extraction.

To specify the field for a raw template so, you have to create new a raw template and add "Fids" condition. The following example creates a Raw template with "TRDPRC_1" field filter :

curl -X POST \
  https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/TickHistoryRawReportTemplates \
  -H 'authorization: <Your Token>' \
  -H 'content-type: application/json' \
  -H 'prefer: respond-async' \
  -d '{
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.TickHistoryRawReportTemplate",
    "ShowColumnHeaders": false,
    "CompressionType": "GZip",
    "Name": "MyReportTemplate",
    "TemplateTypeCode": "THR",
    "Headers": [
         
    ],
    "Trailers": [
         
    ],
    "ContentFields": [
         
    ],
    "Condition": {
        "ReportDateRangeType": "Delta",
        "DaysAgo": 1,
        "Fids": "6",
        "DisplaySourceRIC": true
    }
}'

Once you have a Raw template with field filter, you can follow remaining steps of Schedule Extraction. REST API tutorial 12 shows the entire workflow for a scheduled data extraction.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.