UNPKG

bluebot

Version:

A bitcoin trading bot for auto trading at various exchanges

20 lines (16 loc) 522 B
const _ = require('lodash'); const fs = require('co-fs'); const parts = { paperTrader: 'config/plugins/paperTrader', candleWriter: 'config/plugins/candleWriter', performanceAnalyzer: 'config/plugins/performanceAnalyzer' } const bluebotRoot = __dirname + '/../../'; module.exports = function *() { if(!_.has(parts, this.params.part)) return this.body = 'error :('; const fileName = bluebotRoot + '/' + parts[this.params.part] + '.toml'; this.body = { part: yield fs.readFile(fileName, 'utf8') } }