Refinitiv Data Library for Python

trade data service Stream

This object creates a definition of the data stream which contains information about trade history.

Module

refinitiv.data.content.trade_data_service

Syntax

Stream(session, universe, universe_type, fields, events, finalized_orders, filters, api, extended_params)

Parameters

Value Description Data type Optional Default value
universe Single instrument or list of instruments. str or list(str) Yes None
universe_type The type of given instruments. UniverseTypes Yes UniverseTypes.UserID
fields Single field or list of fields. str or list(str) Yes None
events Enable/disable the detail of the order event in the stream. Events Yes Events.No
finalized_orders Enable/disable the cached finalized order of the current day in the stream. FinalizedOrders Yes FinalizedOrders.No
filters Set the condition of subset of trading streaming data. str or list(str) Yes None
api Specifies the data source for further data retrieval. str Yes None
extended_params Specifies the parameters that will be merged with the request. dict Yes None

Returned value

trade data service Stream instance

Usage

The following example demonstrates how to create a trade data service definition object for the LSEG.L instrument for the OrderKey and OrderTime fields and get the stream object.

from refinitiv.data.content import trade_data_service

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

definition.get_stream()