Skip to content

strcat32/limit-order-book

 
 

Repository files navigation

Limit Order Book

build-status PackageVersion PythonVersion Stable Format License

This is an implementation of the limit order book with a price-time priority matching policy for reception of market data streams. There are APIs for C++, C, and Python.

Additions

Some small additions to be able to modify orders

  • modify()
  • get_quantity(order_id)
  • get_price(order_id)
  • get_side(order_id)
  • expose reduce() to python

-- strcat32

Usage

C++

Simply add include/*.hpp to your C++ project either by copying directly or using git submodules.

C

A C-level API is defined in include/lib_lob.hpp.

Python

The preferred Python installation of limit-order-book is from pip:

pip install limit-order-book

Usage Caveats

Windows

You'll need to install the Visual-Studio 17.0 tools for Windows installation. The Visual Studio Community package provides these tools for free.

Development

Testing

To run all the unit-test suites, run:

make test

C++

To run the C++ unit-test suite, run:

scons test

Python

To run the Python unit-test suite, run:

python -m unittest discover .

Benchmarking

C++

To run the C++ benchmark code, run:

scons benchmark

About

A C++ and Python implementation of the limit order book.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • C++ 59.8%
  • xBase 16.2%
  • Python 14.2%
  • CSS 4.7%
  • C 3.5%
  • HTML 1.2%
  • Makefile 0.4%