forked from askmike/gekko
-
Notifications
You must be signed in to change notification settings - Fork 2
/
plugins.js
119 lines (118 loc) · 3.07 KB
/
plugins.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// what kind of actors does Gekko support?
//
// An actor is a module/plugin that acts whenever an event happens.
// In Gekko there are two types of events and each type originates
// from a feed:
//
// - Market Events: the market feed.
// - Advice Events: the advice feed.
//
// Each type has it's own feed.
//
// Required parameters per actor.
//
// name: Name of the actor
// slug: filename of the actor, expected to be in `gekko/actors/`
// description: text describing the actor. Unused on silent actors.
// async: upon creating a new actor instance, does something async
// happen where Gekko needs to wait for? If set to true, the
// constructor will be passed a callback which it should execute
// as soon as Gekko can continue setup.
// silent: indicated whether Gekko should log when this actor is
// configured. Not neccesary for until components.
// modes: a list indicating in what Gekko modes this actor is
// allowed to run. Realtime is during a live market watch and
// backtest is during a backtest.
// requires: a list of npm modules this actor requires to be
// installed.
// originates: does this actor originate a feed (internally used)
var actors = [
{
name: 'Trading Advisor',
description: 'Calculate trading advice',
slug: 'tradingAdvisor',
async: false,
silent: false,
modes: ['realtime', 'backtest'],
originates: [{
feed: 'advice feed',
object: 'method'
}]
},
{
name: 'IRC bot',
description: 'IRC module lets you communicate with Gekko on IRC.',
slug: 'ircbot',
async: false,
silent: false,
modes: ['realtime'],
dependencies: [{
module: 'irc',
version: '0.3.6'
}]
},
{
name: 'Campfire bot',
description: 'Campfire module lets you communicate with Gekko on Campfire.',
slug: 'campfire',
async: false,
silent: false,
modes: ['realtime'],
dependencies: [{
module: 'ranger',
version: '0.2.4'
}]
},
{
name: 'Mailer',
description: 'Mail module lets sends you email yourself everytime Gekko has new advice.',
slug: 'mailer',
async: true,
silent: false,
modes: ['realtime'],
dependencies: [{
module: 'emailjs',
version: '0.3.6'
}, {
module: 'prompt-lite',
version: '0.1.1'
}]
},
{
name: 'Trader',
description: 'Trader will follow the advice and create real orders.',
slug: 'trader',
async: true,
silent: false,
modes: ['realtime']
},
{
name: 'Advice logger',
description: '',
slug: 'adviceLogger',
async: false,
silent: true,
modes: ['realtime', 'backtest']
},
{
name: 'Profit Simulator',
description: 'Paper trader that logs fake profits.',
slug: 'profitSimulator',
async: false,
silent: false,
modes: ['realtime', 'backtest']
},
{
name: 'Redis beacon',
slug: 'redisBeacon',
description: 'Publish events over Redis Pub/Sub',
async: true,
silent: false,
modes: ['realtime'],
dependencies: [{
module: 'redis',
version: '0.10.0'
}]
}
];
module.exports = actors;