Refinitiv Data Library for Python

get_data_async

This method sends a request to the Refinitiv Data Platform to retrieve the data described in the search.Definition object.

Module

refinitiv.data.content.search

Syntax

get_data(session, on_response)

Parameters

Value Description Optional Data type Default value
session Session object. If it's not passed the default session will be used. Yes Session object None
on_response Callable function to process the retrieved data. Yes Callable None

Return value

Search Response

Usage

The following example demonstrates how to create search definition for IBM and get all the necessary data:

response = search.Definition("IBM").get_data()
Response
BusinessEntity DocumentTitle PermID PI RIC
0 ORGANISATION International Business Machines Corp, Public Company N/A 37036 N/A
1 ORGANISATION Banco IBM SA, Private Company N/A 76208 N/A
2 QUOTExEQUITY International Business Machines Corp, Ordinary Share, NYSE Consolidated 55839165994 1097326 IBM
3 ORGANISATION Tiers Corporate Bond Backed Certificates Trust Series Ibm 1997 4, Private Company N/A 18062670 N/A
4 QUOTExEQUITY Eurex International Business Machines Equity Future Chain Contract , Equity Future, USD, Eurex 21481052421 48924732 0#IBMF:
5 QUOTExEQUITY Euronext Amsterdam IBM Dividend Future Chain Contracts, Equity Future, USD, Euronext Amsterdam 21612423771 259118763 0#IBMDF:
6 QUOTExEQUITY Eurex International Business Machines Equity Future Continuation 1, Equity Future, USD, Eurex 21481052892 49450681 IBMFc1
7 QUOTExEQUITY Eurex International Business Machines Equity Future Continuation 2, Equity Future, USD, Eurex 21481053949 50092347 IBMFc2
8 QUOTExEQUITY Euronext Amsterdam IBM Single Stock Dividend Future Continuation 1, Equity Future, USD, Euronext Amsterdam 21613372305 260213021 IBMDFc1
9 QUOTExEQUITY Eurex International Business Machines Equity Future Continuation 3, Equity Future, USD, Eurex 21481053950 50092348 IBMFc3

The following example demonstrates how to create a search query with particular options and get the necessary data:

response = search.Definition(
    query="IBM Bonds",
    select="ISIN,RIC,IssueDate,Currency,FaceIssuedTotal,CouponRate,MaturityDate",
).get_data()

print(response.data.df.to_string())
Response
ISIN RIC IssueDate Currency FaceIssuedTotal CouponRate MaturityDate
0 US459200HG92 459200HG9= 2012-07-30 00:00:00 USD 1000000000 1.875 2022-08-01 00:00:00
1 XS1271665280 US127166528= 2015-08-05 00:00:00 GBP 300000000 2.625 2022-08-05 00:00:00
2 US459200JC60 459200JC6= 2015-11-09 00:00:00 USD 900000000 2.875 2022-11-09 00:00:00
3 XS1944456018 US194445601= 2019-01-31 00:00:00 EUR 1750000000 0.375 2023-01-31 00:00:00
4 XS1143163183 US114316318= 2014-11-26 00:00:00 EUR 1000000000 1.25 2023-05-26 00:00:00
5 US459200HP91 459200HP9= 2013-08-01 00:00:00 USD 1500000000 3.375 2023-08-01 00:00:00
6 US459200HU86 459200HU8= 2014-02-12 00:00:00 USD 2000000000 3.625 2024-02-12 00:00:00
7 US459200JY80 459200JY8= 2019-05-15 00:00:00 USD 3000000000 3 2024-05-15 00:00:00
8 XS1375841233 US137584123= 2016-03-07 00:00:00 EUR 750000000 1.125 2024-09-06 00:00:00
9 XS1944456109 US194445610= 2019-01-31 00:00:00 EUR 1000000000 0.875 2025-01-31 00:00:00

The following example demonstrates how to create a search by people query to search CFO's:

response = search.Definition(
    query="cfo",
    view=search.SearchViews.PEOPLE
).get_data()

print(response.data.df.to_string())
Response
BusinessEntity DocumentTitle PermID PI
0 PERSON Amy E. Hood - Microsoft Corp - Chief Financial Officer, Executive Vice President 34415553383 34415553383
1 PERSON Luca Maestri - Apple Inc - Chief Financial Officer, Senior Vice President 34414554748 34414554748
2 PERSON Brian T. Olsavsky - Amazon.com Inc - Chief Financial Officer, Senior Vice President 34417610894 34417610894
3 PERSON Ruth M. Porat - Alphabet Inc - Chief Financial Officer, Senior Vice President 34413960665 34413960665
4 PERSON David M. Wehner - Meta Platforms Inc - Chief Financial Officer 34414804241 34414804241
5 PERSON Marc D. Hamburg - Berkshire Hathaway Inc - Chief Financial Officer, Senior Vice President 34413152672 34413152672
6 PERSON Andrew K. Klatt - Berkshire Hathaway Inc - CFO & COO 34414966250 34414966250
7 PERSON Xu Hong - Alibaba Group Holding Ltd - Chief Financial Officer 34425652371 34425652371
8 PERSON John Lo - Tencent Holdings Ltd - Chief Financial Officer, Senior Vice President 34414907131 34414907131
9 PERSON Vasant M. Prabhu - Visa Inc - Vice Chairman of the Board, Chief Financial Officer 34413340523 34413340523

The following example demonstrates how to create a search query with Navigator options and get the necessary data:

response = search.Definition(
    view=search.SearchViews.COMMODITY_QUOTES,
    query="cheese",
    navigators="ExchangeName"
).get_data()

print(response.data.df.to_string())
Response
BusinessEntity DocumentTitle PermID PI RIC
0 QUOTExCOMMODITY CME Cash Settled Cheese Electronic Commodity Future Continuation 1, Commodity Future, Chicago Mercantile Exchange 21622940491 273610776 CSCc1
1 QUOTExCOMMODITY Cash Settled Cheese Futures Chain Contracts, Commodity Future, Chicago Mercantile Exchange 21622425217 272623267 0#CSC:
2 QUOTExCOMMODITY CME Cash Settled Cheese Electronic Commodity Future Jun 2022, Commodity Future, Chicago Mercantile Exchange 21757842054 444997903 CSCM2
3 QUOTExCOMMODITY CME Cash Settled Cheese Electronic Commodity Future Jul 2022, Commodity Future, Chicago Mercantile Exchange 21762656526 451127563 CSCN2
4 QUOTExCOMMODITY CME Cash Settled Cheese Electronic Commodity Future Aug 2022, Commodity Future, Chicago Mercantile Exchange 21767494118 457131738 CSCQ2
5 QUOTExCOMMODITY CME Cash Settled Cheese Electronic Commodity Future Oct 2022, Commodity Future, Chicago Mercantile Exchange 21778821217 471517057 CSCV2
6 QUOTExCOMMODITY CME Cash Settled Cheese Electronic Commodity Future Sep 2022, Commodity Future, Chicago Mercantile Exchange 21772665846 463861357 CSCU2
7 QUOTExCOMMODITY CME Cash Settled Cheese Electronic Commodity Future Nov 2022, Commodity Future, Chicago Mercantile Exchange 21784277336 478150068 CSCX2
8 QUOTExCOMMODITY CME Cash Settled Cheese Electronic Commodity Future Dec 2022, Commodity Future, Chicago Mercantile Exchange 21790857663 485909287 CSCZ2
9 QUOTExCOMMODITY CME Cash Settled Cheese Electronic Commodity Future Feb 2023, Commodity Future, Chicago Mercantile Exchange 21801133645 498573458 CSCG3

The following example demonstrates how to create a search query and get the necessary data using the group_by option:

response = search.Definition(
    view=search.SearchViews.INDICATOR_QUOTES,
    query="rate",
    group_by="CentralBankName",
    group_count=2,
    select="CentralBankName,DocumentTitle,RIC"
).get_data()

print(response.data.df.to_string())
Response
CentralBankName DocumentTitle RIC
0 Federal Reserve System United States, Policy Rates, Fed Funds Target Rate, Reuters Polls, Daily, The Federal Open Market Committee USFOMC=ECI
1 Federal Reserve System United States, Policy Rates, Fed Overnight Repo, Reuters Polls, Daily, Federal Reserve, United States USRRP=ECI
2 European Central Bank Euro Zone, Policy Rates, ECB Main refinancing, Fixed Rate (Announcement Dates), Reuters Polls, Monthly, ECB - European Central Bank EUECBR=ECI
3 European Central Bank Euro Zone, Policy Rates, ECB Deposit Rate, Reuters Polls, Monthly, ECB - European Central Bank EUECBD=ECI
4 Central Bank of the Republic of Turkey Turkey, Policy Rates, Central Bank 1 Week Repo Lending Rate, Reuters Polls, Monthly, Central Bank of the Republic of Turkey TRINT=ECI
5 Central Bank of the Republic of Turkey Turkey, Policy Rates, Overnight Lending Rate, Reuters Polls, Monthly, Central Bank of the Republic of Turkey TRONR=ECI
6 Central Bank of the Russian Federation Russia, Policy Rates, Central bank key rate, Reuters Polls, Monthly, The Central Bank of the Russian Federation RUCBIR=ECI
7 Central Bank of the Russian Federation Russia, Policy Rates, Central bank key rate, Reuters Polls, Daily, The Central Bank of the Russian Federation RUCIR1=ECI
8 Bank of Korea South Korea, Policy Rates, Base Rate, Reuters Polls, Monthly, The Bank of Korea KROCRT=ECI
9 Bank of Korea South Korea, Base Rate-Mean, Long-Term Outlook, Quarterly, Reuters pKRINTQP=E

The following example demonstrates how to create a search query and get the necessary data using the filtering option:

response = search.Definition(
    view=search.SearchViews.GOV_CORP_INSTRUMENTS,
    select="ISIN,RIC,IssueDate,Currency,FaceIssuedTotal,CouponRate,MaturityDate",
    filter="IssuerTicker eq 'IBM' and IsActive eq true and AssetStatus ne 'MAT'"
).get_data()

print(response.data.df.to_string())
Response
ISIN RIC IssueDate Currency FaceIssuedTotal CouponRate MaturityDate
0 US459200HG92 459200HG9= 2012-07-30 00:00:00 USD 1000000000 1.875 2022-08-01 00:00:00
1 XS1271665280 US127166528= 2015-08-05 00:00:00 GBP 300000000 2.625 2022-08-05 00:00:00
2 US459200JC60 459200JC6= 2015-11-09 00:00:00 USD 900000000 2.875 2022-11-09 00:00:00
3 XS1944456018 US194445601= 2019-01-31 00:00:00 EUR 1750000000 0.375 2023-01-31 00:00:00
4 XS1143163183 US114316318= 2014-11-26 00:00:00 EUR 1000000000 1.25 2023-05-26 00:00:00
5 US459200HP91 459200HP9= 2013-08-01 00:00:00 USD 1500000000 3.375 2023-08-01 00:00:00
6 US459200HU86 459200HU8= 2014-02-12 00:00:00 USD 2000000000 3.625 2024-02-12 00:00:00
7 US459200JY80 459200JY8= 2019-05-15 00:00:00 USD 3000000000 3 2024-05-15 00:00:00
8 XS1375841233 US137584123= 2016-03-07 00:00:00 EUR 750000000 1.125 2024-09-06 00:00:00
9 XS1944456109 US194445610= 2019-01-31 00:00:00 EUR 1000000000 0.875 2025-01-31 00:00:00

None