项目作者: MatejLach

项目描述 :
Buy crypto low/Sell high on Binance. Simple, powerful configuration, trade multiple assets simultaneously, single binary deployment with no external dependencies!
高级语言: Go
项目地址: git://github.com/MatejLach/bnc-trading-bot.git
创建时间: 2021-04-30T23:12:24Z
项目社区:https://github.com/MatejLach/bnc-trading-bot

开源协议:GNU General Public License v3.0

下载


bnc-trading-bot
=

License: GPL v3

Download the latest release for your OS

This bot automatically trades crypto / fiat assets on Binance.com according to simple, configurable rules.
It allows you to buy crypto assets when they go down in value by a configurable percentage/at an exact price & sell when they’re up, automatically.

Building from source
-
Assuming a correctly set up Go toolchain, simply run:

$ go build

from within the cloned source directory.

Running
-
Navigate with your shell to the directory where the compiled binary is located and execute with:

$ ./bnc-trading-bot

Configuration
-

Upon first launch, a new config.json configuration file will be created that looks something like the following, (excluding the explanatory comments):

  1. {
  2. "api_key": "<YOUR-BINANCE-API-KEY>", // replace everything between " " with your personal Binance.com API key
  3. "api_secret": "<YOUR-BINANCE-API-SECRET>", // replace everything between " " with your personal Binance.com API secret
  4. "Sell": [
  5. {
  6. "sell_holding_symbol": "BNB", // i.e. "BNB" as in 'I have BNB holdings'
  7. "sell_for_symbol": "GBP", // that I want to sell for 'GBP'
  8. "target_price_to_sell_at": "524.00", // sell when "BNB" price against "GBP" reaches an exact amount, set 'percentage_diff' to 0 for this to take effect (has to be higher than the current price)
  9. "percentage_diff": 55, // OR when 'BNB' is up 55% against 'GBP' from when I started this program (has to be positive)
  10. "sell_percent_of_holdings": 25, // sell 25% of my total BNB wallet balance, set to 0 in order for the 'sell_quantity' setting to take effect
  11. "sell_quantity": "0.45" // OR sell exactly 0.45 BNB when it's up 55%, 'sell_percent_of_holdings' takes precedence if it's set to > 0
  12. }
  13. ],
  14. "Buy": [
  15. {
  16. "buy_symbol": "BNB", // purchase 'BNB'
  17. "buy_with_holding_symbol": "GBP", // for money from my 'GBP' wallet
  18. "target_price_to_buy_at": "192", // buy when "BNB" price against "GBP" reaches an exact amount, set 'percentage_diff' to 0 for this to take effect (has to be lower than the current price)
  19. "percentage_diff": -15, // OR once 'BNB' is 15% down against 'GBP' from when I started this program (has to be negative)
  20. "buy_for_percent_of_holdings": 85, // buy as much BNB as possible for 85% of your GBP fiat wallet balance
  21. "buy_quantity": "1.12" // OR buy exactly 1.12 BNB if 'buy_for_percent_of_holdings' is set to 0, otherwise 'buy_for_percent_of_holdings' takes precedence
  22. }
  23. ]
  24. }

You can specify as many Buy/Sell configurations as you want by placing successive configuration objects {...} separated by , in between [], see this if you are unfamiliar with JSON arrays.

The individual buy/sell configurations will run in parallel.

To obtain your personal Binance API key/secret pair, consult the relevant support article.
Make sure to never share your config.json with anyone if it has your API details filled in, otherwise they will be able to do trades on your behalf.

Contributing
-

Bug reports and pull requests are welcome. Do not hesitate to open a PR / file an issue, or a feature request.

Disclaimer
-

This program is provided ‘AS IS’, without any warranty or assumed liability by its creator(s).
Any financial looses due its usage are solely the responsibility of its user(s).

Use at your own risk!