feuGeneA / gdax-orderbook-hpp

An in-memory copy of the order book on the GDAX cryptocurrency exchange, updated in real time via WebSocket feed, exposed in a thread-safe and lock-free data structure.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A copy of the GDAX order book for the product given during construction, exposed as two maps, one for bids and one for offers, each mapping price levels to order quantities, continually updated in real time via the level2 channel of the Websocket feed of the GDAX API.

Spawns a separate thread to receive updates from the GDAX WebSocket Feed and process them into the maps.

To ensure high performance, implemented using concurrent data structures from libcds. The price->quantity maps are instances of cds::container::SkipListMap, whose doc says it is lock-free.

About

An in-memory copy of the order book on the GDAX cryptocurrency exchange, updated in real time via WebSocket feed, exposed in a thread-safe and lock-free data structure.


Languages

Language:C++ 100.0%