-
-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from saniales/develop
v0.0.2-alpha
- Loading branch information
Showing
30 changed files
with
2,383 additions
and
1,427 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,47 @@ | ||
exchange_configs: | ||
- exchange: bittrex | ||
public_key: your_bittrex_public_key | ||
secret_key: your_bittrex_secret_key | ||
websocket_enabled: true | ||
- exchange: binance | ||
public_key: your_binance_public_key | ||
secret_key: your_binance_secret_key | ||
websocket_enabled: true | ||
simulation_mode: true | ||
exchange_configs: | ||
- exchange: bitfinex | ||
public_key: your_bitfinex_public_key | ||
secret_key: your_bitfinex_secret_key | ||
websocket_enabled: true | ||
public_key: bitfinex_public_key | ||
secret_key: bitfinex_secret_key | ||
deposit_addresses: | ||
BTC : bitfinex_deposit_address_btc | ||
ETH: bitfinex_deposit_address_eth | ||
ZEC: bitfinex_deposit_address_zec | ||
fake_balances: | ||
BTC: 100 | ||
ETH: 100 | ||
ZEC: 100 | ||
ETC: 100 | ||
- exchange: hitbtc | ||
public_key: hitbtc_public_key | ||
secret_key: hitbtc_secret_key | ||
deposit_addresses: | ||
BTC : hitbtc_deposit_address_btc | ||
ETH: hitbtc_deposit_address_eth | ||
ZEC: hitbtc_deposit_address_zec | ||
fake_balances: | ||
BTC: 100 | ||
ETH: 100 | ||
ZEC: 100 | ||
ETC: 100 | ||
strategies: | ||
- strategy: your_strategy_name | ||
- strategy: strategy_name | ||
markets: | ||
- market: market_logical_name | ||
- market: ETH-BTC | ||
bindings: | ||
- exchange: bittrex | ||
market_name: market_name_on_bittrex | ||
- exchange: binance | ||
market_name: market_name_on_binance | ||
- exchange: bitfinex | ||
market_name: market_name_on_bitfinex | ||
- market: another_market_logical_name | ||
market_name: ETHBTC | ||
- exchange: hitbtc | ||
market_name: ETHBTC | ||
- market: ZEC-BTC | ||
bindings: | ||
- exchange: bittrex | ||
market_name: market_name_on_bittrex | ||
- exchange: binance | ||
market_name: market_name_on_binance | ||
- exchange: bitfinex | ||
market_name: market_name_on_bitfinex | ||
market_name: ZECBTC | ||
- exchange: hitbtc | ||
market_name: ZECBTC | ||
- market: ETC-BTC | ||
bindings: | ||
- exchange: bitfinex | ||
market_name: ETCBTC | ||
- exchange: hitbtc | ||
market_name: ETCBTC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,4 +26,6 @@ _testmain.go | |
golang-crypto-trading-bot | ||
|
||
.bot_config.yaml | ||
.bot_config.yml | ||
.bot_config.yml | ||
|
||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,114 @@ | ||
# golang-crypto-trading-bot | ||
|
||
[![Go Report Card](https://goreportcard.com/badge/github.com/saniales/golang-crypto-trading-bot)](https://goreportcard.com/report/github.com/saniales/golang-crypto-trading-bot) | ||
[![GoDoc](https://godoc.org/github.com/saniales/golang-crypto-trading-bot?status.svg)](https://godoc.org/github.com/saniales/golang-crypto-trading-bot) | ||
[![Travis CI](https://img.shields.io/travis/saniales/golang-crypto-trading-bot.svg)]((https://travis-ci.org/saniales/golang-crypto-trading-bot)) | ||
[![GitHub release](https://img.shields.io/github/release/saniales/golang-crypto-trading-bot.svg)](https://github.com/saniales/golang-crypto-trading-bot/releases) | ||
[![license](https://img.shields.io/github/license/saniales/golang-crypto-trading-bot.svg?maxAge=2592000)](https://github.com/saniales/golang-crypto-trading-bot/LICENSE) | ||
|
||
|
||
A golang implementation of a console-based trading bot for cryptocurrency exchanges. | ||
|
||
## Supported Exchanges | ||
Bittrex, Poloniex, Binance, Bitfinex and Kraken, other in progress. | ||
A golang implementation of a console-based trading bot for cryptocurrency exchanges. | ||
|
||
## Usage | ||
|
||
Download a release or directly build the code from this repository. | ||
|
||
``` bash | ||
$ go get github.com/saniales/golang-crypto-trading-bot | ||
go get github.com/saniales/golang-crypto-trading-bot | ||
``` | ||
|
||
If you need to, you can create a strategy and bind it to the bot: | ||
|
||
``` go | ||
import bot "github.com/saniales/golang-crypto-trading-bot/cmd" | ||
|
||
bot.AddCustomStrategy(myStrategy) | ||
bot.Execute() | ||
func main() { | ||
bot.AddCustomStrategy(myStrategy) | ||
bot.Execute() | ||
} | ||
``` | ||
|
||
For strategy reference see the [Godoc documentation](https://godoc.org/github.com/saniales/golang-crypto-trading-bot). | ||
|
||
# Configuration file template | ||
## Simulation Mode | ||
|
||
If enabled, the bot will do paper trading, as it will execute fake orders in a sandbox environment. | ||
|
||
A Fake balance for each coin must be specified for each exchange if simulation mode is enabled. | ||
|
||
## Supported Exchanges | ||
|
||
| Exchange Name | REST Supported | Websocket Support | | ||
| ------------- |------------------ | ----------------- | | ||
| Bittrex | Yes | No | | ||
| Poloniex | Yes | Yes | | ||
| Kraken | Yes (no withdraw) | No | | ||
| Bitfinex | Yes | Yes | | ||
| Binance | Yes | Yes | | ||
| Kucoin | Yes | No | | ||
| HitBtc | Yes | Yes | | ||
|
||
## Configuration file template | ||
|
||
Create a configuration file from this example or run the `init` command of the compiled executable. | ||
|
||
``` yaml | ||
exchange_configs: | ||
- exchange: bittrex | ||
public_key: your_bittrex_public_key | ||
secret_key: your_bittrex_secret_key | ||
websocket_enabled: true | ||
- exchange: binance | ||
public_key: your_binance_public_key | ||
secret_key: your_binance_secret_key | ||
websocket_enabled: true | ||
simulation_mode: true # if you want to enable simulation mode. | ||
exchange_configs: | ||
- exchange: bitfinex | ||
public_key: your_bitfinex_public_key | ||
secret_key: your_bitfinex_secret_key | ||
websocket_enabled: true | ||
public_key: bitfinex_public_key | ||
secret_key: bitfinex_secret_key | ||
deposit_addresses: | ||
BTC: bitfinex_deposit_address_btc | ||
ETH: bitfinex_deposit_address_eth | ||
ZEC: bitfinex_deposit_address_zec | ||
fake_balances: # used only if simulation mode is enabled, can be omitted if not enabled. | ||
BTC: 100 | ||
ETH: 100 | ||
ZEC: 100 | ||
ETC: 100 | ||
- exchange: hitbtc | ||
public_key: hitbtc_public_key | ||
secret_key: hitbtc_secret_key | ||
deposit_addresses: | ||
BTC : hitbtc_deposit_address_btc | ||
ETH: hitbtc_deposit_address_eth | ||
ZEC: hitbtc_deposit_address_zec | ||
fake_balances: | ||
BTC: 100 | ||
ETH: 100 | ||
ZEC: 100 | ||
ETC: 100 | ||
strategies: | ||
- strategy: your_strategy_name | ||
- strategy: strategy_name | ||
markets: | ||
- market: market_logical_name | ||
- market: ETH-BTC | ||
bindings: | ||
- exchange: bitfinex | ||
market_name: ETHBTC | ||
- exchange: hitbtc | ||
market_name: ETHBTC | ||
- market: ZEC-BTC | ||
bindings: | ||
- exchange: bittrex | ||
market_name: market_name_on_bittrex | ||
- exchange: binance | ||
market_name: market_name_on_binance | ||
- exchange: bitfinex | ||
market_name: market_name_on_bitfinex | ||
- market: another_market_logical_name | ||
market_name: ZECBTC | ||
- exchange: hitbtc | ||
market_name: ZECBTC | ||
- market: ETC-BTC | ||
bindings: | ||
- exchange: bittrex | ||
market_name: market_name_on_bittrex | ||
- exchange: binance | ||
market_name: market_name_on_binance | ||
- exchange: bitfinex | ||
market_name: market_name_on_bitfinex | ||
market_name: ETCBTC | ||
- exchange: hitbtc | ||
market_name: ETCBTC | ||
``` | ||
# Donate | ||
## Donate | ||
Feel free to donate: | ||
| METHOD | ADDRESS | | ||
|-------- |-------------------------------------------- | | ||
| Paypal | https://paypal.me/AlessandroSanino | | ||
| BTC | 1DVgmv6jkUiGrnuEv1swdGRyhQsZjX9MT3 | | ||
| XVG | DFstPiWFXjX8UCyUCxfeVpk6JkgaLBSNvS | | ||
| ETH | 0x2fe7bd8a41e91e9284aada0055dbb15ecececf02 | | ||
| USDT | 18obCEVmbT6MHXDcPoFwnUuCmkttLbK5Xo | | ||
| METHOD | ADDRESS | | ||
|-------- |-------------------------------------------- | | ||
| Paypal | https://paypal.me/AlessandroSanino | | ||
| BTC | 1DVgmv6jkUiGrnuEv1swdGRyhQsZjX9MT3 | | ||
| XVG | DFstPiWFXjX8UCyUCxfeVpk6JkgaLBSNvS | | ||
| ETH | 0x2fe7bd8a41e91e9284aada0055dbb15ecececf02 | | ||
| USDT | 18obCEVmbT6MHXDcPoFwnUuCmkttLbK5Xo | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.