b <- list(
ExtractionRequest = list(
odata.type = "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest",
ContentFieldNames = list(
"Trade - Price",
"Trade - Volume",
"Trade - Exchange Time"
),
IdentifierList = list(
odata.type = "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
InstrumentIdentifiers = list(list(
Identifier = 'AAPL.O',
IdentifierType = 'Ric'
))
),
Condition = list(
MessageTimeStampIn = "GmtUtc",
ReportDateRangeType = "Range",
QueryStartDate = "2017-09-29T00:00:00.000Z",
QueryEndDate = "2017-09-29T12:00:00.000Z"
)
)
)
url <- "https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractRaw"
r <- httr::POST(url,add_headers(prefer = "respond-async",Authorization = token),content_type_json(),body = b,encode = "json")
Response [https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractRaw]
Date: 2020-09-10 09:49
Status: 400
Content-Type: application/json; charset=utf-8
Size: 176 B
This is the response, I got for running the above code. I think there is something wrong, not sure what exactly that is. Could someone please help out ?