Refinitiv Data Platform Library for TypeScript

getStream

Creates and returns the pricing stream that allows you to get streaming data for previously defined instruments.

Syntax

definition.getStream(session: Session, api?: string)

Parameters

Value Description Data type Optional Default value
session Session object. If it's not passed the default session will be used. Session Yes -
api API path in the configuration file to build a streaming url. string Yes pricing/stream

Returned value

Pricing.Stream object

Usage

The following example demonstrates how to get the stream object to retrieve BID and ASK fields for EUR= and USD= instruments.

const definition = Pricing.Definition({
    universe: ['EUR=', 'USD='],
    fields: ['BID', 'ASK'],
});

const stream = await definition.getStream();