Code for the cryptomarketdepth.com website.
This website tracks the liquidity of cryptocurrencies over time. Specifically, it can answer the question "how much of a given cryptocurrency can I buy/sell right now while not moving its price by more than some specified percentage?".
For further details see this paper.
Services can be run using
docker-compose. The following command builds service images and runs the services:
docker-compose up --build
liquidity-service-process service is highly scalable. You can run multiple instances of this service to increase processing throughput like so:
docker-compose up --scale liquidity-service-process=10
Build and run all services using
docker-compose up -d --build
Run the command from the "run tests"-step in the GitHub Actions file.
Regularly fetches order books from multiple cryptocurrency exchanges and writes them to the database.
Creates “jobs” which describe -- among other things -- the cryptocurrency for which to calculate liquidity, and the input data (order books) for the calculation.
Atomically claims a job, performs the liquidity calculation described by the job, and writes the result to the database. This service is highly scalable, such that multiple instances of this service can run concurrently to process calculations in parallel.
Website backend HTTP API. Reads data from the database written by
liquidity-service-process and returns it as JSON.
Frontend code for the public website https://cryptomarketdepth.com/
Implements the graph algorithm used to calculate cryptocurrency liquidity, as described in this paper.
A library implementing a limit order book.
A library for fetching order books from several different cryptocurrency exchanges. Includes request rate limiting (on a per-exchange basis), as well as retrying failed requests (e.g. due to HTTP "too many requests"-error).
Database schema for
Translation of Sedgewick & Wayne's
BellmanFordSP.java implementation into Haskell.
Contains both schema and executables for the services