HistoricalPricing.Events.Definition
Summary
This methods are responsible for retrieving a HistoricalPricing.Events data.
Methods
Definition(universe: string, fields?: string[])
Allows you to create a short definition for the Historical Pricing content object.
Parameters:
Name | Is Optional | Default Value | Type | Description |
---|---|---|---|---|
universe | No | - | string | Single instruments name (e.g. RIC name) |
fiends | Yes | - | string [] | A list of additinal fields that will be returned in the response |
Returned value: a Definition object
Definition(params: HistoricalPricing.Events.Params)
Allows you to create a full definition for the Historical Pricing content object.
HistoricalPricing.Events.Params properties:
Property | Is Optional | Default Value | Type | Description |
---|---|---|---|---|
universe | No | - | string | The entity universe e.g. RIC name |
eventTypes | Yes | - | enum | The list of market events |
start | Yes | - | string | The start date and timestamp of the query in ISO8601 with UTC only |
end | Yes | - | string | The end date and timestamp of the query in ISO8601 with UTC only |
adjustments | Yes | - | enum | The list of adjustment types |
count | Yes | - | number | The maximum number of data returned. Values range: 1 - 10000 |
fields | Yes | - | string [] | The list of fields that are to be returned in the response |
sessions | Yes | - | SessionType[] | The list of market session classification |
extendedParams | Yes | - | {[key: string]: any} | Specifies the parameters that will be merged with the request |
Returned value: a Definition object
getData(session: Session)
Sends a request to the data platform to retrieve conversion results described by the Definition object.
Parameter:
Name | Is Optional | Default Value | Type | Description |
---|---|---|---|---|
session | No | - | Session | Session instance |
Returned value: a ContentResponse
Example of usage
const definition = HistoricalPricing.Events.Definition('IBM');
const events = await definition.getData(session);
const tradeDefinition = await HistoricalPricing.Events.Definition({
universe: 'IBM',
eventTypes: ['trade']
});
const tradeEvents = await tradeDefinition.getData(session);