-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
34 lines (25 loc) · 794 Bytes
/
index.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
import { exchange, cancelOrders, seller, buyer } from './varios/ccxtLibreria.js';
import { guardarAllMarkets, allMarkets, filtroBaseBTC, sleep } from './varios/varios.js';
import fs from 'fs';
// 0 cancelar todas las ordenes
// 1 balance
// 2 vender
// 3 comprar
const main = async () => {
while (true) {
guardarAllMarkets(await exchange.loadMarkets ());
let markets = allMarkets();
markets = filtroBaseBTC(markets);
await cancelOrders();
await seller(markets);
await buyer(markets);
await sleep(900000)
};
};
main();
const mainPruebas = async () => {
const mercados = await exchange.loadMarkets();
const mercadosFiltro = filtroBaseBTC(mercados);
console.log(Object.keys(mercadosFiltro));
};
//mainPruebas();