gocryptobot

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

README

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

Documentation

Overview

Copyright © 2024 vanillaiice vanillaiice1@proton.me

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Directories

Path Synopsis
pkg
db
strategy

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL