GitHub - Cabbache/arbitrengine: Arbitrage engine

1 min read Original article ↗

Description

A graph based arbitrage calculator with state updates. Uses petgraph::algo::bellman_ford::find_negative_cycle

Running

Build from source

# Clone the repository
git clone https://github.com/Cabbache/arbitrengine
cd app

# Run the project
cargo run --release

With docker

docker pull cabbache/arbitrengine
docker run -it -d -p 5000:5000 --rm cabbache/arbitrengine
netcat 127.0.0.1 5000

Usage

Example

Every line is a state update that can contain one or more comma separated currency pairs in this format: <FROM_ASSET>/<TO_ASSET>/<rate>. Any arbitrage cycles within the updated state will be listed in this format: CYCLE <asset path> <rate>

Issues