用于检索数据的Python包。

refinitiv-dataplatform的Python项目详细描述


用于Python的Refinitiv数据平台库提供了一组易用性 为应用程序提供对 Refinitiv提供的金融数据和服务的深度和广度 数据平台。在

多亏了这个库,可以使用相同的Python代码来检索数据 无论应用程序使用什么接入点连接到Refinitiv 数据平台(通过直接连接、Eikon和Refinitiv 工作区,甚至通过部署的企业平台)。在

该库提供了几个抽象层,支持不同的 编程风格和技术适合所有来自金融业的开发人员 程序员给经验丰富的开发人员(同步函数调用,异步/等待, 事件驱动)。在

一些例子

导入Refinitiv数据平台库

importrefinitiv.dataplatformasrdp

选择您的平台接入点

…或者直接到Refinitiv数据平台…

^{pr2}$

…或通过Eikon/Refinitiv Workspace…

rdp.open_desktop_session('8e9bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1b035d')

…或通过部署的平台

rdp.open_deployed_platform_session('8e9bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1b035d','my_deployed_platform_ip','my_dacs_user_name')

实时定价-获取快照

rdp.get_snapshot(universe=['GBP=','JPY='],fields=['BID','ASK'])
InstrumentsBIDASK
0GBP=1.32111.3212
1JPY=108.6100108.6200

实时定价-获取流数据

streaming_prices=rdp.StreamingPrices(instruments=['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()

输出:

<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}

历史定价-获取日间摘要

rdp.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'])
^{tb2}$

新闻-获取头条新闻

rdp.get_news_headlines(query='LFR',count=350)
versionCreatedtextstoryIdsourceCode
2019-12-12 06:51:36.518SGX FTSE China A50 (Z9) intraday : prudence.urn:newsml:reuters.com:20191212:nGUR92Pj4t:1NS:GURU
2019-12-12 06:49:52.011SSE Composite intraday : biais haussier au-des...urn:newsml:reuters.com:20191212:nGUR8gt362:1NS:GURU
2019-12-12 06:49:33.973Election du Conseil fédéral: "repenser la form...urn:newsml:reuters.com:20191212:nNRAafovmk:1NS:SDASDE
............
2019-12-11 23:27:13.673Le nouveau système en huit questionsurn:newsml:reuters.com:20191211:nNRAafll6g:1NS:LESECH
2019-12-11 23:27:13.653Les clefs du royaumeurn:newsml:reuters.com:20191211:nNRAaflped:1NS:LESECH

350行x 4列

学习材料

要了解更多关于prefinitiv Data Platform Library for python 连接Refinitiv开发者社区。通过 registeringlogin到表面 开发者社区门户,你可以免费访问 学习材料如 Quick Start guidesTutorialsDocumentation 还有更多。在

帮助和支持

如果您对API的使用有任何疑问,请在 Refinitiv Data Platform Q&A Forum。 Refinitiv开发者社区将非常乐意为您提供帮助。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
JAVA循环linkedlist/在linkedlist中查找字符串   java如何为键盘快捷键使用按键事件调度器   sonarqube Java 8将两个空检查替换为可选   java将默认焦点设置为JButton   java有没有办法在Spring中包含controller with Swagger中未使用的类?   java Android Libgdx,如何写入内部文件?   java Android Studio GPS connect从web服务器返回结果   java Jackson序列化循环引用堆栈溢出错误   java Oracle SQL计算并发事件数   java Hibernate:如果entity字段为null且db字段包含默认值,则不插入数据   用户id的java正则表达式   服务器关闭使用httpclient和Java 7建立的连接   maven将库导入java   javascript如何使用selenium web驱动程序在代码镜像中输入值?   在java算法中拆分字符串