Refinitiv Data Platform Library for TypeScript

getFields

Allows you to get the requested fields for the instrument.

Syntax

stream.getFields(instrument: string, fields?: string[])

Parameters

Value Description Data type Optional Default value
instrument Name of the instrument string No -
fields Specifies the specific fields to be returned for the instrument. If it's not passed - all the fields for this instrument will be returned. string[] Yes -

Returned value

An object ({ [field]: string | number | null | boolean}) of the requested fields for the instrument or undefined if not found.

Usage

The following example demonstrates how to get requested fields for the specified instrument.

const stream = Pricing.Definition({
    universe: ['EUR=', 'CAD=', 'UAH='],
    fields: ['DSPLY_NAME', 'BID_NET_CH'],
}).getStream();

const allEurFields = stream.getFields('EUR=');
const subsetOfEurFields = stream.getFields('EUR=', ['DSPLY_NAME', 'BID_NET_CH']);

None.