LSEG Data Library for TypeScript

HistoricalPricing.Metadata.Partialbar.Definition methods

getData

The getData function is used to send a request to the Delivery Platform (formerly Refinitiv Data Platform) to retrieve the historical pricing data described by HistoricalPricing.Metadata.Partialbar 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 the historical pricing partial bar data for specific instrument.

const definition = HistoricalPricing.Metadata.Partialbar.Definition({
    name: 'TRI.N'
});

const response = await definition.getData();

console.log(response.data.raw);
{"universe":{"ric":"TRI.N"},"interval":"P1D","meta":{"blendingEntry":{"headers":[{"name":"DATE", {"name": "HIGH_1"}}],"data":["2024-02-13", 154]}}}

The following examples demonstrate how to retrieve the historical pricing partial bar data for specific instrument.

const definition = HistoricalPricing.Metadata.Partialbar.Definition({
    name: 'TRI.N'
});

const response = await definition.getData();

console.log(response.data.table);
Response
DATE HIGH_1 LOW_1 OPEN_PRC TRDPRC_1 NUM_MOVES ACVOL_UNS HIGH_YLD LOW_YLD OPEN_YLD YIELD BID_HIGH_1 BID_LOW_1 OPEN_BID BID BID_NUMMOV ASK_HIGH_1 ASK_LOW_1
2024-02-13 154 151.57 152.75 152.45 380 90596 N/A N/A N/A N/A 153.98 0 152.51 152.46 60909 154.64 0

None.

124 words (0:39 mins)