For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 1 2 5

TickHistoryTimeAndSalesExtractionRequest" - Cannot parse request

Can you please tell me what's wrong with this message. I get a parsing error when I submit this.

{
"@odata.type":"#ThomsonReuters.Dss.Api.Extractions.ReportTemplates.TickHistoryTimeAndSalesExtractionRequest",
"ContentFieldNames":
[
"Correction - Ask Price",
"Correction - Bid Price"
],
"IdentifierList":{"@odata.type":"#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers":[{"Identifier":"PSN.L","IdentifierType":"Ric"}],
"ValidationOptions":{"AllowOpenAccessInstruments":true,"AllowHistoricalInstruments":true},
"UseUserPreferencesForValidationOptions":true},
"Condition":{
"MessageTimeStampIn":"GmtUtc",
"ApplyCorrectionsAndCancellations":true,
"ReportDateRangeType":"Delta",
"QueryStartDate":"2018-01-29T00:00:00.000Z",
"QueryEndDate":"2018-01-29T00:01:00.000Z",
"Preview":"Content",
"ExtractBy":"Entity",
"DisplaySourceRIC":true}
}


dss-rest-apidatascope-selectdss
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.

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

Hello @william.a.maguire

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

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
426 2 4 4

Hi @william.a.maguire

There are two errors in the request body:

  1. "ValidationOptions" and "UseUserPreferencesForValidationOptions" cannot not be used in the same time. Remove the later one should work.
  2. If "QueryStartDate" and QueryStopDate" are set, the ReportDateRangeTypeshould be "Range", not "Delta". If you must use "delta" as the range type then don't use QueryStartDate and QueryStoDate, use "DatesAgo" parameter instead.

Here is THE MODIFIED request body I tested and worked. Please note I used onDemand extraction instead of report template extraction as in your original request :

{ 
"ExtractionRequest": {
	"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
	"ContentFieldNames": [
		"Correction - Ask Price",
		"Correction - Bid Price" ],
	"IdentifierList":{
		"@odata.type":"#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
	"InstrumentIdentifiers":[{
		"Identifier":"PSN.L","IdentifierType":"Ric"
	}],
	"ValidationOptions":{
		"AllowOpenAccessInstruments":true,
		"AllowHistoricalInstruments":true}
	},
	"Condition":{
		"MessageTimeStampIn":"GmtUtc",
		"ApplyCorrectionsAndCancellations":true,
		"ReportDateRangeType":"Range",
		"QueryStartDate":"2018-01-29T00:00:00.000Z",
		"QueryEndDate":"2018-01-29T00:01:00.000Z",
		"Preview":"Content",
		"ExtractBy":"Entity",
		"DisplaySourceRIC":true
	}
    }
}
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.