Code Monkey home page Code Monkey logo

btrader's Introduction

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

btrader's People

Contributors

gabriel-milan avatar mend-bolt-for-github[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.