Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Minor Changes + Poloniex Currencies #19

Closed
wants to merge 61 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
9594761
overhaul
Jul 14, 2016
796dec1
fix user agent const
Aug 14, 2016
a5b5660
merge 3.x
Aug 14, 2016
b413573
3.0.0
Aug 14, 2016
fa4b923
fix images
Aug 14, 2016
fe4de54
fix script branch
Aug 14, 2016
807dcf4
fix
Aug 14, 2016
74c7c30
delete install script
Aug 14, 2016
f3f330c
3.0.1
Aug 14, 2016
a232211
report 1m
Aug 14, 2016
f604719
fix run
Aug 14, 2016
9ee7b26
fix data csv
Aug 14, 2016
f5cb886
3.0.2
Aug 14, 2016
fe8e027
expand
Aug 14, 2016
1061f65
fix data controller err
Aug 14, 2016
dde9521
3.0.3
Aug 14, 2016
e974f2a
fix
Aug 14, 2016
32b3a83
btc
Aug 14, 2016
4850601
discuss
Aug 14, 2016
8c18845
default trade logic, 6h RSI
Aug 15, 2016
704ddf3
Added a few currencies for poloniex... <3
Aug 15, 2016
dcae889
Fixed an oopsy in config.js
Aug 15, 2016
8e40bb7
progress indicator
Aug 15, 2016
67efbc9
3.1 - fixed default trade logic, reconfig of rsi handling
Aug 15, 2016
4985337
update
Aug 15, 2016
e05fb57
3.1.0
Aug 15, 2016
624588f
update zenbrain version
Aug 15, 2016
0bf9e80
3.1.1
Aug 15, 2016
9db1222
note update
Aug 15, 2016
cd15fd6
note
Aug 15, 2016
4b463ab
relax backfill timeout
Aug 15, 2016
a1f8095
report intervals
Aug 15, 2016
5c61c05
3.1.2
Aug 15, 2016
b7a04a2
update trade logic description
Aug 15, 2016
a3e8a67
verbose flag
Aug 15, 2016
37613d1
doc
Aug 15, 2016
1cd00cd
btc
Aug 15, 2016
9e9aeac
new graph defaults
Aug 15, 2016
367a574
add progress to default reporter
Aug 16, 2016
3fc13c5
fix license double
Aug 16, 2016
8e54d1f
no shell lexer
Aug 16, 2016
55ffa51
no windows
Aug 16, 2016
c5e4164
windows
Aug 16, 2016
764f49d
example sim
Aug 16, 2016
2326fa6
better url
Aug 16, 2016
ea3bded
initial kraken support
grigio Aug 16, 2016
44aff8a
ROI calc fix
xangma Aug 16, 2016
5d7e544
Update default_logic.js
xangma Aug 16, 2016
a4d74cd
bring back "not enough asset/currency messages
Aug 16, 2016
c52ac51
Merge pull request #22 from xangma/master
Aug 16, 2016
95fbbe4
Merge branch 'master' of github.com:carlos8f/zenbot
Aug 16, 2016
e640e55
rsi backfill honors backfill option
Aug 16, 2016
a2326cf
WIP should work backfilling
grigio Aug 16, 2016
1e3af89
Merge pull request #21 from grigio/kraken
Aug 16, 2016
bfac1a8
poloniex products by @RDash21
Aug 16, 2016
bdae559
Merge branch 'master' of https://github.com/carlos8f/zenbot
Aug 16, 2016
631f422
Accidentially put ETC 3 Times in a row... found by @JFD3D
Aug 16, 2016
7092fb5
Added config file... senpai!
Aug 16, 2016
b4dd8d9
Need... Sleeep.....
Aug 16, 2016
34e3523
Fixed a comma... :pang:
Aug 16, 2016
f5c304a
Updated minimal value from 0.001 to create more unity.
Aug 16, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ npm-debug.log
db.json
dump
conf/secret.json
github.pub
github
88 changes: 55 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,46 +7,63 @@

- Follow zenbot [on Twitter!](https://twitter.com/zenbot_btc)
- Check out zenbot's [live feed!](https://zenbot.s8f.org/)
- Join the discussion on [Reddit!](https://www.reddit.com/r/Bitcoin/comments/4rym6o/zenbot_an_automated_bitcoin_trading_bot_for_gdax/)
- Join the discussion on [Reddit!](https://www.reddit.com/r/Bitcoin/comments/4xqo8q/announcing_zenbot_3_your_new_btcethltc_trading/)!

## Updates

- **3.1.2** - Relaxed backfill timeout. Backfill is slower to let reducer catch up. Reducer report interval -> 30s, Trade report interval -> 30s

- **3.1.1** - Updated zenbrain version. Please run `./update.sh`.

- **3.1.0** - Major logic update. Much of the default trade logic reprogrammed. Moved default logic to `./default_logic.js`. RSI now backfills by default, reconfigured to 15m intervals. Safe to drop your zenbrain DB before this update.

## Description

zenbot is an automated cryptocurrency trading bot. It runs on node.js and MongoDB and is fully open-sourced. A plugin architecture is included that allows any exchange, trade strategy, or currency pair to be supported.

- Out of the box, zenbot is an AI-powered trade advisor for GDAX (gives you buy or sell signals while watching live data).
- Enable trades by simply giving it your GDAX API key.
- Trade strategy is exposed in the config file. This allows you to have full control over the bot's actions and logic. For example, instead of trading on GDAX, you could trade on a different exchange or currency pair by implementing a few lines of JavaScript.
- Out of the box, zenbot is an AI-powered trade advisor (gives you buy or sell signals while watching live data).
- Default support for [GDAX](https://gdax.com/) is included, so if you have a GDAX account, enable bot trades by simply putting your GDAX API key in `config.js` and setting what currency pair to trade.
- Default support for other exchanges is ongoing.
- Trade strategy is fully exposed in the config file. This allows you to have full control over the bot's actions and logic. For example, instead of trading on GDAX, you could trade on a different exchange or currency pair by implementing a few lines of JavaScript.
- A live candlestick graph is provided via a built-in HTTP server.

HOWEVER. BE AWARE that once you hook up zenbot to a live exchange, the damage done is your fault, not mine! **As with buying bitcoin in general, risk is involved and caution is essential. bitcoin is an experiment, and so is zenbot.**

## Screenshot

![screenshot](https://rawgit.com/carlos8f/zenbot/master/assets/zenbot_web_ui.png)
![screenshot](https://raw.githubusercontent.com/carlos8f/zenbot/master/assets/zenbot_web_ui.png)

## Quick-start

### 1. Requirements: [Node.js](https://nodejs.org/) and [MongoDB](https://www.mongodb.com/download-center)

#### Windows - I don't support it.

If you're having an error on Windows and you're about to give up, it's probaby because Node.js is generally broken on Windows and you should try running on a Linux docker container or a Mac instead.

If you're still insistent on using Windows, you'll have to fork zenbot, fix it yourself, and I'll accept a Pull Request.

### 2. Install zenbot 3:

```shell
curl --silent https://raw.githubusercontent.com/carlos8f/zenbot/master/install.sh | /bin/sh
```
git clone https://github.com/carlos8f/zenbot.git
cd zenbot
npm install
```

### 3. Edit `zenbot/config.js` with API keys, database credentials, trade logic, etc.
### 3. Edit `config.js` with API keys, database credentials, trade logic, etc.

### 4. Run zenbot on the exchange:

```shell
```
./run.sh
```

### 5. Open the live graph URL provided in the console.

To access the CLI,

```shell
```
zenbot

Usage: zenbot [options] [command]
Expand All @@ -72,17 +89,34 @@ The `./run.sh` script combines `launch map --backfill reduce run server`, so use

Once backfill has finished, run a simulation:

```shell
zenbot sim
```
zenbot sim [--verbose]
```

Zenbot will return you a list of virtual trades, and an ROI figure. Open the URL provided in the console (while running the server) to see the virtual trades plotted on a candlestick graph. Tweak `config.js` for new trade strategies and check your results this way.

Example simulation graph: https://zenbot.s8f.org/?sim_id=9cb6ac63f85168e3&selector=gdax.BTC-USD&period=6h&limit=2000

#### About the default trade logic in `default_logic.js`

- uses [GDAX](https://gdax.com/) API
- watches/trades BTC/USD
- acts at 1m increments (ticks), but you can configure to act quicker or slower.
- computes 14-period 15m RSI
- considers `RSI >= 70` overbought and `RSI <= 20` oversold
- trades 95% of current balance, market price

You can tweak the JS from there to use bitfinex, or trade ETH, or whatever. After tweaking `default_logic.js`, Use `zenbot sim` to check your strategy against historical trades.

Note that simulations always end on Wednesday 5pm PST, and run for a max 90 days, to ensure consistency of results.

Auto-learn support and more exchange support will come soon. Will accept PR's :) With the 3.x plugin architecture, external plugins are possible too (published as their own repo/module).

### 7. Web console

When the server is running, and you have visited the `?secret` URL provided in the console, you can access an aggregated, live feed of log messages at `http://localhost:3013/logs`. Example:

![screenshot](https://rawgit.com/carlos8f/zenbot/master/assets/zenbot_web_logs.png)
![screenshot](https://raw.githubusercontent.com/carlos8f/zenbot/master/assets/zenbot_web_logs.png)

## FAQ

Expand Down Expand Up @@ -116,32 +150,21 @@ While the advanced mathematical nature of such adaptive systems has kept neural

Source: [Wikipedia](https://en.wikipedia.org/wiki/Technical_analysis#Systematic_trading)

- - -
## Donate

### License: MIT
P.S., some have asked for how to donate to Zenbot development. I accept donations at **my Bitcoin address** Here:

- Copyright (C) 2016 Carlos Rodriguez (http://s8f.org/)
- Copyright (C) 2016 Terra Eclipse, Inc. (http://www.terraeclipse.com/)
### carlos8f's BTC

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the &quot;Software&quot;), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
`187rmNSkSvehgcKpBunre6a5wA5hQQop6W`

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
![zenbot logo](https://s8f.org/files/bitcoin.png)

THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
thanks!

## Discuss

Join the [discussion on Reddit](https://www.reddit.com/r/Bitcoin/comments/4xqo8q/announcing_zenbot_3_your_new_btcethltc_trading/)!
- - -

### License: MIT
Expand All @@ -166,4 +189,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Loading