question

Upvotes
Accepted
1 1 3 7

Is there any ways to add multiple selected fids in the raw data extraction code?

https://developers.refinitiv.com/en/api-catalog/refinitiv-tick-history/refinitiv-tick-history-rth-rest-api/tutorials#rest-api-tutorial-8-on-demand-raw-data-extraction

tick-history-rest-api
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.

Upvotes
Accepted
13.7k 26 8 12

@sreedhanya.kavunkara, I just heard that as of 15th October 2018 the new release 12.2 will allow you to select up to 20 FIDs for this extraction, both via the GUI and the REST API. More details are available in the release notes (pages 6-12). Hope this helps.

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.

Thanks @Christiaan. I tried running for those RICs alone and tried only the first few steps, I got error that 'JobId' not found. But the status of the query is 200. I didn't understand why? I can share the code through mail.

Hi @veerapath.rungruengrayubkul, can you please share the code you have used to pull only those two RICs?

I use the ExtractRaw endpoint with the request message provided by Christiaan, but modifying the message to have those two RICs in the instrument list. You will get a response with status 200 containing "JobId" and "Notes".

"InstrumentIdentifiers": [ 
{ "Identifier": "BMEEXPH", "IdentifierType": "Ric" },
{ "Identifier": "MAXPREC-ES", "IdentifierType": "Ric" }
]

Response:

{
    "@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#RawExtractionResults/$entity",
    "JobId": "0x065da4941c1b3016",
    "Notes": [
        "Extraction Services Version...

@sreedhanya.kavunkara,

You got a status 200, with an error ? That is weird.

The possible workflows of an On Demand request, with the expected HTTP status codes (200 or other) responses, and where to find the JobId, are described in REST API tutorial 3. Note that the workflow can vary depending on the extraction time. Does this help ?

If not, and you are still running into difficulties, then please post your code so that I can analyze it.

Hi @Christiaan Meihsl . It is true. I am investigating on this,with the content teams to identify is there any issue with those RICs. I found another issue that the values are present for these RICs only for Saturdays, which shows the Friday's values - only once in a week. I could find the recent values are there for Sept 29th and then for Oct 06th. Ideally every tick should have been captured, am I right? Do I need to change anything in the request body to get all the other days values. I am trying for only 393,394,875,1051 fids with date range Sept 28 to Oct 12th. Please advice me.

Show more comments
Show more comments
Upvote
13.7k 26 8 12

@sreedhanya.kavunkara, the extraction for raw data does not allow to select the fields you want, because it delivers the raw transaction data from the exchange.

But yes, you can filter the output to contain data for a set of FIDs, by adding condition Fids. It is possible to filter on several FIDs, by using a string containing comma separated FID values, as illustrated in this example:

{ "ExtractionRequest": {
    "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
    "IdentifierList": {
      "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
      "InstrumentIdentifiers": [ { "Identifier": "CARR.PA", "IdentifierType": "Ric" }]
    },
    "Condition": {
      "MessageTimeStampIn": "GmtUtc",
      "ReportDateRangeType": "Range",
      "QueryStartDate": "2016-09-29T12:00:00.000Z",
      "QueryEndDate": "2016-09-29T12:10:00.000Z",
      "ExtractBy": "Ric",
      "SortBy": "SingleByRic",
      "DomainCode": "MarketPrice",
      "Fids": "25,31,22,30,5",
      "DisplaySourceRIC": true
    }
  }
}

Here are the first 2 results of this request:

#RIC,Domain,Date-Time,GMT Offset,Type,MsgClass/FID number,UpdateType/Action,FID Name,FID Value,FID Enum String,PE Code,Template Number,Key/Msg Sequence Number,Alias Underlying RIC,Number of FIDs
CARR.PA,Market Price,2016-09-29T10:00:06.765908451Z,+2,Raw,UPDATE,QUOTE,,,,8132,,46432,,5 ,,,,FID,22,,BID,23.3, ,,,,FID,25,,ASK,23.305, ,,,,FID,30,,BIDSIZE,1555, ,,,,FID,31,,ASKSIZE,813, ,,,,FID,5,,TIMACT,10:00:00.000000000,
CARR.PA,Market Price,2016-09-29T10:02:23.848664094Z,+2,Raw,UPDATE,QUOTE,,,,8132,,56496,,5 ,,,,FID,22,,BID,23.31, ,,,,FID,25,,ASK,23.32, ,,,,FID,30,,BIDSIZE,2835, ,,,,FID,31,,ASKSIZE,2822, ,,,,FID,5,,TIMACT,10:02:00.000000000,

The entire list of FIDs with numbers and description can be found in the GUI, in the lower part of the Tick History Raw template creation screen.

I realized in answering this query that my tutorial was misleading, I changed its wording to clarify the fact that you can filter on several FIDs. Thank you for pointing this out :-)

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.

Thanks Christiaan for the answer. It is useful. But I have a concern again here. Please help me to fix it. When I tried this code for a set of RICs, not all the RICs were pulled results (37 out of 723 failed). I tried with 2 RICs which didn't pull the result - 'BMEEXPH' and 'MAXPREC-ES'. Here is the error message - '{'error': {'message': "No HTTP resource was found that matches the request URI'https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractRaw'."}}' . Can you please help me to undestand what is wrong here. I could see that the data is available in EIKON quote page.

@sreedhanya.kavunkara, the error message you get is weird. The URL is correct, but the message says the endpoint does not exist. This might either be a transient error, or an issue in the code.

If you run it again, does it fail again ? If yes, does it fail on the same instruments ?

If it fails repeatedly, could you share your code ? I could look at it and try to determine where the issue lies.

@sreedhanya.kavunkara

I have tried to extract TickHistorryRaw data for the 'BMEEXPH' and 'MAXPREC-ES' RICs and received the following Notes information. It seems that result was not generated because the RICs are lack of 'Distribution Rights'. Please verify the Notes information to confirm the issue.

(RIC,BMEEXPH,EPX)  row suppressed for lack of 'Distribution Rights - Tick History never allowed for PE 4612' permission.
(RIC,MAXPREC-ES,)  row suppressed for lack of 'Distribution Rights - Tick History never allowed for PE 122' permission.

Hi,

I tried the code for a set of RIC starting with '0#' like 0#ABMF.KL, but I am not getting the result, but this is the message - 'All identifiers were invalid. No extraction performed'. I can find the data for those RICs in eikon quote page. Can anyone help to solve this. What is wrong here?

Thanks,

Sree

@sreedhanya.kavunkara,

RICs starting with a # are chain RICs. When you use them in a request the IdentifierType must be set to "ChainRIC", not "Ric":

{ "Identifier": "0#ABMF.KL", "IdentifierType": "ChainRIC" }

The message you received occurs if you incorrectly set "Ric".

Note: making a request for a chain RIC delivers data for the chain RIC, not for its constituents. In most use cases one must first get the constituents of the chain, and then make a data request for the constituents.

Hi

I tried this. And got HTTP status of the response: 400. I added the below condition, and "InstrumentIdentifiers": [{'Identifier': "0#BGRO.KL", 'IdentifierType': 'ChainRIC'}]. Can you please help me what is wrong here.

Sree

Show more comments
Click below to post an Idea Post Idea