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 details)

Uploaded Source

File details

Details for the file btrader-0.1.5.tar.gz.

File metadata

  • Download URL: btrader-0.1.5.tar.gz
  • Upload date:
  • Size: 389.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.3

File hashes

Hashes for btrader-0.1.5.tar.gz
Algorithm Hash digest
SHA256 47a10e9ed324e8195b207a45388eeeb4f3a35e4059f8d3f870e9367d8e47f14a
MD5 e0fb8ce39fc175e9c1a7d2f57b178360
BLAKE2b-256 f67c40d7aeaf6703b518eba3626459613441fe1fdc0420fe1d836bff97e4295f

See more details on using hashes here.

Supported by

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