first commit
This commit is contained in:
commit
aa7869eb33
386 files changed
+69375
No files matched your search
@@ -0,0 +1,31 @@
|
||||
// simple POST request that returns the backtest result
|
||||
|
||||
const _ = require('lodash');
|
||||
const promisify = require('tiny-promisify');
|
||||
const pipelineRunner = promisify(require('../../core/workers/pipeline/parent'));
|
||||
|
||||
// starts a backtest
|
||||
// requires a post body like:
|
||||
//
|
||||
// {
|
||||
// gekkoConfig: {watch: {exchange: "poloniex", currency: "USDT", asset: "BTC"},…},…}
|
||||
// data: {
|
||||
// candleProps: ["close", "start"],
|
||||
// indicatorResults: true,
|
||||
// report: true,
|
||||
// roundtrips: true
|
||||
// }
|
||||
// }
|
||||
module.exports = function *() {
|
||||
var mode = 'backtest';
|
||||
|
||||
var config = {};
|
||||
|
||||
var base = require('./baseConfig');
|
||||
|
||||
var req = this.request.body;
|
||||
|
||||
_.merge(config, base, req);
|
||||
|
||||
this.body = yield pipelineRunner(mode, config);
|
||||
}
|
||||
Reference in new issue
Block a user