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.

Content

Supports

List of supported cryptocurrency exchanges.

Exchange Status
Binance
Kucoin

❤️ Support Us – Become Part of the Magic!

Open-source projects thrive because of visionaries like you. If this code has sparked a flame of inspiration in your heart, share the spark! Your crypto support is the fuel for new features, bug fixes, and groundbreaking updates. We accept donations in BTC, ETH, and USDT – simple, swift, and borderless.

Crypto Address QR Code
Bitcoin (BTC) bc1qw0sz039alzpmk2qcg549pwv3vd0e6casj5dstp
Ethereum (ETH) 0x00875cdA702B0e6fba3AdeaA6bEB585Db3a7f0f1
Tether (USDT) 0x00875cdA702B0e6fba3AdeaA6bEB585Db3a7f0f1 (ERC-20)

Every satoshi, every ether – it's a step toward something greater. Thank you for believing in openness! 🌍✨

Become a Star: A GitHub star is free, but it means the world. ⭐

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.90.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 demo 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 in config.toml.

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

Metric Description
📈 Market Data Intensity
- Total rate of order book update events from exchanges 🔄 Rate of updates received from various exchanges.
- The most active trading pairs by update frequency 💱 Top pairs with the highest volume of order book changes.
⚡ Arbitrage Engine Performance
- How many potential arbitrage chains the engine analyzes per second ⏱️ Chains processed per second for opportunity detection.
- The most frequently processed and profitable currency chains 💰 Top chains by frequency and average profitability.
🎯 Trading Strategy Effectiveness
- The percentage of profitable chains found versus all chains processed 📊 Success rate of profitable detections (%).
- The absolute count of profitable opportunities identified ✅ Total number of viable arbitrage opportunities found.
🛠️ Order Execution Status
- A real-time log of the most recent order execution attempts (success, failure, cancelled) 📝 Latest executions with status and timestamps.

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.

License

License: MIT

This project is open source and distributed under the MIT license. You are free to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the project, subject to the conditions of retaining the copyright notice.

Full details in the LICENSE file.

"Code is poetry. Share it generously!" — inspired by Richard Stallman (with a twist 😉)