Thomson Reuters Feed API for Python

Allows accessing Thomson Reuters Market Data system with Python language. PyRFA enables Python programmers access crucial real-time market information from Thomson Reuters global data feeds and leverage on Python's vast mathematics and algorithmic libraries. Either you want to incorporate market data into quant modeling or embed it in a web site, it's never been easier.


RFA Interfaces
PyRFA hides complicated layers of RFA classes, take care of redundant function calls in C, internally encode/decode messages and expose the simplest interfaces to a user and yet maintain strict concepts of RFA such as Session, Config Database, Event Queue.

Why Python?
Python programming language works well with C/C++ libraries like RFA. Its core libraries allow building extension in C++ and export interfaces to Python. With huge range of supported libraries, users find Python is a language of choice when building either a standalone application or web framework with scalability and robustness.

Threading Model
PyRFA extensively implements RFA threading models to ensure that a user can still select between latency or throughput constraints at the configuration level.

C/C++ Underneath
Our design pattern ensures PyRFA performance to be close to a native RFA C++ application.

PyRFA is free software and released under MIT License.

But Why Free?
It is made out from our own needs and we use it in-house extensively.

Latest Update
Read our changelog.


Streaming or Snapshot
Supports market price, depth and order book subscription via OMM messaging.

Supports native Thomson Reuters DAC auth including Username, Position and App ID.

Ability to download and decode time-series data from TS1 service with selectable peroid.
See an example.

Data Publication
Full-cached non-interactive data publication capability for standard OMM level 1, 2, depth, order book, symbol list and service directory.

Build Your Own Historical Database

Only with PyRFA that allows you to build your own indexed time-series and store the data in TREP-RT platform for internal distribution leveraging on OMM custom domain.

Linux vs. Windows
PyRFA supports for both 32/64bit Windows and 64bit Linux. Requires Python 2.6 or later.

Python Data Type
PyRFA outputs decoded data into native Python data type such as tuple and dict allowing quick access of data records.

Other Goodies
Include dictionary download, symbol list, service direcotry listing, NIC binding, logging and more.

Example Script

import threading
import sys
import pyrfa
p = pyrfa.Pyrfa()

# run for N millisecs, parse updates and display on stdout
def stop():
    global end
    end = True

end = False
t = threading.Timer(3, stop)

while not end:
    updates = p.dispatchEventQueue(100)
    if updates:
        print ""
        for u in updates:
            print u[0],"-",u[1]
            if type(u[2]) is str:
                print u[2].rjust(15)
                for k,v in u[2].items():
                    print k.rjust(15),v
            print ""

# explicitly call close request

################ OUTPUT #####################

ACVOL_1 1104.0
RDPRC_1 4.128
ASK 0.999
ASK_TIME 14:49:07:086
BID 0.988
 BID_NET_CH 0.0041

  Download from our public releases

pyrfa7.6.1.2 64bit | 32bit (Python 2.7)
pyrfa7.6.1.2 64bit | 32bit (Python 2.6)

pyrfa7.6.1.2 64bit (Python 2.7 + GCC 4.4)
pyrfa7.6.1.2 for RHEL 5 64bit (Python 2.4 + GCC 4.1.2)
pyrfa7.6.1.1 for RHEL 6.4 64bit (Python 2.6 + GCC 4.4)

Visit API docs page
 or ask support on GitHub