Refinitiv Data Library for Python

trade_data_service.Definition object

This object creates a definition which contains information about trade history.

Module

refinitiv.data.content.trade_data_service

Syntax

trade_data_service.Definition(
    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 streaming. Events Yes Events.No
finalized_orders Enable/disable the cached finalized order of the current day in the streaming. FinalizedOrders Yes FinalizedOrders.No
filters Set the condition of the 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.Definition object

Usage

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

from refinitiv.data.content import trade_data_service

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