Refinitiv Data Library for Python

get_stream

Creates and returns the trade data service stream objects that allow you to get streaming data for previously defined instruments.

Module

refinitiv.data.content.trade_data_service

Syntax

definition.get_stream(session)

Parameters

Value Description Data type Optional Default value
session Session object. If it's not passed the default session will be used. Session object Yes None

Return value

trade data service Stream object

Usage

The following example demonstrates how to get the stream object to retrieve the OrderKey and OrderTime fields for the LSEG.L instrument.

stream = trade_data_service.Definition(
    universe="LSEG.L",
    fields=["OrderKey", "OrderTime"]
).get_stream()