LSEG Data Library for Python

get_data_async

Sends a request to the Delivery Platform (formerly Refinitiv Data Platform) to retrieve the data described in bond.Definition object.

Module

refinitiv.data.ipa.financial_contracts.bond

Syntax

get_data_async(session, on_response)

Parameters

Value Description Data type Optional Default value
session Session object. If session parameters are not defined, the default session will be used. Session object Yes None
on_response User-defined callback function to process the retrieved data. Callable Yes None

Returned value

Response

Usage

import asyncio
from refinitiv.data.content.ipa.financial_contracts import bond

definition = bond.Definition(
    fields=["YieldPercent", "Duration", "RedemptionDateType", "RedemptionDate"],
    instrument_code="250847EF3=TWBL",
    pricing_parameters=bond.PricingParameters(
        redemption_date_type="RedemptionAtCallDate",
        price = 100,
        trade_date = "2020-05-01"
    )
)
task = definition.get_data_async()
response = asyncio.run(task)

print(response.data.df.to_string())

None.

60 words (0:19 mins)