Refinitiv Data Platform Library for TypeScript

onUpdate

Attaches Update event handler function to the stream.

Syntax

streamingChain.onUpdate(callback: Pricing.Chain.OnUpdateCallback)

Parameters

Name Is Optional Default Value Description
callback No - Pricing.Chain.OnUpdateCallback function (see Pricing.Chain.Events for more information)

Returned value

Pricing.Chain.Stream object

Usage

The following example demonstrates how to display the messages received when a constituent is updated in the stream.

const streamingChain = await Pricing.Chain.Definition('.AV.HSI').getStream(session);

await streamingChain
    .onUpdate((newConstituent, oldConstituent) => console.log(newConstituent, oldConstituent))
    .open();

None.