-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.js
47 lines (47 loc) · 1.57 KB
/
config.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
export default {
webhookUrl: "https://api.telegram.org/botId/sendMessage?chat_id=chatId&text={message}",
dateFormat: "HH:mm:ss - DD/MM/YYYY",
assets: [
{
symbol: "IBM",
api: "https://www.alphavantage.co/query?function=GLOBAL_QUOTE&symbol=IBM&apikey=demo",
getCurrent: (json) => {
return json["Global Quote"]["05. price"];
},
getLast: (json) => {
return json["Global Quote"]["08. previous close"];
},
alerts: [
{
message: "IBM lost value compared to yesterday!",
eval: "{current} < {last}",
cooldown: "60",
},
{
message: "IBM gained more than 8% value!",
eval: "(({current} - {last}) / {last}) * 100 > 8",
cooldown: "86400",
},
],
},
{
symbol: "DOT",
api: "https://api.pancakeswap.info/api/tokens",
getCurrent: (json) => {
return json.data["0x7083609fCE4d1d8Dc0C979AAb8c869Ea2C873402"].price;
},
alerts: [
{
message: "DOT is below 40!",
eval: "{current} < 40",
cooldown: "60",
},
{
message: "DOT is above 420.69!'",
eval: "{current} > 420.69",
cooldown: "10",
},
],
},
],
};