Refinitiv Data Library for TypeScript

Session

Summary

The Session manages your connection to the data platform. Depending on its type, the session communicates either directly with the platform or via a local access point (e.g. Refinitiv Real-Time Distribution System or Refinitiv Workspace) or via a container application (e.g. Refinitiv Workspace or Refinitiv Workspace Web). Before it can retrieve any data your application must create a session and successfully open it.

Methods

open()

Opens the session. Once the session is opened it can be used to retrieve data via Content Layer objects or Delivery layer objects.

Returned value: Promise<void>.


close()

Closes the session. This disconnects the session from the data platform and releases all resources.

Returned value: Promise<void>.


state

Returns the current state of the session:

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

Example of usage

session.open();

session.close()

console.log(session.state);