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?

Best Answer

  • Christiaan Meihsl
    Answer ✓

    @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.

    image

    After changing those 2 things your query will work.