Appears to be a bug in with Refinitiv.Data.Content NuGet package https://www.nuget.org/packages/Refinitiv.Data.Content/
This code doesn’t appear to set POST request body parameters correctly for eventTypes; Refinitiv.Data.Content.HistoricalPricing.EventsDefinition.Params.DefinePostParams(string url)
This means we’re not able to call POST https://api.refinitiv.com/data/historical-pricing/v1/views/events using the Refinitiv.Data.Content NuGet package. If we specify multiple RICS, and event type ‘quote’ it returns this error;
{
"HTTPStatusCode": 400,
"HTTPReason": "Bad Request",
"Contents": {
"error": {
"id": "463a2f6c-0bf9-489b-af96-2cf7a5b495da",
"code": "400",
"message": "Validation error",
"status": "Bad Request",
"errors": [
{
"key": "EventsMultiRicRequestBody",
"reason": "EventsMultiRicRequestBody.eventTypes in body must be of type string"
},
{
"key": "EventsMultiRicRequestBody",
"reason": "EventsMultiRicRequestBody.eventTypes in body should be one of [trade quote]"
}
]
}
}
}
The call we make is based on this example https://github.com/Refinitiv-API-Samples/Example.DataLibrary.DotNet/blob/main/src/2.%20Content/2.1-HistoricalPricing/2.1.02-HistoricalPricing-Events/2.1.02-HistoricalPricing-Events.cs#L31, but with multiple RICs and quote event type
var endTimeLocal = new LocalDateTime(2023, 04, 04, 16, 00, 01)
.InZoneLeniently(DateTimeZoneProviders.Tzdb["Europe/London"]);
var items = new[] { "NDXd2123A2475.U", "NDXPq0523A1900.U", "SPXp212334000.U" };
var events = Events.Definition(items)
.EventTypes(Events.EventType.quote)
.End(endTimeLocal.ToDateTimeUtc())
.Count(1);
var response = events.GetData(); // response.IsSuccess == false here