question

Upvotes
Accepted
1 0 1 2

TickHistoryRawExtractionRequest API query in python

I am trying to run the following API query in python but get the error -

"error":{"message":"Validation Error:\r\n\r\nCannot run a normal extraction for a \"Tick History Raw\" template type.  You must use ExtractRaw instead."}


Can anyone help clarify where I am going wrong? I am able to run a query using - #ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.HistoricalReferenceExtractionRequest, so not sure why TickHistoryRawExtractionRequest doesnt work?


payload = {

"ExtractionRequest": {

"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",

"ContentFieldNames": [

"RIC",

"CUSIP",

"ISIN",

"SEDOL",

"Change Date"

],

"IdentifierList": {

"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",

"InstrumentIdentifiers": [

{ "Identifier": "IBM.N", "IdentifierType": "Ric" }

]

},

"Condition": {

"MessageTimeStampIn": "GmtUtc",

"ReportDateRangeType": "Range",

"QueryStartDate": "2019-10-07T12:00:00.000Z",

"QueryEndDate": "2019-10-09T12:10:00.000Z",

"ExtractBy": "Ric",

"SortBy": "SingleByRic",

"DomainCode": "MarketPrice",

"Fids": "25,22",

"DisplaySourceRIC": True

}

}

}


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

@Aby,

for a Tick History Raw extraction request you need to use the ExtractRaw endpoint. I am guessing you are using the Extract endpoint, which is not supported.

Please refer to the REST API tutorial 8 for more details on this particular extraction.

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
1 0 1 2

Thanks @. When I run the query now I get the following response. Can you tell me where I am going wrong?

{"@odata.context":"https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#RawExtractionResults/$entity","JobId":"0x06d468e36341096c","Notes":["All identifiers were invalid.  No extraction performed."],"IdentifierValidationErrors":[{"Identifier":{"@odata.type":"#ThomsonReuters.Dss.Api.Content.InstrumentIdentifier","Identifier":"IBM.NOI","IdentifierType":"Ric","Source":""},"Message":"Not found"}]}

This is the query I am running.

{

"ExtractionRequest": {

"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",

"IdentifierList": {

"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",

"InstrumentIdentifiers": [

{ "Identifier": "IBM.NOI", "IdentifierType": "Ric" }

]

},

"Condition": {

"MessageTimeStampIn": "GmtUtc",

"ReportDateRangeType": "Range",

"QueryStartDate": "2019-10-07T00:00:00.000Z",

"QueryEndDate": "2019-10-09T00:00:00.000Z",

"ExtractBy": "Ric",

"SortBy": "SingleByRic",

"DomainCode": "MarketPrice",

"Fids": "4338",

"DisplaySourceRIC": True

}

}

}

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
13k 32 12 18

Hello @Aby, The item requested: IBM.NOI is not a valid RIC. I can successfully send your request message with IBM.N and get data:

#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 FIDsIBM.N,Market Price,2019-10-07T11:00:00.810009456Z,-4,Raw,UPDATE,CLOSING_RUN,,,,62,,14558,,1,,,,FID,4338,,IMB_SH,,
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.

Click below to post an Idea Post Idea