Refinitiv Data Platform Library for TypeScript

session.close

This method closes the session and disconnects your application from the data platform.

Syntax

session.close()

Parameters

None.

Returned value

Promise<void>

Usage

The following example demonstrates how to close a session and check the status of the session to ensure that it has been closed successfully.

import { Session } from '@refinitiv-data/data';

const session = Session.Desktop.Definition({ appKey: process.env.APP_KEY! }).getSession();

await session.open();

await session.close();

console.log(session.state);

None.