Refinitiv Data Library for Python

get_stream

Creates and returns the pricing stream that allows you to get streaming data for previously defined instruments.

Module

refinitiv.data.content.pricing

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

pricing.Stream object

Usage

The following example demonstrates how to get the stream object to retrieve BID and ASK fields for EUR= and USD= instruments.

stream = pricing.Definition(
    universe=['EUR=', 'USD='],
    fields=['BID', 'ASK']
).get_stream()

pricing stream open method
pricing stream close method
pricing stream get_snapshot method
pricing stream on_refresh method
pricing stream on_update method
pricing stream on_status method
pricing stream on_complete method
pricing stream on_error method