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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 2

How to get minute wise data of past 3 years of SPX

I have been exploring DSS for the past few days. I've skimmed through the REST API tutorials which use postman and have so far been successful. I am currently trying to write a python script to extract minute-wise data of the past 3 years of SPX futures and options and with the help of Article.RDP.DSS.RKD.Python.GenerateCodeUsingPostman/dss-generate-python-code-using-postman.ipynb at main · LSEG-API-Samples/Article.RDP.DSS.RKD.Python.GenerateCodeUsingPostman · GitHub and Getting a list of all RIC codes for Equity Index Options - Forum | Refinitiv Developer Community , I've managed to get some data but it is not minutewise and not that comprehensive.
Any help would be greatly appreciated.

python#technologydss-rest-apiprice-history
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.

@vmaharshi

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS

Upvote
Accepted
79.3k 253 52 74

@vmaharshi

Thank you for reaching out to us.

As far as I know, the DSS is unable to provide intraday historical data. You need to use Tick History product to extract intraday historical data.

The Tick History has the TickHistoryIntradaySummariesExtractionRequest extraction which summarizes market data into discrete time series intervals ranging from one second to one hour. You can refer to the REST API Tutorial 6: On Demand intraday bars extraction tutorial for more information.


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.

I have implemented this, and it is returning an empty string when retrieving the data. I suspect I might have used the wrong headers. so here is a code snippet of the same.

retrieve_data_headers = {
  "Prefer": "respond-async",
  "Content-Type": "Accept-Encoding: gzip, deflate",
  "Authorization": f"Token {dss_token_response_json['value']}"
}
Upvote
79.3k 253 52 74

@vmaharshi

To download the content, the headers look like this:

1697003787835.png

It uses with the RawExtractionResults endpoint.

You can check the Notes when the extraction is completed.

For example, I don't have permission to access the .SPX RIC.

1697003909102.png



1697003787835.png (50.4 KiB)
1697003909102.png (104.8 KiB)
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.

Thank you so much @Jirapongse for your timely response. I have so far been able to extract data of SPY ETF using "SPY" as the ric. However, when I try to use "0#SPY*.U" as the ric for SPY options, I get an "invalid identifier" error. Any help regarding this would be greatly appreciated.

@vmaharshi

0#SPY*.U is a chain RIC so you need to use this:

"IdentifierList": {
      "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",  
      "InstrumentIdentifiers": [{
        "Identifier": "0#SPY*.U",
        "IdentifierType": "ChainRIC"
      }],

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.