Skip to content

Simple Crypto Trading Bot Using Binance Spot & Websocket API written in Go.

License

Notifications You must be signed in to change notification settings

vanillaiice/gocryptobot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Go Crypto Bot

Simple Crypto Trading Bot using Binance Spot and Websocket API. This Bot buys and sells crypto at user specified margins. This is basically a port of V Crypto Bot in Go.

Installation

$ go install github.com/vanillaiice/gocryptobot@latest

Usage

Simple cryptocurrency trading bot using the Binance API and Websocket.

Usage:
  gocryptobot [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  simple      Use the simple trading strategy

Flags:
  -c, --config string   config file (default is $HOME/.gocryptobot.yaml)
  -h, --help            help for gocryptobot
  -t, --toggle          Help message for toggle
  -v, --version         version for gocryptobot

Use "gocryptobot [command] --help" for more information about a command.
  • Also, an .env file with your Binance Secret and API key should be present in the following format:
SECRET_KEY = "<YOUR SECRET KEY>"
API_KEY = "<YOUR API KEY>"

Sample Config File

base: "BTC"
quote: "USDT"
trading-balance: 0.5
state-file: "state.json"
first-tx: "buy"
percent-change-sell: 0.50
percent-change-buy: 0.25
server-base-endpoint: "testnet.binance.vision"
ws-server-base-endpoint: "testnet.binance.vision"
save-receipt: true
db-backend: "sqlite"
db-url: "receipts.db"
log-level: "info"

Contributing

issues, features

Please create a github issue.

bugs

Please fork the project, make your changes and submit a pull request.

trading strategies

Please fork the project, create your own strategy under the strategies folder, and then create a new command using cobra-cli:

$ cobra-cli add root -p <STRATEGY_NAME>

Additional tools

sqlite

To view the data in the sqlite databases (transaction receipts), you can install DB Browser for sqlite.

Disclaimer

  • No warranty whatsoever, use at your own risk
  • Trading crypto is very risky, only invest in what you can afford to lose

Author

vanillaiice

License

GPLv3

About

Simple Crypto Trading Bot Using Binance Spot & Websocket API written in Go.

Topics

Resources

License

Stars

Watchers

Forks

Languages