LSEG Data Library for TypeScript

HistoricalPricing.Metadata.Global.Definition methods

getData

The getData function is used to send a request to the Delivery Platform (formerly Refinitiv Data Platform) to retrieve the global historical pricing metdata described by HistoricalPricing.Metadata.Global objects.

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 examples demonstrate how to retrieve MultipleFieldMapping and TimeZones global metadata provided as string of comma separated values for types.

const definition = HistoricalPricing.Metadata.Global.Definition({
    types: 'MultipleFieldMapping,TimeZones',
});

const response = await definition.getData();

console.log(response.data.raw);
{
  "MultipleFieldMapping": [
        ["CLOSE_ASK","ASK","HST_CLSASK"],
        ["CLOSE_BID","BID","HST_CLSBID"],
        ["MID_CLOSE","MID_PRICE"],
        ["SETTLE","OFF_CLOSE","TRDPRC_1","HST_CLOSE"],
        ["CLS_YLD","YIELD","HST_CLSYLD"]
    ],
  "TimeZones":{"GMT":{"ShortName":"GMT","LongName":"GREENWICH MT","GmtOffset":0,"HasSummerTime":false,"SummerOffset":0}}
}

The following examples demonstrate how to retrieve Exchanges and Units global metadata provided as array of types.

const definition = HistoricalPricing.Metadata.Global.Definition({
    types: ['Exchanges', 'Units'],
});

const response = await definition.getData();

console.log(response.data.raw);
{
  "Exchanges":[{"ShortName":"JNX","LongName":"SBI","Suffix":".??"},{"ShortName":"SOE","LongName":"INFOBOLSA","Suffix":".SCT"}],
  "Units": [
    {"UnitType": "0","Category": "UnitCategoryNone","LongName": "None","ShortName": "","BaseType": "0","BaseCf": "1","CategoryEx": "UnitCategoryNone"},
    {"UnitType": "1","Category": "UnitCategoryWeight","LongName": "Tonnes","ShortName": "T","BaseType": "1","BaseCf": "1","CategoryEx": "UnitCategoryWeight"}
  ]
}

None.

94 words (0:30 mins)