question

Upvotes
Accepted
36 1 3 6

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 512.0 KiB each and 1.0 MiB total.

Hello @chris.garvin,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

1 Answer

· Write an 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 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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