Package: refinitiv-dataplatform
The Refinitiv Data Plaform Library for Python provides a set of ease-of-use
functions and classes that gives your applications a uniform access to the
breath and depth of financial data and services available on the Refinitiv
Data Platform.Thanks to this library the same Python code can be used to retrieve data
whatever the access point your application uses to connect to the Refinitiv
Data Platform (either via a direct connection, via Eikon, via the Refinitiv
Workspace or even via a deployed Enterprise Platform).The library provides several abstraction layers enabling different
programming styles and technics suitable for all developers from Financial
Coders to Seasoned Developers (synchronous function calls, async/await,
event driven).Some examplesImport the Refinitiv Data Platform Libraryimportrefinitiv.dataplatformasrdpChose your platform access point......either directly to the Refinitiv Data Platform...rdp.open_platform_session('8e9bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1b035d',rdp.GrantPassword('my_login','my_password'))...or via Eikon/Refinitiv Workspace...rdp.open_desktop_session('8e9bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1b035d')Fundamental And Reference data retrievalrdp.get_data(universe=["TRI.N","IBM.N"],fields=["TR.Revenue","TR.GrossProfit"])instrumentdateTR.RevenueTR.GrossProfit0TRI.N2020-12-31T00:00:00598400000056560000001IBM.N2020-12-31T00:00:007362000000035574000000Historical data retrievalrdp.get_historical_price_summaries(universe='VOD.L',interval=rdp.Intervals.DAILY,fields=['BID','ASK','OPEN_PRC','HIGH_1','LOW_1','TRDPRC_1','NUM_MOVES','TRNOVR_UNS'])BIDASKOPEN_PRCHIGH_1LOW_1TRDPRC_1NUM_MOVESTRNOVR_UNS2019-12-12144.32144.34144.42145.66143.46144.1812631.08498347218.711542019-12-11143.58143.6142.72144.8142.62143.5810395.08815450412.653532019-12-10142.74142.78143.84143.84141.48142.7410311.08070285210.45742...........................2019-11-18152.1152.12154.74155.66152.0152.1214606.019322988639.342019-11-15154.6154.62160.68160.68154.06154.632617035.031993013818.37456Real-time streaming data retrievalstreaming_prices=rdp.StreamingPrices(universe=['EUR=','GBP=','JPY=','CAD='],fields=['DSPLY_NAME','BID','ASK'],on_update=lambdastreaming_price,instrument_name,fields:print("Update received for{}:{}".format(instrument_name,fields)))streaming_prices.open()Output:<StreamState.Open: 3>

Update received for JPY=: {'DSPLY_NAME': 'BARCLAYS     LON', 'BID': 109.59, 'ASK': 109.62}
Update received for GBP=: {'DSPLY_NAME': 'ASANPACIFIBK MOW', 'BID': 1.341, 'ASK': 1.3411}
Update received for EUR=: {'DSPLY_NAME': 'UBS          ZUR', 'BID': 1.117, 'ASK': 1.1174}
Update received for CAD=: {'DSPLY_NAME': 'HSBC         LON', 'BID': 1.3165, 'ASK': 1.3167}
Update received for JPY=: {'DSPLY_NAME': 'ASANPACIFIBK MOW', 'BID': 109.59, 'ASK': 109.61}
Update received for GBP=: {'DSPLY_NAME': 'INTERPROMBAN MOW', 'BID': 1.341, 'ASK': 1.3412}
Update received for EUR=: {'DSPLY_NAME': 'RBS          LON', 'BID': 1.117, 'ASK': 1.1174}
Update received for CAD=: {'DSPLY_NAME': 'CIBC         TOR', 'BID': 1.316, 'ASK': 1.3164}
Update received for JPY=: {'DSPLY_NAME': 'BARCLAYS     LON', 'BID': 109.59, 'ASK': 109.62}
Update received for GBP=: {'DSPLY_NAME': 'INTERPROMBAN MOW', 'BID': 1.341, 'ASK': 1.3413}
Update received for EUR=: {'DSPLY_NAME': 'BARCLAYS     LON', 'BID': 1.117, 'ASK': 1.1174}
Update received for CAD=: {'DSPLY_NAME': 'CIBC         TOR', 'BID': 1.316, 'ASK': 1.3164}
Update received for JPY=: {'DSPLY_NAME': 'ASANPACIFIBK MOW', 'BID': 109.59, 'ASK': 109.61}
Update received for GBP=: {'DSPLY_NAME': 'BARCLAYS     LON', 'BID': 1.341, 'ASK': 1.3414}Real-time snapshot data retrievalrdp.get_snapshot(universe=['GBP=','JPY='],fields=['BID','ASK'])InstrumentsBIDASK0GBP=1.32111.32121JPY=108.6100108.6200Learning materialsTo learn more about the Refinitiv Data Platform Library for python just
connect to the Refinitiv Developer Community. Byregisteringandloginto the Refinitiv
Developer Community portal you will get free access to a number of
learning materials likeQuick Start guides,Tutorials,Documentationand much more.Help and SupportIf you have any questions regarding the API usage, please post them on
theRefinitiv Data Platform Q&A Forum.
The Refinitiv Developer Community will be very pleased to help you.