Skip to main content

Arbitrage trading bot for Binance, based on https://github.com/bmino/binance-triangle-arbitrage

Project description

bTrader

This is an arbitrage trading bot based on this JS implementation. For that reason, the configuration files for both of them are compatible.

For further information on the status of this bot, refer to Development status

Steps to run the bot

Two-step process:

  1. Read the configuration guide from here. I was lazy to write one of my own, so you can read it from the JS implementation repository. After that, generate your own configuration file or just edit the one on the config/ directory on this repository. Note #1: Telegram bot is not available on the JS implementation. For that reason, nothing on their original configuration file refers to that. If you plan on using Telegram, please read the Telegram configuration section. Note #2: Not all of the variables on their original configuration file are being used. For further information, read the Config file compatibility section.

  2. (Recommended) Use the Docker image ($(pwd)/config.json is the path to your configuration file):

docker run -it --name btrader -v $(pwd)/config.json:/config.json gabrielmilan/btrader
  1. (Few more steps) Use the Python package:
python3 -m pip install btrader
python3
>>>> from btrader import bTrader
>>>> bot = bTrader("config.json")
>>>> bot.run()

Development status

  • C++ implementation of calculations
  • Monitoring websockets
  • Computing profits over all possible triangles
  • Filtering and showing viable operations
  • Implement asset step size
  • Structure for holding trading actions and quantities
  • Perform trading actions
  • Checking configuration file
  • Compatibility for LOG.LEVEL
  • Compatibility for TRADING.EXECUTION_STRATEGY and TRADING.EXECUTION_TEMPLATE
  • Best deals printing
  • Telegram bot
  • Generate binary distributions

Config file compatibility

  • KEYS
  • INVESTMENT
  • TRADING [ENABLED, EXECUTION_CAP, TAKER_FEE, PROFIT_THRESHOLD, AGE_THRESHOLD]
  • TRADING [EXECUTION_STRATEGY, EXECUTION_TEMPLATE]
  • HUD
  • LOG
  • DEPTH [SIZE]
  • DEPTH [PRUNE, INITIALIZATION_INTERVAL]
  • TIMING

Telegram configuration

  • Generate a bot token with BotFather (official tutorial here)
  • (Optional) Get your Telegram user ID with the @userinfobot
  • Fill the configuration file with your data
  • Send /start to your bot on Telegram so it can identify you as the main user (by doing this or configuring user ID on the config file, the bot will only respond to you)
  • Bot will notify you about executed trades or discovered deals, according to your config file
  • You can check the average/std/best age of deals by sending /age

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

btrader-0.1.5.tar.gz (389.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page