LSEG Data Library for TypeScript

HistoricalPricing.Metadata.Instrument.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 metadata for a particular instrument described by HistoricalPricing.Metadata.Instrument 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 metadata for specific instrument and types provided as array.

const definition = HistoricalPricing.Metadata.Instrument.Definition({
    name: 'IBM.N',
    types:['TradingSessions','TimeZone', 'InstrumentInfo']
});

const response = await definition.getData();

console.log(response.data.raw);
{
  "Trading`Sessions":[{
    "sessions": [
        {"trades": [null,1,2,3,4,5],"tradesText": {"mon": "mon","tue": "tue","wed": "wed","thu": "thu","fri": "fri"},"tradingPhase": "Normal","startTime": [9,30,0],"endTime": [16,2,0],"classificationText": "Normal","isOvernight": false,"classification": 1}
    ],
    "validFrom": "1970-01-02T00:00:00.000Z",
    "validTo": "2021-07-04T01:30:00.000Z",
    "timeZone": "NYC",
    "rolloverTime": "P0DT21H30M0S",
    "weekSummDef": "MON-FRI",
    "summarizationModelText": "rollover",
    "summarizationModel": 0
  }],
  "TimeZone": "NYC",
  "InstrumentInfo":{
    "Intraday": {
        "ReportDate": "2024-02-14Z",
        "Symbology": "Standard",
        "DView": "TRDPRC_1",
        "interval": [
            {"Event": "TAS","Set": "TSDB","TimestampFact": "COLLECT_DATETIME","facts": [{"FactName": "VhExchgTime","DataType": "DateTime","DepthStart": "2010-03-24Z","DepthEnd": "2024-02-11Z","IDNSF": "1.000000","mapsTo": [{"Set": "ERT","ID": "DATE_TIME"}]}]}
        ]
    }
  }
}

The following examples demonstrate how to retrieve the historical pricing metadata for specific instrument and types provided as string with comma separated values.

const definition = HistoricalPricing.Metadata.Instrument.Definition({
    name: 'IBM.N',
    types: 'Qualifiers,RuleReferenceData,MarketRulesData',
    version: 'v2'
});

const response = await definition.getData();

console.log(response.data.raw);
{
  "Qualifiers": {
        "197": {"code": "Normal","desc": "Regular Trade - No Display Code","action": 0,"exchcode": "0","fact": "TRD_QUAL_10","fid": "40","id": "197","orbvwap": 0,"parseby": "string","stdvwap": 0},
        "198": {"code": "AUT","desc": "Automatic Execution","action": 0,"exchcode": "14","fact": "TRD_QUAL_10","fid": "40","id": "198","orbvwap": 0,"parseby": "string","stdvwap": 0}
  },
  "RuleReferenceData": {
        "TC_ELIGBL_TRD_FID_4756_P0006_ValueMap": {"9": "2","M": "2"},
        "Qualifier_FID_1002_ValueMap": {"X": "10964"}
  },
  "MarketRulesData": {
        "ruleId": "14491",
        "ruleName": "US_NYS_EQ_113_1_1",
        "ruleVersionId": "64.0",
        "dataFilterClauses": [{
            "type": "update",
            "annotation": "TAS record for Regular Trades - Default",
            "acceptCondition": {
                    "operator": 4,
                    "operatorText": "and",
                    "conditions": [{"conditionOperator": 0,"operand": {"fid": "6","type": 0,"typeText": "currentValue_Fid"}}]
            },
            "recordGeneration": {
                    "annotation": "[Timestamp=COLLECT_DATETIME] TAS record for Regular Trades - Default",
                    "clauseNumber": "2",
                    "fields": null,
                    "fieldMap": {},
                    "fieldAssignments": [{"field": "ASKSIZE","value": {"fid": "31","type": 2,"typeText": "latestValue_Fid"}},{"field": "BIDSIZE","value": {"fid": "30","type": 2,"typeText": "latestValue_Fid"}}],
                    "qualifierFacts": ["TRD_QUAL_1","TRD_QUAL_7","TRD_QUAL_8","TRD_QUAL_9","TRD_QUAL_10"],
                    "recordType": 1,
                    "type": "TAS"
            }
        }]
    }
}

None.

101 words (0:32 mins)