Skip to content

mkbeh/arb-bot-rs

Repository files navigation

arb-bot-rs

GitHub CI

Arbitrage bot is a high-frequency arbitrage trading system that automatically identifies and executes profitable triangular arbitrage opportunities on cryptocurrency exchanges.

Full documentation of the project can be found here.

Supports

List of supported cryptocurrency exchanges.

Exchange Status
Binance

Content

Installation

Application is written in Rust, so you'll need to grab a Rust installation in order to compile it. Application compiles with Rust 1.88.0 (stable) or newer.

Build from source

git clone https://github.com/mkbeh/arb-bot-rs.git
cd arb-bot-rs
cargo build --release

Usage

Fill in the example config file and rename the file to config.toml.

For a test run, you do not need to specify your API tokens. You only need to specify API tokens if you toggle the flag send_orders = true.

Run app:

target/release/bot 2>&1 | tee debug_$(date "+%Y.%m.%d-%H.%M.%S").log

Docker

Build image:

docker build --build-arg SERVICE_NAME=bot --build-arg BUILD_PROFILE=release -t arb-bot-rs:latest .

Run app:

docker run --cpus="1" --cpuset-cpus="0" --memory="512m" arb-bot-rs:latest

Monitoring

Grafana Prometheus

The bot's core performance is monitored in real-time using a Grafana dashboard, providing deep insights into market data processing and arbitrage efficiency.

📊 Key Metrics Tracked

  • Market Data Intensity:

    • Total rate of order book update events from exchanges.
    • The most active trading pairs by update frequency.
  • Arbitrage Engine Performance:

    • How many potential arbitrage chains the engine analyzes per second.
    • The most frequently processed and profitable currency chains.
  • Trading Strategy Effectiveness:

    • The percentage of profitable chains found versus all chains processed.
    • The absolute count of profitable opportunities identified.
  • Order Execution Status:

    • A real-time log of the most recent order execution attempts (success, failure, cancelled).

Dashboard Preview

The dashboard provides a live look at the bot's decision-making process and market impact.

img

Live dashboard showing market data throughput, arbitrage processing rates, and trading performance.

Running tests

Application is relatively well-tested, including both unit tests and integration tests. To run the full test suite, use:

cargo test --all

Translations

The following is a list of known translations of application documentation.