• PyRFA Download Statistics (November 2016)

    Since the released of our PyRFA which recently supports Python 3.5, we have collected the download popularity and statistics as illustrated below:

    • The most popular platform: Windows (64bit)
    • The most popular Python version: Python 2.7

    PyRFA for Windows vs. Linux Downloads

    PyRFA Downloads by Python Versions

    PyRFA for Windows 64bit vs. 32bit Downloads

    PyRFA Downloads by Platforms

  • PyRFA 8.0.1.0 Release

    In 8.0.1.0, PyRFA brings a new capability for market price subscription where it can invoke server-side field filtering upon subscription. The market data updates will contain only fields of interest. This is called "View." With this new feature, PyRFA aims to reduce bandwidth used in very volatile market data updates. Also, we have qualified our builds with Red Hat Enterprise Linux 7.

    What's new:

    • Supports FID filtering subscription with View
    • Updates RDMDictionary and enumtype.def
    • Compiled with RFA 8.0.1.L1
    • Qualified with RHEL7

    Downloads are available at https://github.com/devcartel/pyrfa.

  • PyRFA Download Statistics (February 2016)

    PyRFA is widely picked up by many finance tech developers around the world. It's been downloaded more than 600 times and counting since we released it to the public in 2013. We have been collecting the API download statistics for a while now and we think it is interesting in terms of OSes and platform people are developing application with PyRFA. These stats help us prioritize our future API releases and to help us focus on our QA process and platform extension. Here are some key takeaway:

    • The most popular platform: Windows (64bit)
    • The most popular Python version: Python 2.7

     

    PyRFA for Windows vs. Linux Downloads

     

    PyRFA Downloads by Python Versions

     

    PyRFA for Windows 64bit vs. 32bit Downloads

     

    PyRFA Downloads by Platforms

  • Print GitHub Markdown as PDF

    We have this little, handy Javascript in our browser bookmark when we need to print GitHub markdown files to PDF. In order to print as PDF in our brower, we need to remove all unnecessary HTML and CSS from GitHub page. That Javascript is:

    javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22http://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push,%20.wiki-actions,%20%23last-edit,%20.actions,%20.header,.site-footer,.repository-sidebar,.file-navigation,.commit-tease,.gh-header-meta,.gh-header-actions,#wiki-rightbar,#wiki-footer').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D);%20$('link').removeAttr('media');%7D); var removeMe = document.getElementsByClassName("file-header")[0]; removeMe.parentNode.removeChild(removeMe);

    Copy and make a bookmark of this script then go to your markdown page then click that saved bookmark. Voila! Clean and ready to print as PDF from your web browser.

  • PyRFA 8.0.0 Dropping Support for RHEL5 and 32-bit Systems

    Recent release of PyRFA 8.0.0 (and forward) has dropped support for 32-bit and RHEL5. It supports only 64-bit systems on both Windows and Linux. The reason to drop the support on 32-bit depends on Thomson Reuters RFA C++ libraries that we use to build PyRFA. And since Thomson Reuters has decided not to include the libraries, PyRFA is affected this way.

    Feature-wise, we will keep maintaining version 7.6.1 as it is the last version with 32-bit and RHEL5 support. All future bug fixes and enhancement made to 8.0.0 will also be ported back to 7.6.1.

    For this case, 7.6.1.3 releases also change the data output format into a pure dictionary just like in 8.0.0.

    Thanks for using PyRFA!

  • PyRFA 8.0.0 Data Output Change

    In PyRFA 8.0.0 onwards, we have changed data output from dispatchEventQueue() to contain only dictionary. This enables Python users to parse and use data more efficiently.

    In previous 7.6.0:

    ('NIP', 'EUR=', {'ASK': '0.999', 'ASK_TIME': '13:41:32:120', 'BID': '0.988', 'BID_NET_CH': '0.0041'})

    Now in 8.0.0:

    {'MTYPE':'IMAGE','RIC':'EUR=','SERVICE':'IDN_RDF_SDS','ASK':1.3712,'BID':1.3709}
  • Making Mac Terminal and Windows CMD Support Unicode Charset Display in Python 3

    According to Python 3 unicode character representation, It is possible for the user to confront with Python exception when Terminal is trying to display such unicode data from Pyrfa. Here is the error:

    UnicodeEncodeError: 'ascii' codec can't encode character '\u21e7' in position 1: ordinal not in range(128)

    In this case the '\u21e7' is a unicode for an arrow character. It is a mandatory for the PyRFA users to configure their terminal in order to display these charset according to the Python 3 unicode support. Each of platform can properly display unicode via commands as follows:

    Unix:

    $ export PYTHONIOENCODING=utf-8
            

    Windows

    C:\> chcp 65001
  • Expanding Thomson Reuters Elektron Chain RICs with PyRFA

    We got an inquiry today regarding using our PyRFA to expand chain RICs. Here is the methods of expanding chain RICs that we delivered for a bank who used TREP-RT. Chains are comprised of RICs put in a FID LINK_ or LONGLINK divided into pages. Keep looking at NEXT_LR FID for the next chain RIC page and continue extracting actual RIC. Here are some Python code we used:

    def expandChainRIC(self, chainRIC):
            expanded = []
            done = False
            snapshot = self.snapshotRequest([chainRIC])
            while not done:
                if not snapshot:
                    break
                for i in ['LINK_1', 'LINK_2', 'LINK_3', 'LINK_4', 'LINK_5', 'LINK_6', 'LINK_7', 'LINK_8', 'LINK_9', 'LINK_10', 'LINK_11', 'LINK_12', 'LINK_13', 'LINK_14', 'LONGLINK1', 'LONGLINK2', 'LONGLINK3', 'LONGLINK4', 'LONGLINK5', 'LONGLINK6', 'LONGLINK7', 'LONGLINK8', 'LONGLINK9', 'LONGLINK10', 'LONGLINK11', 'LONGLINK12', 'LONGLINK13', 'LONGLINK14']:
                    if snapshot[0][2].has_key(i) and snapshot[0][2][i]:
                        expanded.append(snapshot[0][2][i])
                if snapshot[0][2].has_key('NEXT_LR') and snapshot[0][2]['NEXT_LR']:
                    snapshot = self.snapshotRequest([snapshot[0][2]['NEXT_LR']])
                elif snapshot[0][2].has_key('LONGNEXTLR') and snapshot[0][2]['LONGNEXTLR']:
                    snapshot = self.snapshotRequest([snapshot[0][2]['LONGNEXTLR']])
                else:
                    done = True
            # if chainRIC is not a chain, return itself back
            if not expanded:
                expanded.append(chainRIC)
            if self.debug:
                print "[debug] Expand chain " + chainRIC + " -> " + str(expanded)
            return expanded


    And

    def snapshotRequest(self, ricList):
            snaphots = ()
            self.pyrfa.log("Subscribing items: " + str(ricList) + " (total: " + str(len(ricList)) + " )")
            for ric in ricList:
                self.pyrfa.marketPriceRequest(ric)
            global end
            end = False
            t = threading.Timer(10, stop)
            t.start()
            imageReceived = 0
            while not end and imageReceived < len(ricList):
                images = self.pyrfa.dispatchEventQueue()
                if images:
                    for i in images:
                        if type(i[2]) is dict:
                            imageReceived += 1
                            snaphots += (i,)
                            t.cancel()
                            t = threading.Timer(10, stop)
                            t.start()
            self.pyrfa.log("Snapshots received: " + str(imageReceived))
            t.cancel()
            return snaphots