Discover Refinitiv
MyRefinitiv Refinitiv Perspectives Careers
Created with Sketch.
All APIs Questions & Answers  Register |  Login
Ask a question
  • Questions
  • Tags
  • Badges
  • Unanswered
Search:
  • Home /
  • TRTH /
avatar image
REFINITIV
Question by vinaya · Oct 24, 2018 at 07:16 AM · tick-history-rest-apion-demand-extraction

Can TRTHv2 API perform multiple extraction request based on Input parameter?

we have two users who have a unique requirement :

  • They have a dynamic list of instruments (instruments covers globally) along placement/execution date and time, each instrument will have different date and time and would be for a different market.
  • They just want to extract just the quote BID/ASK/MID or Trade price for that given instrument for that specific trade date and time.

SM_SEC_TYPE EXECUTION_TIME TRD_TRADE_DATE DESC_INSTMT SEC_DESC1 RED_CODE SEC_DESC2 CUSIP SEDOL ISIN TBILL 08:19.0 01/08/2018 TREASURY BILL TREASURY BILL NULL NULL 912796NV7 BD5YGX2 US912796NV77 TBILL 55:04.0 11/09/2018 TREASURY BILL TREASURY BILL NULL NULL 912796NV7 BD5YGX2 US912796NV77 TBILL 44:51.0 11/09/2018 TREASURY BILL TREASURY BILL NULL NULL 912796NV7 BD5YGX2 US912796NV77 TBILL 08:21.0 01/08/2018 TREASURY BILL TREASURY BILL NULL NULL 912796PU7 BFX74C2 US912796PU76

Can this be extracted using Rest API ?

People who like this

0 Show 0
Comment
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

4 Replies

  • Sort: 
avatar image
REFINITIV
Best Answer
Answer by Christiaan Meihsl · Oct 24, 2018 at 07:45 AM

@vinaya.shetty,

In a nutshell

As I see, what you seek is 2 things:

  • A multi instrument request, but not all instruments in the same time range. This is possible.
  • A request for a point in time. This does not exist.

In more detail

There is no API call in TRTH for extracting a single price for a specific point in time, be it for one or more instruments.

It is possible to make a query (for this use case it would be a Tick History Time and Sales) for multiple instruments, each with its own date/time range. It is not possible to specify a point in time; it must be a range (i.e. use a start and end time). This is described on page 6 of the TRTH 12.1 Release notes.

Here is a sample query illustrating the required syntax:

{
  "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
    "ContentFieldNames": [ "Quote - Bid Size", "Quote - Bid Price", "Quote - Ask Size", "Quote - Ask Price" ],
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",  
      "InstrumentIdentifiers": [
        { "@odata.type": "#ThomsonReuters.Dss.Api.Content.HistoricalInstrumentIdentifier",
          "Identifier": "VOD.L", "IdentifierType": "Ric",
          "RangeStart": "2018-10-25T10:08:53.000Z", "RangeEnd": "2018-10-25T10:08:54.000Z" },
        { "@odata.type": "#ThomsonReuters.Dss.Api.Content.HistoricalInstrumentIdentifier",
          "Identifier": "CARR.PA", "IdentifierType": "Ric",
          "RangeStart": "2018-10-26T10:09:52.000Z", "RangeEnd": "2018-10-26T10:09:55.000Z" },
        { "@odata.type": "#ThomsonReuters.Dss.Api.Content.HistoricalInstrumentIdentifier",
          "Identifier": "ALVG.DE", "IdentifierType": "Ric",
          "RangeStart": "2018-10-24T14:21:56.000Z", "RangeEnd": "2018-10-24T14:21:57.000Z" }
      ],
      "ValidationOptions": { "AllowHistoricalInstruments": true },
      "UseUserPreferencesForValidationOptions" : false
    },
    "Condition": {
      "MessageTimeStampIn": "LocalExchangeTime",
      "TimeRangeMode": "Inclusive",
      "ApplyCorrectionsAndCancellations": false,
      "ReportDateRangeType": "PerIdentifier",
      "DisplaySourceRIC": true
    }
  }
}

Response:

#RIC,Alias Underlying RIC,Domain,Date-Time,Type,Bid Price,Bid Size,Ask Price,Ask Size
ALVG.DE,,Market Price,2018-10-24T16:21:56.875440171+02,Quote,184.42,75,184.48,333
ALVG.DE,,Market Price,2018-10-24T16:21:56.875440171+02,Quote,184.42,176,184.48,333
ALVG.DE,,Market Price,2018-10-24T16:21:56.999746071+02,Quote,184.42,226,184.48,333
VOD.L,,Market Price,2018-10-25T11:08:53.208974278+01,Quote,145.9,8122,145.94,2143

Note: the extraction will only return the data available in the specified range. If the range is very short or the instrument illiquid, the result set might be empty (as is the case for CARR.PA in the above example). A trade off must therefore be found between the range size (the larger, the greater the probability of receiving a result) and the volume of data you must treat after retrieval, taking instrument volatility into account.

Consequence: you must make your own algorithm and code to select from the results the data closest to the point in time you are interested in.

Important caveat: this feature is currently in EAP (Early Access Program). If you are not entitled to it, you will receive an error message: "Not authorized to perform extraction with ReportDateRangeType set to PerIdentifer.". If you are interested in this feature, contact your account manager.

Comment

People who like this

0 Show 1 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Christiaan Meihsl ♦♦ · Oct 31, 2018 at 05:31 AM 0
Share

31 Oct: reformatted and updated answer.

avatar image
REFINITIV
Answer by Beera.Rajesh · Oct 26, 2018 at 09:29 AM

Hi @Christiaan Meihsl, I have gone through the details on Release Notes and arrived at below Time and Sales code for Report on Multiple Instruments, With a Different Date Range for Each

{ "ExtractionRequest": {
 "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
 "ContentFieldNames": [
   "Quote - Bid Size", "Quote - Bid Price", "Quote - Ask Size", "Quote - Ask Price"
 ],
 "IdentifierList": {
  "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
  "InstrumentIdentifiers": [
   { "Identifier": "VOD.L", "IdentifierType": "Ric",
   "ValidationOptions": { "AllowHistoricalInstruments": true },
   "UseUserPreferencesForValidationOptions" : false,
   "Condition": {
    "MessageTimeStampIn" : "LocalExchangeTime",
    "TimeRangeMode": "Inclusive",
    "ReportDateRangeType": "PerIdentifier",
    "RangeStart": "2018-10-25T10:00:00.000",
    "RangeEnd": "2018-10-25T15:00:00.000",
    "DateRangeTimeZone" : "Local Exchange Time Zone"
   },
   { "Identifier": "AAPL.O", "IdentifierType": "Ric"
   "ValidationOptions": { "AllowHistoricalInstruments": true },
   "UseUserPreferencesForValidationOptions" : false }},
   "Condition": {
    "MessageTimeStampIn" : "LocalExchangeTime",
    "TimeRangeMode": "Inclusive",
    "ReportDateRangeType": "PerIdentifier",
    "RangeStart": "2018-09-25T10:00:00.000",
    "RangeEnd": "2018-09-25T15:00:00.000",
    "DateRangeTimeZone" : "Local Exchange Time Zone"
  }
 }
}

But I am receiving a bad string,

Comment

People who like this

0 Show 2 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Christiaan Meihsl ♦♦ · Oct 26, 2018 at 10:46 AM 0
Share

@Beera.Rajesh,

there are some issues with the curly brackets in the code above, and as far as I understand it RangeStart and RangeEnd should be just after the IdentifierType. Also, I believe there should be only one Condition, ValidationOptions and UseUserPreferencesForValidationOptions for the entire query (not one per instrument).

That said, I tried it now and ran into a Malformed request payload error.

I escalated this to find out exactly what syntax is required, and will come back once this has been clarified.

avatar image
REFINITIV
Christiaan Meihsl ♦♦ · Oct 30, 2018 at 05:32 AM 0
Share

@Beera.Rajesh, I have just edited my answer to include:

  • a sample query with the appropriate syntax,
  • the error message you receive if you are not entitled to this EAP feature
avatar image
REFINITIV
Answer by Beera.Rajesh · Nov 30, 2020 at 01:48 PM

@Christiaan Meihsl @zoya.farberov May I know if the ReportDateRangeType set to PerIdentifer feature is live now? If not may I know when are we targetting to push this to PROD?

I have tested this now and observed the same error message:

{

"error": {

"message": "Not authorized to perform extraction with ReportDateRangeType set to PerIdentifer."

}

}

Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

avatar image
REFINITIV
Answer by zoya faberov · Nov 30, 2020 at 11:22 PM

Hello @Beera.Rajesh,

Please see current reference for TickHistoryTimeAndSalesExtractionRequest,

Condition remains per Request, not per InstrumentIdentifier:

Do not believe PerIdentifier is implemented in the way that you suggest. I also do not see it in Summary as part of "Possible Values".

Personally, I think the currently implemented submitting different date ranges and separate requests is cleaner, as dates in result alight, and less error prone.

From the internal RTH 2021 plans, I do not see it as planned.

Therefore, I would continue requesting different date ranges as separate requests.

---

As questions with accepted correct answers have low visibility for community members and are not actively monitored by moderators, I would suggest in the future to ask new questions that are related to them as separate new questions, and include the link to the original answered question within the new question.

Hope this helps


tandscondition.gif (111.1 KiB)
Comment

People who like this

0 Show 0 · Share
10 |1500 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

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

Watch this question

Add to watch list
Add to your watch list to receive emailed updates for this question. Too many emails? Change your settings >
13 People are following this question.

Related Questions

Cannot retreive RIC list

REST API permission error

Do we need always three HTTP requests to download a file after the initial request ?

Working R examples for Eikon with Lipper data

Can't get the request validate from Reuters using trth on demand extraction for corporate actions

  • Copyright
  • Cookie Policy
  • Privacy Statement
  • Terms of Use
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Alpha
  • App Studio
  • Block Chain
  • Bot Platform
  • Connected Risk APIs
  • DSS
  • Data Fusion
  • Data Model Discovery
  • Datastream
  • Eikon COM
  • Eikon Data APIs
  • Electronic Trading
    • Generic FIX
    • Local Bank Node API
    • Trading API
  • Elektron
    • EMA
    • ETA
    • WebSocket API
  • Intelligent Tagging
  • Legal One
  • Messenger Bot
  • Messenger Side by Side
  • ONESOURCE
    • Indirect Tax
  • Open Calais
  • Open PermID
    • Entity Search
  • Org ID
  • PAM
    • PAM - Logging
  • ProView
  • ProView Internal
  • Product Insight
  • Project Tracking
  • RDMS
  • Refinitiv Data Platform
    • Refinitiv Data Platform Libraries
  • Rose's Space
  • Screening
    • Qual-ID API
    • Screening Deployed
    • Screening Online
    • World-Check One
    • World-Check One Zero Footprint
  • Side by Side Integration API
  • TR Knowledge Graph
  • TREP APIs
    • CAT
    • DACS Station
    • Open DACS
    • RFA
    • UPA
  • TREP Infrastructure
  • TRKD
  • TRTH
  • Thomson One Smart
  • Transactions
    • REDI API
  • Velocity Analytics
  • Wealth Management Web Services
  • Workspace SDK
    • Element Framework
    • Grid
  • World-Check Data File
  • 中文论坛
  • Explore
  • Tags
  • Questions
  • Badges