Refinitiv Data Library for Python

stream.on_complete

Called after the requested instruments and fields are completely received. on_complete is only called once per stream opening.

Module

refinitiv.data.content.pricing

Syntax

stream.on_complete(func)

Parameters

Value Description Data type Optional Default value
func Callable object to process the retrieved data. Callable No -

Returned value

pricing.Stream object

Usage

The following example demonstrates how to display the messages received when all the data is successfully retrieved.

import datetime


# previously defined callable, pay attention that arguments order is important
def display_completion(stream):
    current_time = datetime.datetime.now().time()
    print("\t{} | Subscription complete".format(current_time))  # noqa


definition = pricing.Definition("EUR=")
stream = definition.get_stream()
stream.on_complete(display_completion)
stream.open()

None.