LSEG Data Library for .NET

Events.Definition object

This object defines the request definition used to retrieve Historical pricing events data.

Syntax

Events.Definition()

Events.Definition(params string[] items)

Events.Definition(IEnumerable<string> items)

Parameters

Value Description Optional Default value
items Single instrument, multiple instruments or list of instruments No -

You can set one or more universes when calling the Definition() method.
Another way of specifying the universe is using the Universe() method in continuation of the Definition() method.
For a request to be valid, at least one universe is required.

EventsDefinition.RequestParams properties

Value Description Data type Optional Default value
Universe The entity universe e.g. RIC name string or string[] No -
Fields List of fields to return list Yes -
EventTypes A list of event types to apply string[] Yes -
StartDate Start time for the events query string Yes -
EndDate End time for the events query string Yes -
Adjustments A list of adjustment types to apply string[] Yes -
MaxCount The maximum number of rows to return number Yes -
Sessions The list of market session classification string[] Yes -
Qos Quality of Service (#sections/content-layer/historical-pricing/qos-types.md) to apply enum Yes -

When QoS is not specified, the default is real-time data retrieval, unless the universe name contains a "/", indicating delayed QoS

Returned value

EventsDefinition object.

Usage

The following example demonstrates how to create a historical pricing events definition object for LSEG.L which retrieves the 20 most recent events.

using LSEG.Data.Content.HistoricalPricing;

var definition = Events.Definition('LSEG.L');
`

The following example demonstrates how to get the last 3 historical pricing data rows for VOD.L and truncate the data to retrieve only several specific fields:

var definition = Events.Definition().Universe("VOD.L")
                                    .Count(3)
                                    .Fields("DATE_TIME", "EVENT_TYPE", "BID", "ASK", "ASKSIZE");

var response = await definition.getData();

The following example demonstrates how to get the last five historical pricing data rows for VOD.L, specifying the event type and adjustment type

var definition = Events.Definition("VOD.L")
                       .EventTypes(Events.EventType.trade)
                       .Adjustments(Events.Adjustments.exchangeCorrection)
                       .GetData();

var response = await definition.getData();