{"id":13449680,"url":"https://github.com/gabriel-milan/btrader","last_synced_at":"2025-03-22T22:33:37.963Z","repository":{"id":53783028,"uuid":"287269331","full_name":"gabriel-milan/btrader","owner":"gabriel-milan","description":"Triangle arbitrage trading bot for Binance","archived":true,"fork":false,"pushed_at":"2021-05-30T18:29:56.000Z","size":1245,"stargazers_count":307,"open_issues_count":0,"forks_count":67,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-01T21:16:41.077Z","etag":null,"topics":["arbitrage-trading-bot","binance","bot","telegram-bot","trading"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gabriel-milan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-13T12:08:24.000Z","updated_at":"2025-02-24T20:59:52.000Z","dependencies_parsed_at":"2022-08-30T08:22:14.863Z","dependency_job_id":null,"html_url":"https://github.com/gabriel-milan/btrader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabriel-milan%2Fbtrader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabriel-milan%2Fbtrader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabriel-milan%2Fbtrader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gabriel-milan%2Fbtrader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gabriel-milan","download_url":"https://codeload.github.com/gabriel-milan/btrader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245029279,"owners_count":20549681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arbitrage-trading-bot","binance","bot","telegram-bot","trading"],"created_at":"2024-07-31T06:00:51.316Z","updated_at":"2025-03-22T22:33:37.540Z","avatar_url":"https://github.com/gabriel-milan.png","language":"Rust","funding_links":["https://www.buymeacoffee.com/gabrielmilan"],"categories":["Backtesting and Live Trading","Backtest + live trading","Open source bots"],"sub_categories":["Cryptocurrencies","Crypto currency focus"],"readme":"# bTrader\n\n[![Build Status](https://travis-ci.org/gabriel-milan/btrader.png?branch=master)](https://travis-ci.org/gabriel-milan/btrader)\n[![Crate](https://img.shields.io/crates/v/btrader)](https://crates.io/crates/btrader)\n[![Docker Image](https://img.shields.io/docker/v/gabrielmilan/btrader?logo=docker\u0026sort=date)](https://hub.docker.com/r/gabrielmilan/btrader)\n\nThis is an arbitrage trading bot initially inspired by this [JS implementation](https://github.com/bmino/binance-triangle-arbitrage). For that reason, you'll find yourself comfortable with the configuration file for this if you have already tried the JS one.\n\nFor further information on the status of this bot, refer to [Development status](#development-status)\n\n## Please support the project\n\nIf you've enjoyed bTrader, please consider supporting its development:\n\n\u003ca href=\"https://www.buymeacoffee.com/gabrielmilan\" target=\"_blank\"\u003e\u003cimg src=\"https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\" alt=\"Buy Me A Coffee\" style=\"height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;\" \u003e\u003c/a\u003e\n\n## Steps to run the bot\n\nFirst 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.\n\nOnce 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](https://github.com/bmino/binance-triangle-arbitrage/blob/master/config/readme.md). For Telegram stuff, refer to the [Telegram configuration](#telegram-configuration) section.\n\n### The Docker method (easy way)\n\nThis 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.\n\n1. Please be sure that you have Docker installed and access to an user account with enough privilege to run containers.\n\n2. Run the following command (note that `$(pwd)/config.json` is the path to your configuration file!)\n\n```\ndocker run --net host -it --name btrader -v $(pwd)/config.json:/config.json gabrielmilan/btrader\n```\n\n**Note**: the `--net host` argument reduces networking overhead for the container.\n\n### Compile and install (recommended)\n\nThis method envolves more steps, but it's recommended for performance.\n\n1. Please be sure that you have Rust installed fully. If you don't, refer to [Install Rust](https://www.rust-lang.org/tools/install).\n\n2. Clone this repository:\n\n```\ngit clone https://github.com/gabriel-milan/btrader\n```\n\n3. `cd` into the repository directory and run:\n\n```\ncargo install --path .\n```\n\n4. You can then execute it by doing:\n\n```\nbtrader /path/to/your/configuration/file.json\n```\n\n## Telegram configuration\n\n- Generate a bot token with BotFather (official tutorial [here](https://core.telegram.org/bots#6-botfather))\n- Get your Telegram user ID with the @userinfobot\n- Fill the configuration file with your data (if you fill your user ID incorrectly, it will send messages to someone else!)\n- Bot will notify you about executed trades or discovered deals, according to your config file\n\n## Development status\n\n- [x] Refactor from Python + Boost to Rust\n- [x] Publish on [crates.io](https://crates.io/) (waiting on https://github.com/wisespace-io/binance-rs/pull/60)\n- [ ] Configuration file checking\n- [ ] Speed things up by computing trades in parallel\n- [ ] Generate binary distributions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabriel-milan%2Fbtrader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabriel-milan%2Fbtrader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabriel-milan%2Fbtrader/lists"}