Menu

Home

Pavel Patarinski

Overview

BlpBridge is an open source bridge implementation. It gives the ability of OpenMAMA client application
to subscribe for Market Data and/or request Reference Data from Bloomber Data Server.

Supported Platforms

  • Linux
  • Windows - will be supported soon

Dependencies:

Obtain BlpBridge source

BlpBridge Directory Structure

Tree Description
CMakeLists.txt CMake file
README this file
LICENSE License
openmama.patch patch file for OpenMAMA
bridge bridge library source and header files
payload payload library source and header files
cmake CMake files
Patch OpenMAMA

In BlpBridge source package you will find openmama.patch file. Extract OpenMAMA archive and
apply patch file openmama.patch. Usually:
#> cd OpenMAMA-2.1.1.2
#> patch -p1 < /path/to/blpbridge/source/dir/openmama.patch

Follow up the instructions from README file in OpenMAMA source directory in order to build
and install patched version.

Export environment variables

BlpBridge depends on OpenMAMA (patched) and Blpapicpp.

  • If OpenMAMA patched version installed (see previous section) is not in /usr:/usr/local then export OPENMAMA_DIR variable:
    #> export OPENMAMA_DIR=/path/to/openmama/install/dir

  • If Blpapicpp is not extracted in /usr:/usr/local or BlpapiSimul (see BlpapiSimul section) is not installed in /usr:/usr/local, then export BLPAPI_CPP_DIR variable
    with Blpapicpp:
    #> export BLPAPI_CPP_DIR=/path/to/blpapicpp/source/dir
    #> cd ${BLPAPI_CPP_DIR}/Linux
    #> ln -s libblpapi3_XX.so libblpapi3.so
    or with BlpapiSimul:
    #> export BLPAPI_CPP_DIR=/path/to/blpapisimul/install/dir

Build and install BlpBridge

  1. Create build directory:
    #> mkdir build-dir && cd build-dir

  2. Prepare build direcotry:
    #> cmake /path/to/blpbridge/source/dir [-DCMAKE_INSTALL_PREFIX=/path/to/install/dir] [-DCMAKE_BUILD_TYPE=Release]
    (Use ccmake or other tool to setup build options and correct directories.)

  3. Build and install:
    #> make
    #> make install

Run OpenMAMA examples

Configure mama.properties file
  • If BlpBridge is linked with Blpapicpp library, then transport settings must be added to mama.properties file. Enviroment variable WOMBAT_PATH must be exported in order to make OpenMAMA read properties file.

#> export WOMBAT_PATH=${OPENMAMA_DIR}/examples/mama/c

Edit ${WOMBAT_PATH}/mama.properties. Append the following line:
mama.blp.transport.blp_tport.url=host[:port]

  • If BlpBridge is linked with BlpapiSimul library, mama.properties file is not needed.
Run examples

#> cd ${OPENMAMA_DIR}

  1. mamalistenc. Market Data subscription:
    #> bin/mamalistenc -m blp -tport blp_tport -B -S MktData -s "VOD LN Equity"

    • with field filter:
      #> bin/mamalistenc -m blp -tport blp_tport -B -S MktData -s "VOD LN Equity [BID, ASK, BEST_BID, BEST_ASK]"

    • with update interval option set to 5 sec.:
      #> bin/mamalistenc -m blp -tport blp_tport -B -S MktData -s "VOD LN Equity {interval=5.0}"

    • with field filter and interval option:
      #> bin/mamalistenc -m blp -tport blp_tport -B -S MktData -s "VOD LN Equity [BID, ASK, BEST_BID, BEST_ASK]{interval=5.0}"

  2. mamalistenc. Reference Data subscription:
    #> bin/mamalistenc -m blp -tport blp_tport -B -S RefData -s "VOD LN Equity [PX_ASK, PX_BID]"

  3. mamaproxyc. Market Data subscription published on Avis Router.
    #> bin/mamaproxyc -ms blp -mp avis -SS MktData -s "VOD LN Equity" -SP MktData

    and then multiple mamalistenc client connected to Avis Router:
    #> bin/mamalistenc -m avis -B -S MktData -s "VOD LN Equity"

The last example shows how BlpBridge may be used in conjunction with Avis implementation. The result is all data coming from
Bloomber Terminal is published on Avis Router and then multiple clients can subscribe for it with Avis bridge.

BlpapiSimul library (optional)

BlpapiSimul is developed for testing purposes of BlpBridge. The library is replacement of original Blpapicpp library.
libblpapi3_XX.so => libblpapi3.so

Download and extract BlpapiSimul

#> wget http://sourceforge.net/projects/blpbridge/files/blpapisimul-1.0.tar.bz2
#> tar -jxf blpapisimul-1.0.tar.bz2
Note: If you are using git, it is in same directory as BlpBridge

Build and install BlpapiSimul
  1. Create build directory:
    #> mkdir build-dir && cd build-dir

  2. Prepare build directory:
    #> cmake /path/to/blpapisimul/source/dir -DBLPAPI_CPP_INCLUDE_DIR=/path/to/blpapicpp/source/dir/include [-DCMAKE_INSTALL_PREFIX=/path/to/install/dir] [ -DCMAKE_BUILD_TYPE=Release]
    (Use ccmake or other tool to setup build options and correct directories.)

  3. Build and install:
    #> make
    #> make install


MongoDB Logo MongoDB