Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Libtrading, an ultra low-latency trading connectivity library for C and C++.
C Makefile C++
Branch: master

This branch is 11 commits behind libtrading:master

Merge "add fix_session.h to installed headers" from @iamthebot

 "Current Makefile wasn't installing fix_session.h. This behavior doesn't seem
  intentional since fast_session.h is installed."

Signed-off-by: Pekka Enberg <penberg@iki.fi>
latest commit 9245b69e5b
@penberg authored

README.md

Libtrading

Build Status

Libtrading is an open source API for high-performance, low-latency trading applications. It implements network protocols used for communicating with exchanges, dark pools, and other trading venues. The API supports FIX, FIX/FAST, and many proprietary protocols such as ITCH and OUCH used by NASDAQ.

Features

  • C API
  • High performance, low latency
  • FIX dialect support
  • SystemTap/DTrace probes

Install

Install prerequisite packages:

Debian

$ apt-get install pkg-config libxml2-dev libglib2.0-dev libncurses5-dev \
    python-yaml libevent-dev

Fedora

$ yum install zlib-devel libxml2-devel glib2-devel vim-common ncurses-devel \
    python-yaml libevent-devel

Then run:

$ make install

You can also run the test harness:

$ make check

Usage

To measure FIX engine performance locally, start a FIX server:

$ ./tools/fix/fix_server -m 1 -p 7070
Server is listening to port 7070...

and then run the FIX client latency tester against it:

$ ./tools/fix/fix_client -n 100000 -m order -p 7070 -h localhost
Client Logon OK
Messages sent: 100000
Round-trip time: min/avg/max = 15.0/16.8/129.0 μs
Client Logout OK

Documentation

Performance

Protocol RTT (μs)
FAST 13
FIX 15

The following above were obtained by running Libtrading messaging ping-pong tests on a 2-way 2.7GHz Sandy Bridge i7 CPU running Fedora 19 with Linux 3.11.6. The processes were pinned to separate physical cores and the numbers include time spent in the Linux TCP/IP stack.

FIX engine round-trip time frequency plot for the above looks as follows:

License

Copyright (C) 2011-2014 Pekka Enberg and contributors

Libtrading is distributed under the 2-clause BSD license.

Contributors

  • Denis Ivaykin
  • Marat Stanichenko
  • Jussi Virtanen
Something went wrong with that request. Please try again.