Refinitiv Data Library for TypeScript

Overview

Summary

OMMStream objects are used to subscribe to streaming items of any Domain Model (e.g. MarkePrice, MarketByPrice...) exposed by the underlying WebSocket protocol of the Refinitiv Data Platform.

OMMStream objects emit a number of different events your application can listen to in order to be notified of the latest fields values in real-times

Methods

open()

Opens the OMMStream connection sending a corresponding request. Once the OMMStream is opened it can be used in order to retrieve data.

Returned value: Promise<void>.

close()

closes the OMMStream connection, releases resources.

Returned value: Promise<void>.

state()

Returns current state of the OMMStream:

  • State.Opened
  • State.Pending
  • State.Closed

name: string

Returned value: a name of the instrument used for the OMMStream request


Example of usage


ommStream.open();

ommStream.close()

console.log(ommStream.state);

console.log(ommStream.name);