Skip to content

Latest commit

 

History

History
63 lines (43 loc) · 1.62 KB

README.md

File metadata and controls

63 lines (43 loc) · 1.62 KB

CircleCI

Market depth analysis

This library implements the algorithm described in this paper. See this paper's abstract for a brief introduction.

Running

  1. Install the Haskell build tool Stack
  2. Run the following commands:
git clone https://github.com/runeksvendsen/order-graph.git
cd order-graph/
stack setup
  1. Install external dependencies
sudo apt-get install build-essential libgmp3-dev zlib1g-dev
  1. Build CLI executable:
stack build
  1. Grab a cup of coffee

  2. Run CLI executable:

stack run -- <CLI arguments go here>

For example, to see the buy/sell liquidity of bitcoin in terms of US Dollars at 5% slippage using the small test data file test/data/run1-1.json, run the command:

stack run -- -n usd -c btc -s 5 --analyze test/data/run1-1.json

which will output:

Order book file          test/data/run1-1.json
Market (base/quote)      BTC/USD
Maximum slippage         5%
buy liquidity            18,050,706 USD
sell liquidity           16,228,938 USD
SUM                      34,279,645 USD
-----------------------------------------------------

Input data

Input order books can be fetched using the WriteTestData executable from crypto-venues.

TODO

  • Testing:
    • For all cryptocurrency/numeraire/run: liquidity as a function of slippage is monotonically increasing