Skip to content

Repository files navigation

PyRFA

versionpyversionformatplatformlicensedownloadsSponsor

PyRFA is a Python API for accessing Thomson Reuters market data feeds known as Elektron, Thomson Reuter Enterprise Platform for Real-time (TREP-RT) or legacy RMDS. It supports subscription and publication of market data using OMM data message model.

application

Features

  • Subscription for MARKET_PRICE (level 1)
  • Subscription for MARKET_BY_ORDER (order book)
  • Subscription for MARKET_BY_PRICE (market depth)
  • Snapshot/streaming request
  • Multiple service subscription
  • Pause and resume subscription
  • OMM Posting
  • View
  • Dictionary download or use local files
  • Directory request
  • Symbol list request
  • Time-series request and decoder for IDN TS1
  • Custom domain MMT_HISTORY which can be used for intraday timeseries publishing
  • Non-interactive provider (full-cached) for MARKET_PRICE, MARKET_BY_ORDER, MARKET_BY_PRICE, SYMBOLLIST, HISTORY domains
  • Interactive provider for MARKET_PRICE domain
  • Debug mode
  • Logging
  • Low-latency mode
  • Subscription outbound NIC binding

Installation

PyRFA supports both Windows and Linux platforms. Simply install from PyPI using pip:

> pip install pyrfa

Windows users might need to install Microsoft Visual C++ 2010 SP1 Redistributable Package (x64) or (x86).

Platform Availability

Windows

VersionRelease Date64bit-Windows, Python 3.764bit-Windows, Python 3.664bit-Windows, Python 3.564bit-Windows, Python 3.464bit-Windows, Python 2.764bit-Windows, Python 2.632bit-Windows, Python 2.732bit-Windows, Python 2.6
8.5.319 Nov 18
7.7.017 Mar 17

Linux

VersionRelease Date64bit-Linux, Python 3.764bit-Linux, Python 3.664bit-Linux, Python 3.564bit-Linux, Python 3.464bit-Linux/RHEL7, Python 2.764bit-Linux/RHEL6, Python 2.6
8.5.319 Nov 18

Example

importpyrfap=pyrfa.Pyrfa()
p.createConfigDb("./pyrfa.cfg")
p.acquireSession("Session1")
p.createOMMConsumer()
p.login()
p.directoryRequest()
p.dictionaryRequest()
p.marketPriceRequest("JPY=,EUR=")
end=Falsewhilenotend:
try:
fordatainp.dispatchEventQueue(10):
print(data)
exceptKeyboardInterrupt:
end=True

Output:

...
{'MTYPE': 'UPDATE', 'RIC': 'JPY=', 'SERVICE': 'IDN_RDF_SDS', 'IRGPRC': 0.24}
{'MTYPE': 'UPDATE', 'ASIA_NETCH': 0.7, 'SERVICE': 'IDN_RDF_SDS', 'RIC': 'JPY='}
{'MTYPE': 'UPDATE', 'BID_NET_CH': 0.26, 'RIC': 'JPY=', 'SERVICE': 'IDN_RDF_SDS'}
...

Support

Available support including API documentation, Replay Service guide, changelog, issue tracker:

About

Open sourced Python API for Refinitiv (Thomson Reuters) Enterprise Platform.

Topics

Resources

Stars

54 stars

Watchers

16 watching

Forks

Releases

Packages

Used by

Contributors

Languages