Is there any ways to add multiple selected fids in the raw data extraction code?
Best Answer
-
@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.
0
Answers
-
@sreedhanya.kavunkara1, 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 :-)
0 -
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.
0 -
@sreedhanya.kavunkara1, 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.
0 -
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.0 -
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?
0 -
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...0 -
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.
0 -
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.
0 -
@sreedhanya.kavunkara, in an extraction for raw data, everything is captured, you are right. But if you filter on FIDs, the extraction request will only deliver updates to the set of FIDs you filtered on. You might want to try an extraction without any FID filter, just to see what else is delivered for the days you currently miss, maybe your filter is incomplete ?
That said, bear in mind that how frequently data is published (and in which FIDs) depends on the data venue (exchange or provider).
And yes, as this is a technical forum, it is a good idea to contact the content team for data queries.
0 -
I just wanted to confirm that the feed to this part of API is not refreshed weekly one day, or flown only on one day in a week, as there is only data for one day in a week in the API. If any such conditions exist in the back end please let me know. The fids for which I pulled data, there are values every day excluding the weekends, and I could see the values on NDA timeseries also. So ideally there should be at least 1 value every week day , which is not the case here.
0 -
@sreedhanya.kavunkara, there are no such conditions in the backend. The data venues deliver data to the servers, the servers store them, and the API is just one of the means of accessing that data (the GUI being the other). The API is not treated differently from the GUI. All venues are handled similarly. There are no differentiated treatments (weekly refreshes or otherwise).
You say there is daily data on those FIDs. How did you determine that ? What are you comparing to the API ? Please explain exactly what you are doing, so I can try to reproduce and see the difference.
0 -
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
0 -
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.
0 -
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
0 -
Can you use double quote(") instead or copy the following line? The 400 error normally indicate error in request message.
"InstrumentIdentifiers": [{"Identifier": "0#BGRO.KL", "IdentifierType": "ChainRIC"}]
0 -
Hi,
I copy pasted the above code and tried, same error. 400.
0 -
Can you please share the entire request message?
0 -
here it is. I tried running with and without this clause -"ExtractBy": "ChainRIC"
0 -
I have tried to rewrite the code from the screenshot and cannot replicate the issue. Can you try my code in attachment?test-code.txt
Anyway, to verify the issue, I suggest you add the code to log payload of the 400 status response. The payload normally provide cause of error. Below is the example.
print ("HTTP status of the response: " + str(r2.status_code) + " , text:" + r2.text)
Could you also confirm your Python version? It might be related to this issue regarding "Error 400 malformed request payload".
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 688 Datastream
- 1.4K DSS
- 620 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 254 ETA
- 557 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 276 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 663 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 229 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛