Hello,
We have a Tick History client trying to extract data using Relative query but they get an error message and need your help to fix the code.
{
"@odata.type": "#DataScope.Select.Api.Extractions.ReportTemplates.TickHistoryTimeAndSalesReportTemplate",
"Name": "Test Report",
"ContentFields": [
{
"FieldName": "Quote - Ask Price",
"Format": null
},
{
"FieldName": "Quote - Ask Size",
"Format": null
}
],
"Condition": {
"MessageTimeStampIn": "GmtUtc",
"ApplyCorrectionsAndCancellations": true,
"ReportDateRangeType": "Relative",
"RelativeStartDaysAgo": 1,
"RelativeEndDaysAgo": 0,
"RelativeStartTime": "10:00:00.000",
"RelativeEndTime": "23:59:59.999",
"DateRangeTimeZone": "Local Exchange Time Zone",
"DisplaySourceRIC": false
}
}
And when I do this I get back a 201 status code indicating it worked, but if I then query the report that I just created (via /RestApi/v1/Extractions/ReportTemplateGetByName), the returned condition looks like this:
{
"@odata.context": "https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#ReportTemplates/DataScope.Select.Api.Extractions.ReportTemplates.TickHistoryTimeAndSalesReportTemplate/$entity",
"@odata.type": "#DataScope.Select.Api.Extractions.ReportTemplates.TickHistoryTimeAndSalesReportTemplate",
"ReportTemplateId": "0x07c951e55cdd4f12",
"ShowColumnHeaders": true,
"CompressionType": "GZip",
"CreateDate": "2021-11-15T10:33:24.006Z",
"LastChangedDate": "2021-11-15T10:33:24.006Z",
"Name": "Test Report",
"OutputFormat": "CommaSeparatedValues",
"ReportFieldCount": 2,
"Delimiter": "None",
"DeliveryType": "None",
"Destination": "",
"TemplateTypeCode": "THT",
"Headers": [],
"Trailers": [],
"ContentFields": [
{
"FieldName": "Quote - Ask Price",
"Justification": "Center",
"Label": "",
"WidthStyle": "VariableWidth",
"Format": {
"@odata.type": "#DataScope.Select.Api.Extractions.ReportTemplates.ContentFieldNumberFormat",
"DecimalPlaces": 9,
"DecimalSeparator": "Period",
"IntegerPlaces": 18,
"UseLeadingZero": false,
"NegativeSignPosition": "Before",
"ThousandSeparator": "Comma",
"UseThousandSeparator": true,
"UseTrailingZero": false
}
},
{
"FieldName": "Quote - Ask Size",
"Justification": "Center",
"Label": "",
"WidthStyle": "VariableWidth",
"Format": {
"@odata.type": "#DataScope.Select.Api.Extractions.ReportTemplates.ContentFieldNumberFormat",
"DecimalPlaces": 9,
"DecimalSeparator": "Period",
"IntegerPlaces": 18,
"UseLeadingZero": false,
"NegativeSignPosition": "Before",
"ThousandSeparator": "Comma",
"UseThousandSeparator": true,
"UseTrailingZero": false
}
}
],
"Condition": {
"SortBy": "SingleByRic",
"MessageTimeStampIn": "LocalExchangeTime",
"TimeRangeMode": "",
"ApplyCorrectionsAndCancellations": false,
"ReportDateRangeType": "NoRange",
"Preview": "None",
"ExtractBy": "Ric",
"DisplaySourceRIC": false
}
}