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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 1

How to get Futures OHLCV from DataScope Select Rest API in Python3?

I would like to get the following RIC OHLCV using DataScope Select's Rest API in Python3. Could you provide sample code?

RIC : .SPX
DSP : S&P 500 Index - CBOE

pythondss-rest-apidatascope-selectdsspricingfutures
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.

1 Answer

Upvote
Accepted
28.4k 30 11 15

Hello @Hir0fumi,

Let me first explain, it will not be realistic for us to provide exact and specific sample code, to fulfill every custom requirement that our multiple developer members face every day.

But we would like to help you. And our multiple available samples are generic and will help developers with a specific task, and absolutely they can be combined or serve as starting points for custom requirements.

Let me explain how to do what you require:

1. Define HTTP REST request that will fully meet your requirement. I find it the easiest use Postman free tool to do that. This tutorial describes how to obtain and use Postman. You should finish this step with the exact request for futures that you need. For example:

{  
  "ExtractionRequest": {
        "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest",
        "ContentFieldNames": [
            "Close Ask",
            "Close Bid",
            "High",
            "Low",
            "Open Ask",
            "Open Bid"
        ],
        "IdentifierList": {
            "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
            "InstrumentIdentifiers": [
                {
                    "Identifier": "IBM.N",
                    "IdentifierType": "Ric"
                }
            ],
            "ValidationOptions": null,
            "UseUserPreferencesForValidationOptions": false
        },
        "Condition": {
            "MessageTimeStampIn": "GmtUtc",
            "ReportDateRangeType": "Range",
            "QueryStartDate": "2016-11-20T20:18:41.797Z",
            "QueryEndDate": "2016-11-23T20:18:41.797Z",
            "TimebarPersistence": true,
            "DisplaySourceRIC": false
        }
    }
}


2. Once you have your required request finalized, download our Python Examples, and in Intraday request sample, replace the request itself only, with your required request.

3. This approach will land itself to producing any required DSS extraction and processing via Python.

Hope this helps you proceed?


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.