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 by the Repo.Definition object.

Syntax

definition.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 data for 'US1YT=RR' instrumentCode:


const repoUnderlyingContract = IPA.FinancialContracts.Repo.RepoUnderlyingContract({
    instrumentCode: 'US1YT=RR',
    paymentBusinessDayConvention: IPA.FinancialContracts.Repo.BusinessDayConvention.NextBusinessDay,
    pricingParameters: {
        repoParameters: {
            initialMarginPercent: 50,
        },
    },
});

const definition = IPA.FinancialContracts.Repo.Definition({
    startDate: '2020-08-17T00:00:00Z',
    endDate: '2020-08-22T00:00:00Z',
    underlyingInstruments: [repoUnderlyingContract],
    pricingParameters: {
        marketDataDate: '2020-08-19T00:00:00Z',
    },
    outputs: [IPA.FinancialContracts.Repo.Output.Data, IPA.FinancialContracts.Repo.Output.Headers],
});

const result = await bondDefinition.getData();

console.log(result.data);

None.

64 words (0:20 mins)