forked from askmike/gekko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
146 additions
and
78 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
connectionString = "mongodb://mongodb/gekko" | ||
dependencies = [{"module"=>"mongojs", "version"=>"2.4.0"}] | ||
path = "plugins/mongodb" | ||
version = 0.1 |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
connectionString = "postgres://user:pass@localhost:5432" | ||
dependencies = [{"module"=>"pg", "version"=>"6.1.0"}] | ||
path = "plugins/postgresql" | ||
version = 0.1 |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
dataDirectory = "history" | ||
path = "plugins/sqlite" | ||
version = 0.1 | ||
|
||
[[dependencies]] | ||
module = "sqlite3" | ||
version = "3.1.4" |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
debug = true | ||
|
||
# what database should Gekko use? | ||
adapter = 'sqlite' | ||
|
||
[watch] | ||
exchange = 'Bitstamp' | ||
currency = 'USD' | ||
asset = 'BTC' | ||
|
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,2 +1 @@ | ||
enabled = true | ||
sqlite = "sqlite" | ||
enabled = true |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
enabled = false | ||
|
||
# Send 'Gekko starting' message if true | ||
sendMessageOnStart = true | ||
|
||
# disable advice printout if it's soft | ||
muteSoft = true | ||
|
||
# your email, change it unless you are Azor Ahai | ||
email = "jon_snow@westeros.org" | ||
|
||
# your pushbullet API key | ||
key = "xxx" | ||
|
||
# will make Gekko messages start with [GEKKO] | ||
tag = "[GEKKO]" |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
enabled = false | ||
|
||
## NOTE: once you filled in the following | ||
## never share this file with anyone! | ||
|
||
key = "" | ||
secret = "" | ||
# this is only required at specific exchanges | ||
username = "" |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
enabled = true | ||
|
||
candleSize = 60 | ||
historySize = 25 | ||
method = "MACD" | ||
|
||
[talib] | ||
enabled = false | ||
version = "1.0.2" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
const fs = require('fs'); | ||
const _ = require('lodash'); | ||
const toml = require('toml'); | ||
|
||
const util = require('../util'); | ||
const dirs = util.dirs(); | ||
|
||
|
||
const getTOML = function(fileName) { | ||
var raw = fs.readFileSync(fileName); | ||
return toml.parse(raw); | ||
} | ||
|
||
// build a config object out of a directory of TOML files | ||
module.exports = function() { | ||
const configDir = util.dirs().config; | ||
|
||
let _config = util.getTOML(configDir + 'general.toml'); | ||
fs.readdirSync(configDir + 'plugins').forEach(function(pluginFile) { | ||
let pluginName = _.first(pluginFile.split('.')) | ||
_config[pluginName] = util.getTOML(configDir + 'plugins/' + pluginFile); | ||
}); | ||
|
||
// attach the proper adapter | ||
let adapter = _config.adapter; | ||
_config[adapter] = util.getTOML(configDir + 'adapters/' + adapter + '.toml'); | ||
|
||
if(_config.tradingAdvisor.enabled) { | ||
// also load the strat | ||
let strat = _config.tradingAdvisor.method; | ||
let stratFile = configDir + 'strategies/' + strat + '.toml'; | ||
if(!fs.existsSync(stratFile)) | ||
util.die('Cannot find the strategy config file for ' + strat); | ||
_config[strat] = util.getTOML(stratFile); | ||
} | ||
|
||
return _config; | ||
} |
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
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