LSEG Data Library for TypeScript

getData

The getData function is used to send a request to the Delivery Platform (formerly Refinitiv Data Platform) to retrieve the data described in the AddPeriods.Definitions object.

Syntax

definitions.getData(session?: Session)

Parameters

Value Description Data type Optional Default value
session Session object. If it's not passed the default session will be used. Session Yes -

Returned value

ContentResponse object.

Usage

The following example shows how to get added periods for multiple add period definitions:

const addPeriodsDefinition1 = IPA.DatesAndCalendars.AddPeriods.Definition({
    tag: 'My request 1',
    startDate: '2018-01-01',
    period: '6M',
    calendars: ['EMU'],
    dateMovingConvention: IPA.DatesAndCalendars.DateMovingConvention.ModifiedFollowing,
    endOfMonthConvention: IPA.DatesAndCalendars.EndOfMonthConvention.Last,
});

const addPeriodsDefinition2 = IPA.DatesAndCalendars.AddPeriods.Definition({
    tag: 'My request 2',
    startDate: '2014-01-01',
    period: '1Y',
    calendars: ['BAR', 'KOR'],
    dateMovingConvention: IPA.DatesAndCalendars.DateMovingConvention.NextBusinessDay,
    endOfMonthConvention: IPA.DatesAndCalendars.EndOfMonthConvention.Last28,
    holidayOutputs: [
        IPA.DatesAndCalendars.HolidayOutput.Calendars,
        IPA.DatesAndCalendars.HolidayOutput.Countries,
    ],
});

const definitions = IPA.DatesAndCalendars.AddPeriods.Definitions([addPeriodsDefinition1, addPeriodsDefinition2]);

const result = await definitions.getData(session);

console.log(result.data);

None.

67 words (0:21 mins)