pyrfa 8.5.3
Python API for Refinitiv (Thomson Reuters) Enterprise Platform
License: MIT
Keywords: refinitiv thomson reuters enterprise python rfa api feed elektron trep rmds rdfd ats market data

# PyRFA

[![version](https://img.shields.io/pypi/v/pyrfa.svg)](https://pypi.python.org/pypi/pyrfa)
[![pyversion](https://img.shields.io/pypi/pyversions/pyrfa.svg)](#platform-availability)
[![version](https://img.shields.io/pypi/format/pyrfa.svg)](https://pypi.python.org/pypi/pyrfa)
[![platform](https://img.shields.io/badge/platform-linux--64%20|%20win--64%20|%20win--32-lightgray.svg)](#platform-availability)
[![license](https://img.shields.io/pypi/l/pyrfa.svg)](LICENSE.txt)
[![downloads](https://img.shields.io/badge/downloads-76,843-green.svg)](http://devcartel.com/blog/14277235)

PyRFA is a Python API for accessing Refinitiv (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](http://media.virbcdn.com/cdn_images/resize_1024x1365/6d/64a90d875c40da95-ScreenShot2017-10-18at151123.png)

## 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](https://pypi.python.org/pypi/pyrfa) using `pip`:

    > pip install pyrfa

Windows users might need to install [Microsoft Visual C++ 2010 SP1 Redistributable Package (x64)](https://www.microsoft.com/en-us/download/details.aspx?id=13523) or [(x86)](https://www.microsoft.com/en-us/download/details.aspx?id=5555).

## Platform Availability

### Windows

| Version | Release Date | 64bit-Windows, Python 3.7 | 64bit-Windows, Python 3.6 | 64bit-Windows, Python 3.5 | 64bit-Windows, Python 3.4 | 64bit-Windows, Python 2.7 | 64bit-Windows, Python 2.6 | 32bit-Windows, Python 2.7 | 32bit-Windows, Python 2.6 |
| :-----: | :----------: | :-----------------------: | :-----------------------: | :-----------------------: | :-----------------------: | :-----------------------: | :-----------------------: | :-----------------------: | :-----------------------: |
|  8.5.3  |   9 Nov 18   |             ⚬             |             ⚬             |             ⚬             |             ⚬             |             ⚬             |             ⚬             |                           |                           |
|  7.7.0  |   17 Mar 17  |                           |                           |                           |                           |                           |                           |             ⚬             |             ⚬             |

### Linux

| Version | Release Date | 64bit-Linux, Python 3.7 | 64bit-Linux, Python 3.6 | 64bit-Linux, Python 3.5 | 64bit-Linux, Python 3.4 | 64bit-Linux/RHEL7, Python 2.7 | 64bit-Linux/RHEL6, Python 2.6 |
| :-----: | :----------: | :---------------------: | :---------------------: | :---------------------: | :---------------------: | :---------------------------: | :---------------------------: |
|  8.5.3  |   9 Nov 18   |            ⚬            |            ⚬            |            ⚬            |            ⚬            |               ⚬               |               ⚬               |

## Example

```python
import pyrfa
p = pyrfa.Pyrfa()
p.createConfigDb("./pyrfa.cfg")
p.acquireSession("Session1")
p.createOMMConsumer()
p.login()
p.directoryRequest()
p.dictionaryRequest()
p.marketPriceRequest("JPY=,EUR=")
end = False
while not end:
    try:
        for data in p.dispatchEventQueue(10):
            print(data)
    except KeyboardInterrupt:
        end = True
```

Output:

```python
...
{'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:

-   Community support - [GitHub](https://github.com/devcartel/pyrfa)
-   [PyRFA Enterprise Support](http://devcartel.com/pyrfa-enterprise) - access to [private GitHub](https://github.com/devcartel/pyrfa-enterprise) for Early Access releases, complete documentation and Replay Service
-   [Issue tracker](https://github.com/devcartel/pyrfa/issues)