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 FxCross.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 'EURGBP' fxCrossCode:

const definition = IPA.FinancialContracts.FxCross.Definition({
    fxCrossCode: 'EURGBP',
    fxCrossType: IPA.FinancialContracts.FxCross.FxCrossType.FxSwap,
    legs: [
        {
            legTag: 'received',
            fxLegType: IPA.FinancialContracts.FxCross.FxCrossLegType.SwapFar,
            dealAmount: 1000000,
            tenor: '6M',
        },
        {
            legTag: 'paid',
            fxLegType: IPA.FinancialContracts.FxCross.FxCrossLegType.SwapNear,
            dealCcyBuySell: IPA.FinancialContracts.FxCross.BuySell.Sell,
            dealAmount: 1000000,
            tenor: '1M',
        },
    ],
    pricingParameters: { priceSide: IPA.FinancialContracts.FxCross.PriceSide.Bid },
});

const result = await definition.getData();

console.log(result.data);

None.

64 words (0:20 mins)