-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.ts
216 lines (180 loc) · 7.54 KB
/
index.ts
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
import cron from "node-cron";
import BithumbBot from "./BotService/BithumbBot";
import * as BithumbApi from 'node-bithumb';
const buy_price = 100000;
const buy_coin_cnt = 9;
cron.schedule("1 0 * * *", async () => {
const bitBot = new BithumbBot();
await bitBot.sellAllCoin();
});
cron.schedule("2 0 * * *", async () => {
const bitBot = new BithumbBot();
for (var i = 1; i <= buy_coin_cnt; i++) {
await bitBot.buyRandomCoin(buy_price);
}
});
// BTC 봉
// cron.schedule("*/1 * * * *", async () => {
// const bitBot = new BithumbBot();
// if (!["00", "01", "02"].includes(moment().format("mm"))) {
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} BTC 6h Buy running bot`);
// await bitBot.volatilityBreakthroughBuyBot("BTC", buy_price, "6h");
// }
// // 손절 2%
// await bitBot.volatilityBreakthroughStopLose("BTC");
// });
// cron.schedule("0 */6 * * *", async () => {
// const bitBot = new BithumbBot();
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} BTC 6h Sell running bot`);
// await bitBot.volatilityBreakthroughsellAllCoin("BTC");
// });
// // ETH 봉
// cron.schedule("*/1 * * * *", async () => {
// const bitBot = new BithumbBot();
// if (!["00", "01", "02"].includes(moment().format("mm"))) {
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} ETH 6h Buy running bot`);
// await bitBot.volatilityBreakthroughBuyBot("ETH", buy_price, "6h");
// }
// // 손절 2%
// await bitBot.volatilityBreakthroughStopLose("ETH");
// });
// cron.schedule("0 */6 * * *", async () => {
// const bitBot = new BithumbBot();
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} ETH 6h Sell running bot`);
// await bitBot.volatilityBreakthroughsellAllCoin("ETH");
// });
// // ADA 봉
// cron.schedule("*/1 * * * *", async () => {
// const bitBot = new BithumbBot();
// if (!["00", "01", "02"].includes(moment().format("mm"))) {
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} ADA 6h Buy running bot`);
// await bitBot.volatilityBreakthroughBuyBot("ADA", buy_price, "6h");
// }
// // 손절 2%
// await bitBot.volatilityBreakthroughStopLose("ADA");
// });
// cron.schedule("0 */6 * * *", async () => {
// const bitBot = new BithumbBot();
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} ADA 6h Sell running bot`);
// await bitBot.volatilityBreakthroughsellAllCoin("ADA");
// });
// // XRP 봉
// cron.schedule("*/1 * * * *", async () => {
// const bitBot = new BithumbBot();
// if (!["00", "01", "02"].includes(moment().format("mm"))) {
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} XRP 6h Buy running bot`);
// await bitBot.volatilityBreakthroughBuyBot("XRP", buy_price, "6h");
// }
// // 손절 2%
// await bitBot.volatilityBreakthroughStopLose("XRP");
// });
// cron.schedule("0 */6 * * *", async () => {
// const bitBot = new BithumbBot();
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} XRP 6h Sell running bot`);
// await bitBot.volatilityBreakthroughsellAllCoin("XRP");
// });
// // XLM 봉
// cron.schedule("*/1 * * * *", async () => {
// const bitBot = new BithumbBot();
// if (!["00", "01", "02"].includes(moment().format("mm"))) {
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} XLM 6h Buy running bot`);
// await bitBot.volatilityBreakthroughBuyBot("XLM", buy_price, "6h");
// }
// // 손절 2%
// await bitBot.volatilityBreakthroughStopLose("XLM");
// });
// cron.schedule("0 */6 * * *", async () => {
// const bitBot = new BithumbBot();
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} XLM 6h Sell running bot`);
// await bitBot.volatilityBreakthroughsellAllCoin("XLM");
// });
// // EOS 봉
// cron.schedule("*/1 * * * *", async () => {
// const bitBot = new BithumbBot();
// if (!["00", "01", "02"].includes(moment().format("mm"))) {
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} EOS 6h Buy running bot`);
// await bitBot.volatilityBreakthroughBuyBot("EOS", buy_price, "6h");
// }
// // 손절 2%
// await bitBot.volatilityBreakthroughStopLose("EOS");
// });
// cron.schedule("0 */6 * * *", async () => {
// const bitBot = new BithumbBot();
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} EOS 6h Sell running bot`);
// await bitBot.volatilityBreakthroughsellAllCoin("EOS");
// });
// // BCH 봉
// cron.schedule("*/1 * * * *", async () => {
// const bitBot = new BithumbBot();
// if (!["00", "01", "02"].includes(moment().format("mm"))) {
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} BCH 6h Buy running bot`);
// await bitBot.volatilityBreakthroughBuyBot("BCH", buy_price, "6h");
// }
// // 손절 2%
// await bitBot.volatilityBreakthroughStopLose("BCH");
// });
// cron.schedule("0 */6 * * *", async () => {
// const bitBot = new BithumbBot();
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} BCH 6h Sell running bot`);
// await bitBot.volatilityBreakthroughsellAllCoin("BCH");
// });
// // TRX 봉
// cron.schedule("*/1 * * * *", async () => {
// const bitBot = new BithumbBot();
// if (!["00", "01", "02"].includes(moment().format("mm"))) {
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} TRX 6h Buy running bot`);
// await bitBot.volatilityBreakthroughBuyBot("TRX", buy_price, "6h");
// }
// // 손절 2%
// await bitBot.volatilityBreakthroughStopLose("TRX");
// });
// cron.schedule("0 */6 * * *", async () => {
// const bitBot = new BithumbBot();
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} TRX 6h Sell running bot`);
// await bitBot.volatilityBreakthroughsellAllCoin("TRX");
// });
// // LTC 봉
// cron.schedule("*/1 * * * *", async () => {
// const bitBot = new BithumbBot();
// if (!["00", "01", "02"].includes(moment().format("mm"))) {
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} LTC 6h Buy running bot`);
// await bitBot.volatilityBreakthroughBuyBot("LTC", buy_price, "6h");
// }
// // 손절 2%
// await bitBot.volatilityBreakthroughStopLose("LTC");
// });
// cron.schedule("0 */6 * * *", async () => {
// const bitBot = new BithumbBot();
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} LTC 6h Sell running bot`);
// await bitBot.volatilityBreakthroughsellAllCoin("LTC");
// });
// // BSV 봉
// cron.schedule("*/1 * * * *", async () => {
// const bitBot = new BithumbBot();
// if (!["00", "01", "02"].includes(moment().format("mm"))) {
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} BSV 6h Buy running bot`);
// await bitBot.volatilityBreakthroughBuyBot("BSV", buy_price, "6h");
// }
// // 손절 2%
// await bitBot.volatilityBreakthroughStopLose("BSV");
// });
// cron.schedule("0 */6 * * *", async () => {
// const bitBot = new BithumbBot();
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} BSV 6h Sell running bot`);
// await bitBot.volatilityBreakthroughsellAllCoin("BSV");
// });
// // LINK 봉
// cron.schedule("*/1 * * * *", async () => {
// const bitBot = new BithumbBot();
// if (!["00", "01", "02"].includes(moment().format("mm"))) {
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} LINK 6h Buy running bot`);
// await bitBot.volatilityBreakthroughBuyBot("LINK", buy_price, "6h");
// }
// // 손절 2%
// await bitBot.volatilityBreakthroughStopLose("LINK");
// });
// cron.schedule("0 */6 * * *", async () => {
// const bitBot = new BithumbBot();
// console.log(`\n${moment().format("YYYY-MM-DD HH:mm:ss")} LINK 6h Sell running bot`);
// await bitBot.volatilityBreakthroughsellAllCoin("LINK");
// });