question

Upvotes
Accepted
36 1 2 4

exception for property InstrumentIdentifiers in TRTH request reponse

This is something I had working a few weeks back. Using the json string

{"ExtractionRequest":{"@odata.type":"#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryIntradaySummariesExtractionRequest","ContentFieldNames":["Open","High","Low","Last","Volume"],"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":"2017-08-17T00:00:00.000Z","QueryEndDate":"2017-08-18T00:00:00.000Z","SummaryInterval":"10Minute","TimebarPersistence":true,"DisplaySourceRIC":true}}}

I'm getting

message: 'Malformed request payload: Invalid cast exception for property InstrumentIdentifiers: Unable to cast object of type 'ThomsonReuters.Dss.Api.Content.InstrumentIdentifier' to type 'System.Collections.Generic.List`1[ThomsonReuters.Dss.Api.Content.InstrumentIdentifier]'.'

Can someone provide more details on this error?

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.

1 Answer

Upvotes
Accepted
13.7k 26 8 12

@chris.garvin, there are 2 issues in the request.

The instrument identifiers must be between square brackets:

"InstrumentIdentifiers":[{"Identifier":"IBM.N","IdentifierType":"Ric"}],

The value "10Minute" is invalid for "SummaryInterval". Here is the valid one:

"SummaryInterval":"TenMinutes",

For all valid values, go to the RESP API Reference tree, find ExtractRaw, and select TickHistoryIntradaySummariesExtractionRequest in the first parameter. After the screen refresh, scroll down and open the dropdown next to parameter SummaryInterval.

After changing those 2 things your query will work.


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