• This repository has been archived on 30/Oct/2023
  • Stars
    star
    285
  • Rank 145,115 (Top 3 %)
  • Language
    Rust
  • License
    GNU General Publi...
  • Created over 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Triangle arbitrage trading bot for Binance

bTrader

Build Status Crate Docker Image

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

Please support the project

If you've enjoyed bTrader, please consider supporting its development:

Buy Me A Coffee

Steps to run the bot

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.

The Docker method (easy way)

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.

  1. Please be sure that you have Docker installed and access to an user account with enough privilege to run containers.

  2. 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.

Compile and install (recommended)

This method envolves more steps, but it's recommended for performance.

  1. Please be sure that you have Rust installed fully. If you don't, refer to Install Rust.

  2. Clone this repository:

git clone https://github.com/gabriel-milan/btrader
  1. cd into the repository directory and run:
cargo install --path .
  1. You can then execute it by doing:
btrader /path/to/your/configuration/file.json

Telegram configuration

  • Generate a bot token with BotFather (official tutorial here)
  • Get your Telegram user ID with the @userinfobot
  • Fill the configuration file with your data (if you fill your user ID incorrectly, it will send messages to someone else!)
  • Bot will notify you about executed trades or discovered deals, according to your config file

Development status

  • Refactor from Python + Boost to Rust
  • Publish on crates.io (waiting on wisespace-io/binance-rs#60)
  • Configuration file checking
  • Speed things up by computing trades in parallel
  • Generate binary distributions

More Repositories

1

geolocate

Georeferencing large amounts of data for free.
Python
31
star
2

esp32_ulp_hall_wakeup

A short simple code to wake ESP32 up using a hall sensor threshold
Assembly
26
star
3

TinyMPU6050

Tiny implementation for MPU6050 focusing on performance and accuracy
C++
22
star
4

espGarden

An automatic gardening system using ESP32
C++
9
star
5

sailboat-playground

A very simple framework for developing autonomous sailing algorithms and testing them with 2D simulations/visualizations.
Python
5
star
6

maestro

Command line interface for the LPS Cluster @ UFRJ
Python
5
star
7

Legal_Word2Vec

A word2vec model that uses brazilian legal vocabulary as input data, focusing on uses for legaltechs.
Julia
3
star
8

sotaque-brasileiro

Uma base de dados para estudo de regionalismos brasileiros atravΓ©s da voz.
Python
2
star
9

eAlfred

eAlfred stands for "Electronic Alfred", a butler for electronic devices on your home.
Python
2
star
10

SBERTOS

A very simple implementation of a RTOS with a non-preemptive scheduler meant to be compatible with both AVR- and ESP8266-based boards
C++
2
star
11

traefik-django-forward-auth

A simple Django application for providing a Traefik ForwardAuth middleware (https://doc.traefik.io/traefik/middlewares/http/forwardauth/).
Python
2
star
12

robotic-sailboat

This repository aims to share knowledge about robotic sailboats, since it's a subject of my personal interest. The content here has been developed by me and, as I'm an Electronic and Computer Engineering student, some of it may have mistakes, please keep aware and warn me about something messed up.
2
star
13

cocalc-atlas

Shell
1
star
14

action-pylint

Runs pylint and sends errors in a PR message
JavaScript
1
star
15

SousVide_ESP32

Personal project for building a homemade "sous vide" setup.
C++
1
star
16

smtr_challenge

This repo contains my solution for a challenge proposed in the selection process for Data Engineer at SMTR (Secretaria Municipal de Transportes do Rio)
Python
1
star
17

uptime-bot

Bot for checking servers uptime using custom IPs and ports
Python
1
star
18

comp-soc

Python
1
star
19

advent-of-code

Solutions for Advent of Code
Rust
1
star
20

software-quality

Repository for the Software Quality course (COS482) at Federal University of Rio de Janeiro
Java
1
star