For a deeper look into our DataScope Select SOAP API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
7 1 1 3

Retrieving Tick History Time and Sales & Raw data DSS reports via API

I am subscribing to Tick History data in DataScope Select. I've set up some instrument list and report templates. (Tick History Time and Sales and Tick History Raw) templates.

I was able to run these reports and download some data via DSS web GUI. The process is very manual and prone to errors (if I accidentally selected the wrong field, clicked the wrong timezone etc). I'd like to run these reports via REST API using Python.

I came across other people's Q&A in the forum. It listed "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest" along with same specific condition arguments.

However I searched through the Developer Community and couldn't find reference for these Tick History data extracts. Can you please point me to the relevant documentation and some example code?

I tried posting TickHistoryTimeAndSalesExtractionRequest requests. I wrapped the argument lists and posted the request. However I'm getting generic 404 error: requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractWithNotes

json={
  
  
"ExtractionRequest": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest","ContentFieldNames": content_field_names,"IdentifierList": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList","InstrumentIdentifiers": instrument_identifiers
},"Condition": condition}}
content_field_names=[
    "Trade - Date",
    "Trade - Exchange Time",
    "Trade - High",
    "Trade - Low",
    "Trade - Open",
    "Trade - Open Interest",
    "Trade - Orderbook VWAP",
    "Trade - Price",
    "Trade - Qualifiers",
    "Trade - Total Volume",
    "Trade - Turnover",
    "Trade - Volatility",
    "Trade - Volume",
],
instrument_identifiers=[
    {"Identifier": "Gc1", "IdentifierType": "Ric"},
],
condition={
    "MessageTimeStampIn": "",
    "ReportDateRangeType": "Range",
    "QueryStartDate": "2019-01-03T23:45:00.000Z",
    "QueryEndDate": "2019-01-16T20:30:00.000Z",
    "DisplaySourceRIC": True
}

regards

dss-rest-apidatascope-selectdsstick-history-rest-apidata
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
11.3k 25 8 13

Hi @nelson.lam,

You can find more information about the extractions in the following tutorials

- TickHistoryTimeAndSalesExtraction

- TickHistoryRawExtraction

The endpoint used for these extractions needs to be ExtractRaw.

With regard to the 404 error, it seems that your application cannot access the DSS server. Is the application behind a proxy?

icon clock
10 |1500

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

Hi Veerapath,

I was able to run Extractions.ReportTemplates.ReportTemplateTypes'TickHistoryTimeAndSales' so I believe I can get to DSS server.

Thanks for pointing out the corresponding tutorials. I missed them completely before. Reading through the tutorial I think I need to use ExtractRaw with Post method. I'll give that a try

Click below to post an Idea Post Idea