Crates.io | btrader |
lib.rs | btrader |
version | 0.2.0 |
source | src |
created_at | 2020-12-15 17:34:34.452581 |
updated_at | 2020-12-15 17:34:34.452581 |
description | Arbitrage trading bot for Binance |
homepage | https://github.com/gabriel-milan/btrader |
repository | https://github.com/gabriel-milan/btrader |
max_upload_size | |
id | 323213 |
size | 250,199 |
This is an arbitrage trading bot initially inspired by this JS implementation. For that reason, you'll find yourself comfortable with the configuration file for this if you have already tried the JS one.
For further information on the status of this bot, refer to Development status
First of all, it's important to say that the great bottleneck for triangle arbitrage is related to network delays, not software performance. If you'd like better results, my recommendation is to rent a server with the lowest latency to api.binance.com
as possible. In some places you'll find that the Binance servers may be located at Seattle(US), Tokyo(Japan) or even Isenburg(Germany). I haven't tried all locations, but I'm getting around 10ms latency on Saitama(Japan), which is probably fine.
Once you've decided what to do, generate your own configuration file, based on config/sample_config.json
. It's pretty straightforward, but if you have any doubts please refer to the JS implementation guide. For Telegram stuff, refer to the Telegram configuration section.
This method is the easy way to run this, but be aware that, by using Docker, performance may be a little worse. Use this for debugging purposes.
Please be sure that you have Docker installed and access to an user account with enough privilege to run containers.
Run the following command (note that $(pwd)/config.json
is the path to your configuration file!)
docker run --net host -it --name btrader -v $(pwd)/config.json:/config.json gabrielmilan/btrader
Note: the --net host
argument reduces networking overhead for the container.
This method envolves more steps, but it's recommended for performance.
Please be sure that you have Rust installed fully. If you don't, refer to Install Rust.
Clone this repository:
git clone https://github.com/gabriel-milan/btrader
cd
into the repository directory and run:cargo install --path .
btrader /path/to/your/configuration/file.json