Refinitiv Data Platform Library for TypeScript

onRefresh

Attaches an event handler function to the stream, which will be called when the stream is refreshed by the server.

Syntax

stream.onRefresh(callback: Pricing.StreamRefreshCallback)

Parameters

Value Description Data type Optional Default value
callback Pricing.StreamRefreshCallback function (see Pricing.StreamEvent ) function No -

Returned value

Pricing.Stream object

Usage

The following example demonstrates how to display messages received when the stream is refreshed by the platform or it was opened successfully

const stream = Pricing.Definition(['EUR=']).getStream();

await stream
    .onRefresh((refresh, instrument) => console.log(instrument, refresh))
    .open();

None.