From a6c7fc5fa1ff9dc81a4611f88699b34b1aa65309 Mon Sep 17 00:00:00 2001
From: Toledo
Date: Wed, 25 Sep 2019 18:12:19 -0300
Subject: [PATCH 1/6] update array
---
main.js | 1280 +++++++++++++++++++++++++++++----------------
package-lock.json | 5 +
package.json | 1 +
3 files changed, 831 insertions(+), 455 deletions(-)
diff --git a/main.js b/main.js
index 4ae1fd9..1a444fc 100644
--- a/main.js
+++ b/main.js
@@ -1,497 +1,867 @@
-var config = require('./config.json');
-var cron = require('node-cron');
-var app = require('express')();
-var coins = ['TUSD', 'USDT', 'USDC', 'USDC', 'PAX', 'USDS', 'USDSB', ];
+import config from "./config.json";
+import cron from "node-cron";
+import express from "express";
+import Binance from "binance-api-node";
+
+let coins = ["TUSD", "USDT", "USDC", "USDC", "PAX", "USDS", "USDSB"];
-const Binance = require('binance-api-node').default;
const client = Binance({
- apiKey: config.API_KEY,
- apiSecret: config.SECRET_KEY,
+ apiKey: config.API_KEY,
+ apiSecret: config.SECRET_KEY
});
-
-if(config.BOT_TOKEN == "" && config.BOT_CHAT == "") {
- bot_enabled = 0;
+if (config.BOT_TOKEN == "" && config.BOT_CHAT == "") {
+ bot_enabled = 0;
} else {
- const TelegramBot = require('node-telegram-bot-api');
- const TOKEN = config.BOT_TOKEN;
- var bot = new TelegramBot(TOKEN, {polling: true});
- bot.sendMessage(config.BOT_CHAT, '\u{1F916} stablecoins-infinity-profit-bot iniciando');
- bot_enabled = 1;
+ const TelegramBot = require("node-telegram-bot-api");
+ const TOKEN = config.BOT_TOKEN;
+ var bot = new TelegramBot(TOKEN, { polling: true });
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1F916} stablecoins-infinity-profit-bot iniciando"
+ );
+ bot_enabled = 1;
}
-client.openOrders({
- symbol: config.CURRENCY + config.MARKET,
-}).then((result) => {
- for (let index = 0; index < result.length; index++) {
- if(result[index].side == "BUY") {
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{1F5E3} Order de compra encontrada: '+ result[index].orderId +' No total de: '+ result[index].origQty +' no valor de: '+ result[index].price +'');
- }
- console.log('Order de compra encontrada: '+ result[index].orderId +' No total de: '+ result[index].origQty +' no valor de: '+ result[index].price +'');
- filledBuyOrder = false;
- OrderBuyID = result[index].orderId;
- buyAmount = result[index].origQty;
- buyPriceTemp = result[index].price;
- }
- if(result[index].side == "SELL") {
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{1F5E3} Order de venda encontrada: '+ result[index].orderId +' No total de: '+ result[index].origQty +' no valor de: '+ result[index].price +'');
- }
- console.log("Order de venda encontrada: "+ result[index].orderId +" No total de: "+ result[index].origQty +" no valor de: "+ result[index].price +"");
- filledSellOrder = false;
- OrderSellID = result[index].orderId;
- sellAmount = result[index].origQty;
- sellPriceTemp = result[index].price;
- }
- }
-});
+client
+ .openOrders({
+ symbol: config.CURRENCY + config.MARKET
+ })
+ .then(result => {
+ for (let i = 0; i < result.length; i++) {
+ if (result[i].side == "BUY") {
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1F5E3} Order de compra encontrada: " +
+ result[i].orderId +
+ " No total de: " +
+ result[i].origQty +
+ " no valor de: " +
+ result[i].price +
+ ""
+ );
+ }
+ console.log(
+ "Order de compra encontrada: " +
+ result[i].orderId +
+ " No total de: " +
+ result[i].origQty +
+ " no valor de: " +
+ result[i].price +
+ ""
+ );
+ filledBuyOrder = false;
+ OrderBuyID = result[i].orderId;
+ buyAmount = result[i].origQty;
+ buyPriceTemp = result[i].price;
+ }
+ if (result[i].side == "SELL") {
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1F5E3} Order de venda encontrada: " +
+ result[i].orderId +
+ " No total de: " +
+ result[i].origQty +
+ " no valor de: " +
+ result[i].price +
+ ""
+ );
+ }
+ console.log(
+ "Order de venda encontrada: " +
+ result[i].orderId +
+ " No total de: " +
+ result[i].origQty +
+ " no valor de: " +
+ result[i].price +
+ ""
+ );
+ filledSellOrder = false;
+ OrderSellID = result[i].orderId;
+ sellAmount = result[i].origQty;
+ sellPriceTemp = result[i].price;
+ }
+ }
+ });
-var task = cron.schedule('*/' + config.LOOP_TIME + ' * * * * *', () => {
- client.dailyStats({ symbol: config.CURRENCY + config.MARKET }).then((result) => {
- changePrice = parseFloat(result.priceChangePercent);
- avgPrice = parseFloat(result.lastPrice);
- minDay = parseFloat(result.lowPrice);
- maxDay = parseFloat(result.highPrice);
- spreadDay = parseFloat(maxDay - minDay).toFixed(4);
- spreadOpera = parseFloat(spreadDay / 4);
- otherStables = 0;
- client.accountInfo({ useServerTime: true }).then((result) => {
- for (let index = 0; index < result.balances.length; index++) {
- if (result.balances[index].asset == "BNB") {
- balanceBNB = (parseFloat(result.balances[index].locked) + parseFloat(result.balances[index].free));
- }
- if (result.balances[index].asset == "TUSD") {
- saldo_TUSD = (parseFloat(result.balances[index].locked) + parseFloat(result.balances[index].free)).toFixed(8);
- }
- if (result.balances[index].asset == "USDT") {
- saldo_USDT = (parseFloat(result.balances[index].locked) + parseFloat(result.balances[index].free)).toFixed(8);
- }
- if (result.balances[index].asset == "USDC") {
- saldo_USDC = (parseFloat(result.balances[index].locked) + parseFloat(result.balances[index].free)).toFixed(8);
- }
- if (result.balances[index].asset == "PAX") {
- saldo_PAX = (parseFloat(result.balances[index].locked) + parseFloat(result.balances[index].free)).toFixed(8);
- }
- if (result.balances[index].asset == "USDS") {
- saldo_USDS = (parseFloat(result.balances[index].locked) + parseFloat(result.balances[index].free)).toFixed(8);
- }
- if (result.balances[index].asset == "USDSB") {
- saldo_USDSB = (parseFloat(result.balances[index].locked) + parseFloat(result.balances[index].free)).toFixed(8);
- }
+var task = cron.schedule(
+ "*/" + config.LOOP_TIME + " * * * * *",
+ () => {
+ client
+ .dailyStats({ symbol: config.CURRENCY + config.MARKET })
+ .then(result => {
+ changePrice = parseFloat(result.priceChangePercent);
+ avgPrice = parseFloat(result.lastPrice);
+ minDay = parseFloat(result.lowPrice);
+ maxDay = parseFloat(result.highPrice);
+ spreadDay = parseFloat(maxDay - minDay).toFixed(4);
+ spreadOpera = parseFloat(spreadDay / 4);
+ otherStables = 0;
+ client
+ .accountInfo({ useServerTime: true })
+ .then(result => {
+ for (let i = 0; i < result.balances.length; i++) {
+ if (result.balances[i].asset == "BNB") {
+ balanceBNB =
+ parseFloat(result.balances[i].locked) +
+ parseFloat(result.balances[i].free);
+ } else if (result.balances[i].asset == "TUSD") {
+ botMemory.saldo_TUSD = (
+ parseFloat(result.balances[i].locked) +
+ parseFloat(result.balances[i].free)
+ ).toFixed(8);
+ } else if (result.balances[i].asset == "USDT") {
+ botMemory.saldo_USDT = (
+ parseFloat(result.balances[i].locked) +
+ parseFloat(result.balances[i].free)
+ ).toFixed(8);
+ } else if (result.balances[i].asset == "USDC") {
+ botMemory.saldo_USDC = (
+ parseFloat(result.balances[i].locked) +
+ parseFloat(result.balances[i].free)
+ ).toFixed(8);
+ } else if (result.balances[i].asset == "PAX") {
+ botMemory.saldo_PAX = (
+ parseFloat(result.balances[i].locked) +
+ parseFloat(result.balances[i].free)
+ ).toFixed(8);
+ } else if (result.balances[i].asset == "USDS") {
+ botMemory.saldo_USDS = (
+ parseFloat(result.balances[i].locked) +
+ parseFloat(result.balances[i].free)
+ ).toFixed(8);
+ } else if (result.balances[i].asset == "USDSB") {
+ botMemory.saldo_USDSB = (
+ parseFloat(result.balances[i].locked) +
+ parseFloat(result.balances[i].free)
+ ).toFixed(8);
+ } else if (result.balances[i].asset == config.MARKET) {
+ marketBalanceLocked = parseFloat(result.balances[i].locked);
+ marketBalanceFree = parseFloat(result.balances[i].free);
+ } else if (result.balances[i].asset == config.CURRENCY) {
+ currencyBalanceLocked = parseFloat(result.balances[i].locked);
+ currencyBalanceFree = parseFloat(result.balances[i].free);
+ } else if (coins.iOf(result.balances[i].asset) > -1) {
+ if (
+ result.balances[i].asset != config.MARKET &&
+ result.balances[i].asset != config.CURRENCY
+ ) {
+ let otherCoinsLocked = parseFloat(result.balances[i].locked);
+ let otherCoinsFree = parseFloat(result.balances[i].free);
+ otherStables =
+ otherStables + (otherCoinsLocked + otherCoinsFree);
+ }
+ }
+ }
- if (result.balances[index].asset == config.MARKET) {
- marketBalanceLocked = parseFloat(result.balances[index].locked);
- marketBalanceFree = parseFloat(result.balances[index].free);
- } else if (result.balances[index].asset == config.CURRENCY) {
- currencyBalanceLocked = parseFloat(result.balances[index].locked);
- currencyBalanceFree = parseFloat(result.balances[index].free);
+ total = (
+ marketBalanceLocked +
+ marketBalanceFree +
+ currencyBalanceLocked +
+ currencyBalanceFree +
+ otherStables
+ ).toFixed(8);
+
+ if (marketBalanceLocked + marketBalanceFree < total / 2) {
+ buyAmount = (((total / 2) * config.BUY_VALUE) / 100).toFixed(2);
+ sellAmount = (((total / 2) * config.BUY_VALUE) / 100).toFixed(2);
+ } else {
+ if (currencyBalanceLocked + currencyBalanceFree < total / 2) {
+ buyAmount = (((total / 2) * config.BUY_VALUE) / 100).toFixed(2);
+ sellAmount = (((total / 2) * config.BUY_VALUE) / 100).toFixed(
+ 2
+ );
+ } else {
+ if (setAmount == 0) {
+ buyAmount = (
+ ((marketBalanceLocked + marketBalanceFree) *
+ config.BUY_VALUE) /
+ 100
+ ).toFixed(2);
+ sellAmount = (
+ ((currencyBalanceLocked + currencyBalanceFree) *
+ config.BUY_VALUE) /
+ 100
+ ).toFixed(2);
+ setAmount = 1;
}
-
- if (coins.indexOf(result.balances[index].asset) > -1) {
- if((result.balances[index].asset != config.MARKET) && (result.balances[index].asset != config.CURRENCY)) {
- let otherCoinsLocked = parseFloat(result.balances[index].locked);
- let otherCoinsFree = parseFloat(result.balances[index].free);
- otherStables = (otherStables + (otherCoinsLocked + otherCoinsFree));
- }
- }
-
+ }
}
-
- total = (marketBalanceLocked + marketBalanceFree + currencyBalanceLocked + currencyBalanceFree + otherStables).toFixed(8);
- if((marketBalanceLocked + marketBalanceFree) < (total / 2)) {
- buyAmount = (((total/2) * config.BUY_VALUE) / 100 ).toFixed(2);
- sellAmount = (((total/2) * config.BUY_VALUE) / 100 ).toFixed(2);
- } else {
- if((currencyBalanceLocked + currencyBalanceFree) < (total / 2)) {
- buyAmount = (((total/2) * config.BUY_VALUE) / 100 ).toFixed(2);
- sellAmount = (((total/2) * config.BUY_VALUE) / 100 ).toFixed(2);
- } else {
- if (setAmount == 0) {
- buyAmount = (((marketBalanceLocked + marketBalanceFree) * config.BUY_VALUE) / 100).toFixed(2);
- sellAmount = ((( currencyBalanceLocked + currencyBalanceFree) * config.BUY_VALUE) / 100).toFixed(2);
- setAmount = 1;
- }
- }
- }
+ if (config.AUTO_SPREAD == 1) {
+ status_spread = "ATIVADO";
+ } else {
+ status_spread = "DESATIVADO";
+ }
- if(config.AUTO_SPREAD == 1) {
- status_spread = "ATIVADO";
- } else {
- status_spread = "DESATIVADO";
- }
+ console.clear();
+ console.log("===========================================");
+ console.log(
+ "SALDO " + config.MARKET + "...:",
+ marketBalanceLocked + marketBalanceFree
+ );
+ console.log(
+ "SALDO " + config.CURRENCY + "...:",
+ currencyBalanceLocked + currencyBalanceFree
+ );
+ console.log("OUTRAS STALBE:", otherStables.toFixed(8));
+ console.log("SALDO BNB....:", balanceBNB);
+ console.log("SALDO TOTAL..:", total, "USD");
+ console.log("AUTO SPREAD..:", status_spread);
+ console.log("MINIMA DO DIA:", minDay);
+ console.log("MAXIMA DO DIA:", maxDay);
+ console.log(config.CURRENCY + config.MARKET + ".....:", avgPrice);
+ console.log("VARIACAO 24H.:", changePrice + " %");
+ console.log("SPREAD 24H...:", spreadDay);
+ console.log("SPREAD OPERA.:", spreadOpera);
+ console.log("SALDO INICIAL:", config.INITIAL_INVESTMENT, "USD");
+ console.log(
+ "LUCRO........:",
+ (total - config.INITIAL_INVESTMENT).toFixed(4),
+ "USD"
+ );
+ console.log(
+ " ",
+ (
+ ((total - config.INITIAL_INVESTMENT) * 100) /
+ config.INITIAL_INVESTMENT
+ ).toFixed(2),
+ "%"
+ );
+ console.log("===========================================");
+ console.log(
+ "UPTIME.......:",
+ ((Math.floor(+new Date() / 1000) - startTime) / 3600).toFixed(2),
+ "horas"
+ );
+ console.log(
+ "ORDENS.......:",
+ "VENDAS: [",
+ totalVendas,
+ "] COMPRAS: [",
+ totalCompras,
+ "]"
+ );
+ simpleStrategy();
+ })
+ .catch(err => {
+ throw err;
+ });
+ })
+ .catch(err => {
+ console.log(err);
+ });
+ },
+ { scheduled: false }
+);
- console.clear();
- console.log("===========================================");
- console.log("SALDO "+ config.MARKET +"...:", marketBalanceLocked + marketBalanceFree);
- console.log("SALDO "+ config.CURRENCY +"...:", currencyBalanceLocked + currencyBalanceFree);
- console.log("OUTRAS STALBE:", otherStables.toFixed(8));
- console.log("SALDO BNB....:", balanceBNB);
- console.log("SALDO TOTAL..:", total, "USD");
- console.log("AUTO SPREAD..:", status_spread);
- console.log("MINIMA DO DIA:", minDay);
- console.log("MAXIMA DO DIA:", maxDay);
- console.log(config.CURRENCY + config.MARKET +".....:", avgPrice);
- console.log("VARIACAO 24H.:", changePrice +" %");
- console.log("SPREAD 24H...:", spreadDay);
- console.log("SPREAD OPERA.:", spreadOpera);
- console.log("SALDO INICIAL:", config.INITIAL_INVESTMENT, "USD");
- console.log("LUCRO........:", (total - config.INITIAL_INVESTMENT).toFixed(4), "USD");
- console.log(" ", ((total - config.INITIAL_INVESTMENT) * 100 / config.INITIAL_INVESTMENT).toFixed(2), "%");
- console.log("===========================================");
- console.log("UPTIME.......:", ((Math.floor(+new Date() / 1000) - startTime) / 3600).toFixed(2) , "horas");
- console.log("ORDENS.......:", "VENDAS: [", totalVendas, "] COMPRAS: [", totalCompras, "]");
- simpleStrategy();
- }).catch((err) => {
- throw err;
+function simpleStrategy() {
+ if (OrderBuyID != 0 && hasFundsBuy == 1) {
+ client
+ .getOrder({
+ symbol: config.CURRENCY + config.MARKET,
+ orderId: OrderBuyID
+ })
+ .then(result => {
+ dateOrderBuy = result.time;
+ if (result.status == "FILLED") {
+ filledBuyOrder = true;
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1f911} Ordem de compra executada com sucesso. Saldo atual: " +
+ config.MARKET +
+ ": " +
+ (marketBalanceLocked + marketBalanceFree).toFixed(4) +
+ " " +
+ config.CURRENCY +
+ " " +
+ (currencyBalanceLocked + currencyBalanceFree).toFixed(4) +
+ " Lucro atual: " +
+ (total - config.INITIAL_INVESTMENT).toFixed(4) +
+ " USD" +
+ " \u{1F4B0} " +
+ (
+ ((total - config.INITIAL_INVESTMENT) * 100) /
+ config.INITIAL_INVESTMENT
+ ).toFixed(2) +
+ "%"
+ );
+ }
+ client
+ .cancelOrder({
+ symbol: config.CURRENCY + config.MARKET,
+ orderId: OrderSellID
+ })
+ .catch(err => {
+ console.log(err);
});
- }).catch((err) => {
- console.log(err);
- });
-}, { scheduled: false });
+ }
-function simpleStrategy() {
- if(OrderBuyID != 0 && (hasFundsBuy == 1)) {
- client.getOrder({
- symbol: config.CURRENCY + config.MARKET,
- orderId: OrderBuyID,
- }).then((result) => {
- dateOrderBuy = result.time;
- if(result.status == 'FILLED') {
- filledBuyOrder = true;
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{1f911} Ordem de compra executada com sucesso. Saldo atual: '+ config.MARKET + ': '+ (marketBalanceLocked + marketBalanceFree).toFixed(4) +' '+ config.CURRENCY +' '+ (currencyBalanceLocked + currencyBalanceFree).toFixed(4) +' Lucro atual: '+ (total - config.INITIAL_INVESTMENT).toFixed(4) + " USD" +' \u{1F4B0} '+ ((total - config.INITIAL_INVESTMENT) * 100 / config.INITIAL_INVESTMENT).toFixed(2) +'%');
- }
- client.cancelOrder({
- symbol: config.CURRENCY + config.MARKET,
- orderId: OrderSellID,}).catch((err) => {
- console.log(err);
- });
- }
+ if (result.status == "CANCELED") {
+ filledBuyOrder = true;
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1f6a8} Ordem de compra " +
+ OrderBuyID +
+ " cancelada na exchange, gerando uma nova ordem."
+ );
+ }
+ }
+ })
+ .catch(err => {
+ throw err;
+ });
+ }
- if(result.status == 'CANCELED') {
- filledBuyOrder = true;
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{1f6a8} Ordem de compra '+ OrderBuyID +' cancelada na exchange, gerando uma nova ordem.');
- }
- }
- }).catch((err) => {
- throw err;
- });
- }
+ if (OrderSellID != 0 && hasFundsSell == 1) {
+ client
+ .getOrder({
+ symbol: config.CURRENCY + config.MARKET,
+ orderId: OrderSellID
+ })
+ .then(result => {
+ dateOrderSell = result.time;
+ if (result.status == "FILLED") {
+ filledSellOrder = true;
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1f911} Ordem de venda executada com sucesso. Saldo atual: " +
+ config.MARKET +
+ ": " +
+ (marketBalanceLocked + marketBalanceFree).toFixed(4) +
+ " " +
+ config.CURRENCY +
+ " " +
+ (currencyBalanceLocked + currencyBalanceFree).toFixed(4) +
+ " Lucro atual: " +
+ (total - config.INITIAL_INVESTMENT).toFixed(4) +
+ " USD" +
+ " \u{1F4B0} " +
+ (
+ ((total - config.INITIAL_INVESTMENT) * 100) /
+ config.INITIAL_INVESTMENT
+ ).toFixed(2) +
+ "%"
+ );
+ }
+ client
+ .cancelOrder({
+ symbol: config.CURRENCY + config.MARKET,
+ orderId: OrderBuyID
+ })
+ .catch(err => {
+ console.log(err);
+ });
+ }
- if(OrderSellID != 0 && (hasFundsSell == 1)) {
- client.getOrder({
- symbol: config.CURRENCY + config.MARKET,
- orderId: OrderSellID,
- }).then((result) => {
- dateOrderSell = result.time;
- if(result.status == 'FILLED') {
- filledSellOrder = true;
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{1f911} Ordem de venda executada com sucesso. Saldo atual: '+ config.MARKET + ': '+ (marketBalanceLocked + marketBalanceFree).toFixed(4) +' '+ config.CURRENCY +' '+ (currencyBalanceLocked + currencyBalanceFree).toFixed(4) +' Lucro atual: '+ (total - config.INITIAL_INVESTMENT).toFixed(4) + " USD" +' \u{1F4B0} '+ ((total - config.INITIAL_INVESTMENT) * 100 / config.INITIAL_INVESTMENT).toFixed(2) +'%');
- }
- client.cancelOrder({
- symbol: config.CURRENCY + config.MARKET,
- orderId: OrderBuyID,}).catch((err) => {
- console.log(err);
- });
- }
+ if (result.status == "CANCELED") {
+ filledSellOrder = true;
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1f6a8} Ordem de venda " +
+ OrderSellID +
+ " cancelada na exchange, gerando uma nova ordem."
+ );
+ }
+ }
+ })
+ .catch(err => {
+ throw err;
+ });
+ }
- if(result.status == 'CANCELED') {
- filledSellOrder = true;
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{1f6a8} Ordem de venda '+ OrderSellID +' cancelada na exchange, gerando uma nova ordem.');
- }
- }
- }).catch((err) => {
- throw err;
+ if (config.ORDER_EXPIRE != 0) {
+ date = new Date(dateOrderBuy);
+ dateOrderBuyExpire = date.setHours(date.getHours() + config.ORDER_EXPIRE);
+ if (
+ dateOrderBuyExpire > 1546300800 &&
+ Date.now() > dateOrderBuyExpire &&
+ OrderBuyID != 0 &&
+ buyPriceTemp != 0 &&
+ countExpireBuy > 2
+ ) {
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{231b} A ordem de compra expirou em " +
+ new Date(dateOrderSellExpire) +
+ " sem execução do mercado. Timeout em " +
+ config.ORDER_EXPIRE +
+ " horas. Será gerada uma nova ordem de compra para operação."
+ );
+ }
+ client
+ .cancelOrder({
+ symbol: config.CURRENCY + config.MARKET,
+ orderId: OrderBuyID
+ })
+ .catch(err => {
+ console.log(err);
});
+ countExpireBuy = 0;
+ } else {
+ countExpireBuy++;
}
- if(config.ORDER_EXPIRE != 0) {
- date = new Date(dateOrderBuy);
- dateOrderBuyExpire = date.setHours(date.getHours() + config.ORDER_EXPIRE);
- if((dateOrderBuyExpire > 1546300800) && (Date.now() > dateOrderBuyExpire) && (OrderBuyID != 0) && (buyPriceTemp != 0) && (countExpireBuy > 2)) {
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{231b} A ordem de compra expirou em '+ new Date(dateOrderSellExpire) +' sem execução do mercado. Timeout em '+ config.ORDER_EXPIRE +' horas. Será gerada uma nova ordem de compra para operação.');
- }
- client.cancelOrder({
- symbol: config.CURRENCY + config.MARKET,
- orderId: OrderBuyID,}).catch((err) => {
- console.log(err);
- });
- countExpireBuy = 0;
- } else {
- countExpireBuy++;
- }
-
- date = new Date(dateOrderSell);
- dateOrderSellExpire = date.setHours(date.getHours() + config.ORDER_EXPIRE);
- if((dateOrderSellExpire > 1546300800) && (Date.now() > dateOrderSellExpire) && (OrderSellID != 0) && (sellPriceTemp != 0) && (countExpireSell > 2)) {
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{231b} A ordem de venda expirou em '+ new Date(dateOrderSellExpire) +' sem execução do mercado. Timeout em '+ config.ORDER_EXPIRE +' horas. Será gerada uma nova ordem de venda para operação.');
- }
- client.cancelOrder({
- symbol: config.CURRENCY + config.MARKET,
- orderId: OrderSellID,}).catch((err) => {
- console.log(err);
- });
- countExpireSell = 0;
- } else {
- countExpireSell++;
- }
+ date = new Date(dateOrderSell);
+ dateOrderSellExpire = date.setHours(date.getHours() + config.ORDER_EXPIRE);
+ if (
+ dateOrderSellExpire > 1546300800 &&
+ Date.now() > dateOrderSellExpire &&
+ OrderSellID != 0 &&
+ sellPriceTemp != 0 &&
+ countExpireSell > 2
+ ) {
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{231b} A ordem de venda expirou em " +
+ new Date(dateOrderSellExpire) +
+ " sem execução do mercado. Timeout em " +
+ config.ORDER_EXPIRE +
+ " horas. Será gerada uma nova ordem de venda para operação."
+ );
+ }
+ client
+ .cancelOrder({
+ symbol: config.CURRENCY + config.MARKET,
+ orderId: OrderSellID
+ })
+ .catch(err => {
+ console.log(err);
+ });
+ countExpireSell = 0;
+ } else {
+ countExpireSell++;
+ }
+ }
- }
-
- if ((config.AUTO_SPREAD == 1) && (SpreadTemp != 0) && (SpreadTemp != spreadOpera) && (spreadOpera >= config.SPREAD_MIN)) {
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{1f6a7} Ajuste no spread de mercado de '+ SpreadTemp +' para '+ spreadOpera +' para variação de '+ changePrice + ' %. As próximas ordens vão utilizar esta margem.');
- }
+ if (
+ config.AUTO_SPREAD == 1 &&
+ SpreadTemp != 0 &&
+ SpreadTemp != spreadOpera &&
+ spreadOpera >= config.SPREAD_MIN
+ ) {
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1f6a7} Ajuste no spread de mercado de " +
+ SpreadTemp +
+ " para " +
+ spreadOpera +
+ " para variação de " +
+ changePrice +
+ " %. As próximas ordens vão utilizar esta margem."
+ );
}
- SpreadTemp = spreadOpera;
- changePriceTemp = changePrice;
+ }
+ SpreadTemp = spreadOpera;
+ changePriceTemp = changePrice;
- if(config.AUTO_SPREAD == 1) {
- if((OrderSellID == 0 && OrderBuyID == 0) || (spreadOpera <= config.SPREAD_MIN)) {
- spreadOpera = config.SPREAD_MIN;
- buyPrice = (avgPrice * (1 - spreadOpera)).toFixed(4);
- sellPrice = (avgPrice * (1 + spreadOpera)).toFixed(4);
- } else {
- buyPrice = (avgPrice - (spreadOpera)).toFixed(4);
- sellPrice = (avgPrice + (spreadOpera)).toFixed(4);
- }
+ if (config.AUTO_SPREAD == 1) {
+ if (
+ (OrderSellID == 0 && OrderBuyID == 0) ||
+ spreadOpera <= config.SPREAD_MIN
+ ) {
+ spreadOpera = config.SPREAD_MIN;
+ buyPrice = (avgPrice * (1 - spreadOpera)).toFixed(4);
+ sellPrice = (avgPrice * (1 + spreadOpera)).toFixed(4);
} else {
- buyPrice = (avgPrice * (1 - config.SPREAD_BUY)).toFixed(4);
- sellPrice = (avgPrice * (1 + config.SPREAD_SELL)).toFixed(4);
+ buyPrice = (avgPrice - spreadOpera).toFixed(4);
+ sellPrice = (avgPrice + spreadOpera).toFixed(4);
}
-
+ } else {
+ buyPrice = (avgPrice * (1 - config.SPREAD_BUY)).toFixed(4);
+ sellPrice = (avgPrice * (1 + config.SPREAD_SELL)).toFixed(4);
+ }
+
+ client
+ .myTrades({
+ symbol: config.CURRENCY + config.MARKET
+ })
+ .then(result => {
+ if (filledSellOrder == true) {
+ for (let i = result.length - 1; i > 1; i--) {
+ if (
+ result[i].isBuyer == true &&
+ filledSellOrder == true &&
+ currencyBalanceFree >= 20
+ ) {
+ if (
+ sellPrice - parseFloat(result[i].price).toFixed(4) <
+ spreadOpera
+ ) {
+ let sellPriceTemp = (
+ parseFloat(result[i].price).toFixed(4) *
+ (1 + spreadOpera)
+ ).toFixed(4);
+ if (
+ sellPriceTemp > avgPrice &&
+ sellPriceTemp - avgPrice >= spreadOpera &&
+ notifySellMin == 0
+ ) {
+ sellPrice = sellPriceTemp;
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{2716} ALERTA: A ordem de venda está em um valor abaixo da diferença de spread " +
+ spreadOpera +
+ " da última ordem de compra no valor de " +
+ parseFloat(result[i].price).toFixed(4) +
+ " comparado ao preço atual de mercado em " +
+ avgPrice +
+ ". Ela teve seu valor reajustado para: " +
+ sellPrice +
+ "."
+ );
+ }
+ } else {
+ if (bot_enabled == 1 && notifySellMin == 0) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{2714} AVISO: A ordem de venda está dentro da diferença de spread " +
+ spreadOpera +
+ " da última ordem de compra no valor de " +
+ parseFloat(result[i].price).toFixed(4) +
+ ""
+ );
+ }
+ }
+ } else {
+ if (bot_enabled == 1 && notifySellMin == 0) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{2714} AVISO: A ordem de venda está dentro da diferença de spread " +
+ spreadOpera +
+ " da última ordem de compra no valor de " +
+ parseFloat(result[i].price).toFixed(4) +
+ ""
+ );
+ }
+ }
+ i = 0;
+ }
+ }
+ }
+
+ if (filledBuyOrder == true) {
+ for (let i = result.length - 1; i > 1; i--) {
+ if (
+ result[i].isBuyer == false &&
+ filledBuyOrder == true &&
+ marketBalanceFree >= 20
+ ) {
+ if (
+ buyPrice - parseFloat(result[i].price).toFixed(4) <
+ spreadOpera
+ ) {
+ let buyPriceTemp = (
+ parseFloat(result[i].price).toFixed(4) *
+ (1 - spreadOpera)
+ ).toFixed(4);
+ if (
+ buyPriceTemp < avgPrice &&
+ avgPrice - buyPriceTemp >= spreadOpera &&
+ notifyBuyMax == 0
+ ) {
+ buyPrice = buyPriceTemp;
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{2716} ALERTA: A ordem de compra está em um valor abaixo da diferença de spread " +
+ spreadOpera +
+ " da última ordem de venda no valor de " +
+ parseFloat(result[i].price).toFixed(4) +
+ " comparado ao preço atual de mercado em " +
+ avgPrice +
+ ". Ela teve seu valor reajustado para: " +
+ buyPrice +
+ "."
+ );
+ }
+ } else {
+ if (bot_enabled == 1 && notifyBuyMax == 0) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{2714} AVISO: A ordem de compra está dentro da diferença de spread " +
+ spreadOpera +
+ " da última ordem de venda no valor de " +
+ parseFloat(result[i].price).toFixed(4) +
+ ""
+ );
+ }
+ }
+ } else {
+ if (bot_enabled == 1 && notifyBuyMax == 0) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{2714} AVISO: A ordem de compra está dentro da diferença de spread " +
+ spreadOpera +
+ " da última ordem de venda no valor de " +
+ parseFloat(result[i].price).toFixed(4) +
+ ""
+ );
+ }
+ }
+ i = 0;
+ }
+ }
+ }
+ });
- client.myTrades({
- symbol: config.CURRENCY + config.MARKET,
- }).then((result) => {
- if(filledSellOrder == true) {
- for (let index = (result.length -1); index > 1; index--) {
- if((result[index].isBuyer == true) && (filledSellOrder == true) && (currencyBalanceFree >= 20)) {
- if(sellPrice - parseFloat(result[index].price).toFixed(4) < spreadOpera) {
- let sellPriceTemp = (parseFloat(result[index].price).toFixed(4) * (1 + spreadOpera)).toFixed(4);
- if((sellPriceTemp > avgPrice) && ((sellPriceTemp - avgPrice) >= spreadOpera) && notifySellMin == 0) {
- sellPrice = sellPriceTemp;
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{2716} ALERTA: A ordem de venda está em um valor abaixo da diferença de spread '+ spreadOpera +' da última ordem de compra no valor de '+ parseFloat(result[index].price).toFixed(4) +' comparado ao preço atual de mercado em '+ avgPrice +'. Ela teve seu valor reajustado para: '+ sellPrice +'.');
- }
- } else {
- if(bot_enabled == 1 && notifySellMin == 0) {
- bot.sendMessage(config.BOT_CHAT, '\u{2714} AVISO: A ordem de venda está dentro da diferença de spread '+ spreadOpera +' da última ordem de compra no valor de '+ parseFloat(result[index].price).toFixed(4) +'');
- }
- }
- } else {
- if(bot_enabled == 1 && notifySellMin == 0) {
- bot.sendMessage(config.BOT_CHAT, '\u{2714} AVISO: A ordem de venda está dentro da diferença de spread '+ spreadOpera +' da última ordem de compra no valor de '+ parseFloat(result[index].price).toFixed(4) +'');
- }
- }
- index = 0;
- }
- }
- }
-
- if(filledBuyOrder == true) {
- for (let index = (result.length - 1); index > 1; index--) {
- if((result[index].isBuyer == false) && (filledBuyOrder == true) && (marketBalanceFree >= 20)) {
- if(buyPrice - parseFloat(result[index].price).toFixed(4) < spreadOpera) {
- let buyPriceTemp = (parseFloat(result[index].price).toFixed(4) * (1 - spreadOpera)).toFixed(4);
- if ((buyPriceTemp < avgPrice) && ((avgPrice - buyPriceTemp) >= spreadOpera) && notifyBuyMax == 0) {
- buyPrice = buyPriceTemp;
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{2716} ALERTA: A ordem de compra está em um valor abaixo da diferença de spread '+ spreadOpera +' da última ordem de venda no valor de '+ parseFloat(result[index].price).toFixed(4) +' comparado ao preço atual de mercado em '+ avgPrice +'. Ela teve seu valor reajustado para: '+ buyPrice +'.');
- }
- } else {
- if(bot_enabled == 1 && notifyBuyMax == 0) {
- bot.sendMessage(config.BOT_CHAT, '\u{2714} AVISO: A ordem de compra está dentro da diferença de spread '+ spreadOpera +' da última ordem de venda no valor de '+ parseFloat(result[index].price).toFixed(4) +'');
- }
- }
- } else {
- if(bot_enabled == 1 && notifyBuyMax == 0) {
- bot.sendMessage(config.BOT_CHAT, '\u{2714} AVISO: A ordem de compra está dentro da diferença de spread '+ spreadOpera +' da última ordem de venda no valor de '+ parseFloat(result[index].price).toFixed(4) +'');
- }
- }
- index = 0;
- }
- }
- }
- });
-
-
- client.dailyStats({ symbol: "BTC" + config.MARKET }).then((result) => {
- console.log("DEFINIDOS....: Compra " + buyPrice + " e Venda " + sellPrice);
- console.log("TIMEOUT ORDEM:"+ " "+config.ORDER_EXPIRE+" horas");
- console.log("HORA AGORA...:"+ " "+new Date());
- console.log("============== DADOS DE COMPRA ============");
- console.log("VALOR COMPRA.:", buyAmount);
- console.log("PRECO COMPRA.:", parseFloat(buyPriceTemp).toFixed(4));
- console.log("ID ORDEM BUY.:", OrderBuyID);
- console.log("EXPIRA EM....:", new Date(dateOrderBuyExpire));
- console.log("============== DADOS DE VENDA =============");
- console.log("VALOR VENDA..:", sellAmount);
- console.log("PRECO VENDA..:", parseFloat(sellPriceTemp).toFixed(4));
- console.log("ID ORDEM SELL:", OrderSellID);
- console.log("EXPIRA EM....:", new Date(dateOrderSellExpire));
- console.log("===========================================");
- client.openOrders({
- symbol: config.CURRENCY + config.MARKET,
- }).then((result) => {
- if (filledBuyOrder == true) {
- if ((marketBalanceFree > 20 || marketBalanceFree >= buyAmount) && buyPrice < config.BUY_MAX) {
- if((marketBalanceFree > 20) && (marketBalanceFree <= buyAmount)) {
- buyAmount = parseFloat(marketBalanceFree).toFixed(2);
- }
- client.order({
- symbol: config.CURRENCY + config.MARKET,
- side: 'BUY',
- quantity: buyAmount,
- price: buyPrice,
- useServerTime: true
- }).then((result) => {
- totalCompras++;
- OrderBuyID = result.orderId;
- filledBuyOrder = false;
- }).catch((err) => {
- totalCompras--;
- throw err;
- });
- notifyBuyMax = 0;
- hasFundsBuy = 1;
- buyPriceTemp = buyPrice;
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{1F4C9} Order de compra criada com sucesso: Quantidade comprada: \u{1f4b5} '+ buyAmount +', valor de compra: \u{1f3f7} '+ buyPrice +' utilizando spread em '+ spreadOpera +'.');
- }
- } else {
- if(bot_enabled == 1 && notifyBuyMax == 0 && marketBalanceFree >= buyAmount) {
- bot.sendMessage(config.BOT_CHAT, '\u{274C} O valor de compra do mercado esta acima do definido em '+ config.BUY_MAX+'. O bot vai aguardar o preço reduzir até o valor definido para evitar prejuízos.');
- notifyBuyMax = 1;
- }
- if(bot_enabled == 1 && hasFundsBuy == 1 && notifyBuyMax == 0) {
- bot.sendMessage(config.BOT_CHAT, '\u{1F6AB} O bot está sem saldo para compras em '+ config.MARKET +'. Seu saldo atual é: '+marketBalanceFree+'. O bot vai aguardar até que uma compra seja executada para liberar saldo.');
- notifyBuyMax = 1;
- }
- OrderBuyID = 0;
- hasFundsBuy = 0;
- }
- }
+ client
+ .dailyStats({ symbol: "BTC" + config.MARKET })
+ .then(result => {
+ console.log(
+ "DEFINIDOS....: Compra " + buyPrice + " e Venda " + sellPrice
+ );
+ console.log("TIMEOUT ORDEM:" + " " + config.ORDER_EXPIRE + " horas");
+ console.log("HORA AGORA...:" + " " + new Date());
+ console.log("============== DADOS DE COMPRA ============");
+ console.log("VALOR COMPRA.:", buyAmount);
+ console.log("PRECO COMPRA.:", parseFloat(buyPriceTemp).toFixed(4));
+ console.log("ID ORDEM BUY.:", OrderBuyID);
+ console.log("EXPIRA EM....:", new Date(dateOrderBuyExpire));
+ console.log("============== DADOS DE VENDA =============");
+ console.log("VALOR VENDA..:", sellAmount);
+ console.log("PRECO VENDA..:", parseFloat(sellPriceTemp).toFixed(4));
+ console.log("ID ORDEM SELL:", OrderSellID);
+ console.log("EXPIRA EM....:", new Date(dateOrderSellExpire));
+ console.log("===========================================");
+ client
+ .openOrders({
+ symbol: config.CURRENCY + config.MARKET
+ })
+ .then(result => {
+ if (filledBuyOrder == true) {
+ if (
+ (marketBalanceFree > 20 || marketBalanceFree >= buyAmount) &&
+ buyPrice < config.BUY_MAX
+ ) {
+ if (marketBalanceFree > 20 && marketBalanceFree <= buyAmount) {
+ buyAmount = parseFloat(marketBalanceFree).toFixed(2);
+ }
+ client
+ .order({
+ symbol: config.CURRENCY + config.MARKET,
+ side: "BUY",
+ quantity: buyAmount,
+ price: buyPrice,
+ useServerTime: true
+ })
+ .then(result => {
+ totalCompras++;
+ OrderBuyID = result.orderId;
+ filledBuyOrder = false;
+ })
+ .catch(err => {
+ totalCompras--;
+ throw err;
+ });
+ notifyBuyMax = 0;
+ hasFundsBuy = 1;
+ buyPriceTemp = buyPrice;
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1F4C9} Order de compra criada com sucesso: Quantidade comprada: \u{1f4b5} " +
+ buyAmount +
+ ", valor de compra: \u{1f3f7} " +
+ buyPrice +
+ " utilizando spread em " +
+ spreadOpera +
+ "."
+ );
+ }
+ } else {
+ if (
+ bot_enabled == 1 &&
+ notifyBuyMax == 0 &&
+ marketBalanceFree >= buyAmount
+ ) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{274C} O valor de compra do mercado esta acima do definido em " +
+ config.BUY_MAX +
+ ". O bot vai aguardar o preço reduzir até o valor definido para evitar prejuízos."
+ );
+ notifyBuyMax = 1;
+ }
+ if (bot_enabled == 1 && hasFundsBuy == 1 && notifyBuyMax == 0) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1F6AB} O bot está sem saldo para compras em " +
+ config.MARKET +
+ ". Seu saldo atual é: " +
+ marketBalanceFree +
+ ". O bot vai aguardar até que uma compra seja executada para liberar saldo."
+ );
+ notifyBuyMax = 1;
+ }
+ OrderBuyID = 0;
+ hasFundsBuy = 0;
+ }
+ }
- if (filledSellOrder == true) {
- if ((currencyBalanceFree > 20 || currencyBalanceFree >= sellAmount) && sellPrice > config.SELL_MIN) {
- if((currencyBalanceFree > 20) && (currencyBalanceFree <= sellAmount)) {
- sellAmount = parseFloat(currencyBalanceFree).toFixed(2);
- }
- client.order({
- symbol: config.CURRENCY + config.MARKET,
- side: 'SELL',
- quantity: sellAmount,
- price: sellPrice,
- useServerTime: true
- }).then((result) => {
- totalVendas++;
- OrderSellID = result.orderId;
- filledSellOrder = false;
- }).catch((err) => {
- totalVendas--;
- throw err;
- });
- notifySellMin = 0;
- hasFundsSell = 1;
- sellPriceTemp = sellPrice;
- if(bot_enabled == 1) {
- bot.sendMessage(config.BOT_CHAT, '\u{1F4C8} Order de venda criada com sucesso: Quantidade vendida: \u{1f4b5} '+ sellAmount +', valor de venda: \u{1f3f7} '+ sellPrice +' utilizando spread em '+ spreadOpera +'.');
- }
- } else {
- if(bot_enabled == 1 && notifySellMin == 0 && currencyBalanceFree >= sellAmount) {
- bot.sendMessage(config.BOT_CHAT, '\u{274C} O valor de venda do mercado esta abaixo do definido em '+ config.SELL_MIN+'. O bot vai aguardar o preço aumentar até o valor definido para evitar prejuízos.');
- notifySellMin = 1;
- }
- if(bot_enabled == 1 && hasFundsSell == 1 && notifySellMin == 0) {
- bot.sendMessage(config.BOT_CHAT, '\u{1F6AB} O bot está sem saldo para vendas em '+ config.CURRENCY +'. Seu saldo atual é: '+currencyBalanceFree+'. O bot vai aguardar até que uma compra seja executada para liberar saldo.');
- notifySellMin = 1;
- }
- OrderSellID = 0;
- hasFundsSell = 0;
- }
- }
- }).catch((err) => {
- throw err;
- });
- }).catch((err) => {
- throw err;
- });
+ if (filledSellOrder == true) {
+ if (
+ (currencyBalanceFree > 20 || currencyBalanceFree >= sellAmount) &&
+ sellPrice > config.SELL_MIN
+ ) {
+ if (
+ currencyBalanceFree > 20 &&
+ currencyBalanceFree <= sellAmount
+ ) {
+ sellAmount = parseFloat(currencyBalanceFree).toFixed(2);
+ }
+ client
+ .order({
+ symbol: config.CURRENCY + config.MARKET,
+ side: "SELL",
+ quantity: sellAmount,
+ price: sellPrice,
+ useServerTime: true
+ })
+ .then(result => {
+ totalVendas++;
+ OrderSellID = result.orderId;
+ filledSellOrder = false;
+ })
+ .catch(err => {
+ totalVendas--;
+ throw err;
+ });
+ notifySellMin = 0;
+ hasFundsSell = 1;
+ sellPriceTemp = sellPrice;
+ if (bot_enabled == 1) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1F4C8} Order de venda criada com sucesso: Quantidade vendida: \u{1f4b5} " +
+ sellAmount +
+ ", valor de venda: \u{1f3f7} " +
+ sellPrice +
+ " utilizando spread em " +
+ spreadOpera +
+ "."
+ );
+ }
+ } else {
+ if (
+ bot_enabled == 1 &&
+ notifySellMin == 0 &&
+ currencyBalanceFree >= sellAmount
+ ) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{274C} O valor de venda do mercado esta abaixo do definido em " +
+ config.SELL_MIN +
+ ". O bot vai aguardar o preço aumentar até o valor definido para evitar prejuízos."
+ );
+ notifySellMin = 1;
+ }
+ if (bot_enabled == 1 && hasFundsSell == 1 && notifySellMin == 0) {
+ bot.sendMessage(
+ config.BOT_CHAT,
+ "\u{1F6AB} O bot está sem saldo para vendas em " +
+ config.CURRENCY +
+ ". Seu saldo atual é: " +
+ currencyBalanceFree +
+ ". O bot vai aguardar até que uma compra seja executada para liberar saldo."
+ );
+ notifySellMin = 1;
+ }
+ OrderSellID = 0;
+ hasFundsSell = 0;
+ }
+ }
+ })
+ .catch(err => {
+ throw err;
+ });
+ })
+ .catch(err => {
+ throw err;
+ });
}
// limpa o console
console.clear();
// define as variaveis
-notifyBuyMax = 0
-notifySellMin = 0;
-otherStables = 0;
-hasFundsBuy = 1;
-hasFundsSell = 1;
-countExpireBuy = 0;
-countExpireSell = 0
-dateOrderBuy = 0
-dateOrderBuyExpire = 0;
-dateOrderSell = 0;
-dateOrderSellExpire = 0;
-buyPriceTemp = 0;
-sellPriceTemp = 0;
-changePriceTemp = 0;
-startTime = Math.floor(+new Date() / 1000);
-avgPrice = 0;
-OrderBuyID = 0;
-filledBuyOrder = true;
-filledSellOrder = true;
-OrderSellID = 0;
-SpreadTemp = 0;
-totalCompras = 0;
-totalVendas = 0;
-marketBalanceLocked = 0;
-marketBalanceFree = 0;
-currencyBalanceLocked = 0;
-currencyBalanceFree = 0;
-total = 0;
-setAmount = 0;
-setBuyOrder = 0;
-saldo_TUSD = 0;
-saldo_USDT = 0;
-saldo_USDC = 0;
-saldo_PAX = 0;
-saldo_USDS = 0;
-saldo_USDSB = 0;
-total_stable = 0;
+let botMemory = {
+ notifyBuyMax: 0,
+ notifySellMin: 0,
+ otherStables: 0,
+ hasFundsBuy: 1,
+ hasFundsSell: 1,
+ countExpireBuy: 0,
+ countExpireSell: 0,
+ dateOrderBuy: 0,
+ dateOrderBuyExpire: 0,
+ dateOrderSell: 0,
+ dateOrderSellExpire: 0,
+ buyPriceTemp: 0,
+ sellPriceTemp: 0,
+ changePriceTemp: 0,
+ startTime: Date.now(),
+ avgPrice: 0,
+ OrderBuyID: 0,
+ filledBuyOrder: true,
+ filledSellOrder: true,
+ OrderSellID: 0,
+ SpreadTemp: 0,
+ totalCompras: 0,
+ totalVendas: 0,
+ marketBalanceLocked: 0,
+ marketBalanceFree: 0,
+ currencyBalanceLocked: 0,
+ currencyBalanceFree: 0,
+ total: 0,
+ setAmount: 0,
+ setBuyOrder: 0,
+ saldo_TUSD: 0,
+ saldo_USDT: 0,
+ saldo_USDC: 0,
+ saldo_PAX: 0,
+ saldo_USDS: 0,
+ saldo_USDSB: 0,
+ total_stable: 0
+};
console.log("Iniciando...");
task.start();
-app.get('/', (req, res) => {
- let total_investiment = (total - config.INITIAL_INVESTMENT).toFixed(8);
- res.json(
- {
- initialInvestment: config.INITIAL_INVESTMENT,
- market: config.MARKET,
- currency: config.CURRENCY,
- balances: {
- usdt: parseFloat(saldo_USDT),
- tusd: parseFloat(saldo_TUSD),
- pax: parseFloat(saldo_PAX),
- usdc: parseFloat(saldo_USDC),
- usds: parseFloat(saldo_USDS),
- usdsb: parseFloat(saldo_USDSB)
- },
- profit: {
- USD: parseFloat(total_investiment),
- percent: parseFloat(((total - config.INITIAL_INVESTMENT) * 100 / config.INITIAL_INVESTMENT).toFixed(2))
- }
- }
- );
+app.get("/", (req, res) => {
+ let total_investiment = (total - config.INITIAL_INVESTMENT).toFixed(8);
+ res.json({
+ initialInvestment: config.INITIAL_INVESTMENT,
+ market: config.MARKET,
+ currency: config.CURRENCY,
+ balances: {
+ usdt: parseFloat(botMemory.saldo_USDT),
+ tusd: parseFloat(botMemory.saldo_TUSD),
+ pax: parseFloat(botMemory.saldo_PAX),
+ usdc: parseFloat(botMemory.saldo_USDC),
+ usds: parseFloat(botMemory.saldo_USDS),
+ usdsb: parseFloat(botMemory.saldo_USDSB)
+ },
+ profit: {
+ USD: parseFloat(total_investiment),
+ percent: parseFloat(
+ (
+ ((total - config.INITIAL_INVESTMENT) * 100) /
+ config.INITIAL_INVESTMENT
+ ).toFixed(2)
+ )
+ }
+ });
});
app.listen(config.LISTEN_PORT);
diff --git a/package-lock.json b/package-lock.json
index 0ace019..ea8efbf 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -120,6 +120,11 @@
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
+ "esm": {
+ "version": "3.2.25",
+ "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
+ "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA=="
+ },
"etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
diff --git a/package.json b/package.json
index c93b68c..9c2ee63 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,7 @@
"dependencies": {
"binance-api-node": "^0.9.2",
"dateformat": "^3.0.3",
+ "esm": "^3.2.25",
"express": "^4.17.1",
"get-json": "^1.0.1",
"http": "0.0.0",
From 6586127dc417b0b9f178a5a65894cec0e1094279 Mon Sep 17 00:00:00 2001
From: Toledo
Date: Thu, 26 Sep 2019 08:36:50 -0300
Subject: [PATCH 2/6] code refactor
---
config.json | 5 ++-
test.js => dev/test.js | 0
package.json | 4 +-
main.js => src/index.js | 92 +++++++++++++++++++-------------------
report.js => src/report.js | 0
src/utils.js | 5 +++
6 files changed, 57 insertions(+), 49 deletions(-)
rename test.js => dev/test.js (100%)
rename main.js => src/index.js (91%)
rename report.js => src/report.js (100%)
create mode 100644 src/utils.js
diff --git a/config.json b/config.json
index b28c9e4..2da3bd5 100644
--- a/config.json
+++ b/config.json
@@ -3,6 +3,7 @@
"SECRET_KEY": "",
"CURRENCY": "PAX",
"MARKET" : "USDT",
+ "COINS" : ["TUSD", "USDT", "USDC", "USDC", "PAX", "USDS", "USDSB"],
"SPREAD_SELL" : 0.00150,
"SPREAD_BUY" : 0.00150,
"BUY_MAX" : 0.9993,
@@ -12,8 +13,8 @@
"BUY_VALUE" : 11,
"SPREAD_MIN" : 0.00150,
"LOOP_TIME": 15,
- "BOT_TOKEN": "",
- "BOT_CHAT": "",
+ "TELEGRAM_TOKEN": "",
+ "TELEGRAM_CHAT": "",
"INITIAL_INVESTMENT": 2925.67,
"LISTEN_PORT" : 82,
"LISTEN_REPORT" : 3000
diff --git a/test.js b/dev/test.js
similarity index 100%
rename from test.js
rename to dev/test.js
diff --git a/package.json b/package.json
index 9c2ee63..d707320 100644
--- a/package.json
+++ b/package.json
@@ -2,10 +2,10 @@
"name": "stablecoins-infinity-profit-bot",
"version": "1.0.0",
"description": "Make infinity money with stablecoins",
- "main": "main.js",
+ "main": "index.js",
"repository": "github:itxtoledo/Stablecoins-Infinity-Profit-Bot",
"scripts": {
- "start": "node main.js"
+ "start": "node -r esm ./src/index.js"
},
"author": {
"name": "Gustavo Toledo",
diff --git a/main.js b/src/index.js
similarity index 91%
rename from main.js
rename to src/index.js
index 1a444fc..20ce19d 100644
--- a/main.js
+++ b/src/index.js
@@ -2,17 +2,17 @@ import config from "./config.json";
import cron from "node-cron";
import express from "express";
import Binance from "binance-api-node";
+import { isInArray } from "./utils.js";
+import telegraf from 'telegraf';
-let coins = ["TUSD", "USDT", "USDC", "USDC", "PAX", "USDS", "USDSB"];
+let app = express();
const client = Binance({
apiKey: config.API_KEY,
apiSecret: config.SECRET_KEY
});
-if (config.BOT_TOKEN == "" && config.BOT_CHAT == "") {
- bot_enabled = 0;
-} else {
+if (config.BOT_TOKEN != "" && config.BOT_CHAT != "") {
const TelegramBot = require("node-telegram-bot-api");
const TOKEN = config.BOT_TOKEN;
var bot = new TelegramBot(TOKEN, { polling: true });
@@ -20,7 +20,7 @@ if (config.BOT_TOKEN == "" && config.BOT_CHAT == "") {
config.BOT_CHAT,
"\u{1F916} stablecoins-infinity-profit-bot iniciando"
);
- bot_enabled = 1;
+ botMemory.telegram = true;
}
client
@@ -98,7 +98,7 @@ var task = cron.schedule(
maxDay = parseFloat(result.highPrice);
spreadDay = parseFloat(maxDay - minDay).toFixed(4);
spreadOpera = parseFloat(spreadDay / 4);
- otherStables = 0;
+ botMemory.otherStables = 0;
client
.accountInfo({ useServerTime: true })
.then(result => {
@@ -143,15 +143,13 @@ var task = cron.schedule(
} else if (result.balances[i].asset == config.CURRENCY) {
currencyBalanceLocked = parseFloat(result.balances[i].locked);
currencyBalanceFree = parseFloat(result.balances[i].free);
- } else if (coins.iOf(result.balances[i].asset) > -1) {
+ } else if (isInArray(config.COINS, result.balances[i].asset)) {
if (
result.balances[i].asset != config.MARKET &&
result.balances[i].asset != config.CURRENCY
) {
- let otherCoinsLocked = parseFloat(result.balances[i].locked);
- let otherCoinsFree = parseFloat(result.balances[i].free);
- otherStables =
- otherStables + (otherCoinsLocked + otherCoinsFree);
+ botMemory.botMemory.otherStables =
+ botMemory.otherStables + (parseFloat(result.balances[i].locked) + parseFloat(result.balances[i].free));
}
}
}
@@ -161,7 +159,7 @@ var task = cron.schedule(
marketBalanceFree +
currencyBalanceLocked +
currencyBalanceFree +
- otherStables
+ botMemory.botMemory.otherStables
).toFixed(8);
if (marketBalanceLocked + marketBalanceFree < total / 2) {
@@ -206,7 +204,7 @@ var task = cron.schedule(
"SALDO " + config.CURRENCY + "...:",
currencyBalanceLocked + currencyBalanceFree
);
- console.log("OUTRAS STALBE:", otherStables.toFixed(8));
+ console.log("OUTRAS STALBE:", botMemory.otherStables.toFixed(8));
console.log("SALDO BNB....:", balanceBNB);
console.log("SALDO TOTAL..:", total, "USD");
console.log("AUTO SPREAD..:", status_spread);
@@ -504,7 +502,7 @@ function simpleStrategy() {
if (
sellPriceTemp > avgPrice &&
sellPriceTemp - avgPrice >= spreadOpera &&
- notifySellMin == 0
+ botMemory.notifySellMin == 0
) {
sellPrice = sellPriceTemp;
if (bot_enabled == 1) {
@@ -522,7 +520,7 @@ function simpleStrategy() {
);
}
} else {
- if (bot_enabled == 1 && notifySellMin == 0) {
+ if (bot_enabled == 1 && botMemory.notifySellMin == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de venda está dentro da diferença de spread " +
@@ -534,7 +532,7 @@ function simpleStrategy() {
}
}
} else {
- if (bot_enabled == 1 && notifySellMin == 0) {
+ if (bot_enabled == 1 && botMemory.notifySellMin == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de venda está dentro da diferença de spread " +
@@ -568,7 +566,7 @@ function simpleStrategy() {
if (
buyPriceTemp < avgPrice &&
avgPrice - buyPriceTemp >= spreadOpera &&
- notifyBuyMax == 0
+ botMemory.notifyBuyMax == 0
) {
buyPrice = buyPriceTemp;
if (bot_enabled == 1) {
@@ -586,7 +584,7 @@ function simpleStrategy() {
);
}
} else {
- if (bot_enabled == 1 && notifyBuyMax == 0) {
+ if (bot_enabled == 1 && botMemory.notifyBuyMax == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de compra está dentro da diferença de spread " +
@@ -598,7 +596,7 @@ function simpleStrategy() {
}
}
} else {
- if (bot_enabled == 1 && notifyBuyMax == 0) {
+ if (bot_enabled == 1 && botMemory.notifyBuyMax == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de compra está dentro da diferença de spread " +
@@ -621,19 +619,22 @@ function simpleStrategy() {
console.log(
"DEFINIDOS....: Compra " + buyPrice + " e Venda " + sellPrice
);
- console.log("TIMEOUT ORDEM:" + " " + config.ORDER_EXPIRE + " horas");
- console.log("HORA AGORA...:" + " " + new Date());
- console.log("============== DADOS DE COMPRA ============");
- console.log("VALOR COMPRA.:", buyAmount);
- console.log("PRECO COMPRA.:", parseFloat(buyPriceTemp).toFixed(4));
- console.log("ID ORDEM BUY.:", OrderBuyID);
- console.log("EXPIRA EM....:", new Date(dateOrderBuyExpire));
- console.log("============== DADOS DE VENDA =============");
- console.log("VALOR VENDA..:", sellAmount);
- console.log("PRECO VENDA..:", parseFloat(sellPriceTemp).toFixed(4));
- console.log("ID ORDEM SELL:", OrderSellID);
- console.log("EXPIRA EM....:", new Date(dateOrderSellExpire));
- console.log("===========================================");
+
+ let mess = `
+ TIMEOUT ORDERM: ${config.ORDER_EXPIRE} horas \n
+ HORA ATUAL....: ${new Date()}\n
+ ============== DADOS DE COMPRA ============\n
+ VALOR COMPRA..: ${botMemory.buyAmount}\n
+ PRECO COMPRA..: ${parseFloat(botMemory.buyPriceTemp).toFixed(4)}\n
+ ID ORDEM BUY..: ${OrderBuyID}\n
+ EXPIRA EM.....: ${new Date(dateOrderBuyExpire)}\n
+ "============== DADOS DE VENDA =============\n
+ VALOR VENDA...: ${sellAmount}\n
+ PRECO VENDA...: ${parseFloat(sellPriceTemp).toFixed(4)}\n
+ ID ORDEM SELL.: ${OrderSellID}\n
+ EXPIRA EM.....: ${new Date(dateOrderSellExpire)}
+ ===========================================`;
+ console.log(mess);
client
.openOrders({
symbol: config.CURRENCY + config.MARKET
@@ -664,7 +665,7 @@ function simpleStrategy() {
totalCompras--;
throw err;
});
- notifyBuyMax = 0;
+ botMemory.notifyBuyMax = 0;
hasFundsBuy = 1;
buyPriceTemp = buyPrice;
if (bot_enabled == 1) {
@@ -682,7 +683,7 @@ function simpleStrategy() {
} else {
if (
bot_enabled == 1 &&
- notifyBuyMax == 0 &&
+ botMemory.notifyBuyMax == 0 &&
marketBalanceFree >= buyAmount
) {
bot.sendMessage(
@@ -691,9 +692,9 @@ function simpleStrategy() {
config.BUY_MAX +
". O bot vai aguardar o preço reduzir até o valor definido para evitar prejuízos."
);
- notifyBuyMax = 1;
+ botMemory.notifyBuyMax = 1;
}
- if (bot_enabled == 1 && hasFundsBuy == 1 && notifyBuyMax == 0) {
+ if (bot_enabled == 1 && hasFundsBuy == 1 && botMemory.notifyBuyMax == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1F6AB} O bot está sem saldo para compras em " +
@@ -702,7 +703,7 @@ function simpleStrategy() {
marketBalanceFree +
". O bot vai aguardar até que uma compra seja executada para liberar saldo."
);
- notifyBuyMax = 1;
+ botMemory.notifyBuyMax = 1;
}
OrderBuyID = 0;
hasFundsBuy = 0;
@@ -737,7 +738,7 @@ function simpleStrategy() {
totalVendas--;
throw err;
});
- notifySellMin = 0;
+ botMemory.notifySellMin = 0;
hasFundsSell = 1;
sellPriceTemp = sellPrice;
if (bot_enabled == 1) {
@@ -755,7 +756,7 @@ function simpleStrategy() {
} else {
if (
bot_enabled == 1 &&
- notifySellMin == 0 &&
+ botMemory.notifySellMin == 0 &&
currencyBalanceFree >= sellAmount
) {
bot.sendMessage(
@@ -764,9 +765,9 @@ function simpleStrategy() {
config.SELL_MIN +
". O bot vai aguardar o preço aumentar até o valor definido para evitar prejuízos."
);
- notifySellMin = 1;
+ botMemory.notifySellMin = 1;
}
- if (bot_enabled == 1 && hasFundsSell == 1 && notifySellMin == 0) {
+ if (bot_enabled == 1 && hasFundsSell == 1 && botMemory.notifySellMin == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1F6AB} O bot está sem saldo para vendas em " +
@@ -775,7 +776,7 @@ function simpleStrategy() {
currencyBalanceFree +
". O bot vai aguardar até que uma compra seja executada para liberar saldo."
);
- notifySellMin = 1;
+ botMemory.notifySellMin = 1;
}
OrderSellID = 0;
hasFundsSell = 0;
@@ -831,15 +832,16 @@ let botMemory = {
saldo_PAX: 0,
saldo_USDS: 0,
saldo_USDSB: 0,
- total_stable: 0
+ total_stable: 0,
+ telegram = false
};
console.log("Iniciando...");
task.start();
-app.get("/", (req, res) => {
- let total_investiment = (total - config.INITIAL_INVESTMENT).toFixed(8);
+app.get("/*", (req, res) => {
+ let total_investiment = (botMemory.total - config.INITIAL_INVESTMENT).toFixed(8);
res.json({
initialInvestment: config.INITIAL_INVESTMENT,
market: config.MARKET,
diff --git a/report.js b/src/report.js
similarity index 100%
rename from report.js
rename to src/report.js
diff --git a/src/utils.js b/src/utils.js
new file mode 100644
index 0000000..4be30a9
--- /dev/null
+++ b/src/utils.js
@@ -0,0 +1,5 @@
+export function isInArray(array, value) {
+ if (array.indexOf(value) == -1) return false;
+ return true;
+ }
+
\ No newline at end of file
From 4a80d8140b56a3ced3fda1b646e16825818b15b9 Mon Sep 17 00:00:00 2001
From: Toledo
Date: Thu, 26 Sep 2019 12:41:54 -0300
Subject: [PATCH 3/6] added message
---
src/index.js | 103 +++++++++++++++++++++++----------------------------
1 file changed, 47 insertions(+), 56 deletions(-)
diff --git a/src/index.js b/src/index.js
index 20ce19d..253f0b4 100644
--- a/src/index.js
+++ b/src/index.js
@@ -30,7 +30,7 @@ client
.then(result => {
for (let i = 0; i < result.length; i++) {
if (result[i].side == "BUY") {
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1F5E3} Order de compra encontrada: " +
@@ -57,7 +57,7 @@ client
buyPriceTemp = result[i].price;
}
if (result[i].side == "SELL") {
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1F5E3} Order de venda encontrada: " +
@@ -195,40 +195,29 @@ var task = cron.schedule(
}
console.clear();
- console.log("===========================================");
- console.log(
- "SALDO " + config.MARKET + "...:",
- marketBalanceLocked + marketBalanceFree
- );
- console.log(
- "SALDO " + config.CURRENCY + "...:",
- currencyBalanceLocked + currencyBalanceFree
- );
- console.log("OUTRAS STALBE:", botMemory.otherStables.toFixed(8));
- console.log("SALDO BNB....:", balanceBNB);
- console.log("SALDO TOTAL..:", total, "USD");
- console.log("AUTO SPREAD..:", status_spread);
- console.log("MINIMA DO DIA:", minDay);
- console.log("MAXIMA DO DIA:", maxDay);
- console.log(config.CURRENCY + config.MARKET + ".....:", avgPrice);
- console.log("VARIACAO 24H.:", changePrice + " %");
- console.log("SPREAD 24H...:", spreadDay);
- console.log("SPREAD OPERA.:", spreadOpera);
- console.log("SALDO INICIAL:", config.INITIAL_INVESTMENT, "USD");
- console.log(
- "LUCRO........:",
- (total - config.INITIAL_INVESTMENT).toFixed(4),
- "USD"
- );
- console.log(
- " ",
- (
- ((total - config.INITIAL_INVESTMENT) * 100) /
- config.INITIAL_INVESTMENT
- ).toFixed(2),
- "%"
- );
- console.log("===========================================");
+ let mess = '===========================================';
+
+ mess += `
+ SALDO ${config.MARKET}...: ${marketBalanceLocked + marketBalanceFree}\n
+ SALDO ${config.CURRENCY}...: ${currencyBalanceLocked + currencyBalanceFree}\n
+ OUTRAS STABLE: ${botMemory.otherStables.toFixed(8)}\n
+ SALDO BNB....: ${balanceBNB}\n
+ SALDO TOTAL..: ${total} USD\n
+ AUTO SPREAD..: ${status_spread}\n
+ MINIMA DO DIA: ${minDay}\n
+ MAXIMA DO DIA: ${maxDay}\n
+ ${config.CURRENCY + config.MARKET}.....: ${avgPrice}\n
+ VARIACAO 24H.: ${changePrice} %\n
+ SPREAD 24H...: ${spreadDay}\n
+ SPREAD OPERA.: ${spreadOpera}\n
+ SALDO INICIAL: ${config.INITIAL_INVESTMENT} USD\n
+ LUCRO........: ${(total - config.INITIAL_INVESTMENT).toFixed(4)} USD\n
+ ${ (
+ ((total - config.INITIAL_INVESTMENT) * 100) /
+ config.INITIAL_INVESTMENT
+ ).toFixed(2)} %\n
+ ===========================================`;
+ console.log(mess);
console.log(
"UPTIME.......:",
((Math.floor(+new Date() / 1000) - startTime) / 3600).toFixed(2),
@@ -242,6 +231,8 @@ var task = cron.schedule(
totalCompras,
"]"
);
+
+ let mess =
simpleStrategy();
})
.catch(err => {
@@ -266,7 +257,7 @@ function simpleStrategy() {
dateOrderBuy = result.time;
if (result.status == "FILLED") {
filledBuyOrder = true;
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1f911} Ordem de compra executada com sucesso. Saldo atual: " +
@@ -300,7 +291,7 @@ function simpleStrategy() {
if (result.status == "CANCELED") {
filledBuyOrder = true;
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1f6a8} Ordem de compra " +
@@ -325,7 +316,7 @@ function simpleStrategy() {
dateOrderSell = result.time;
if (result.status == "FILLED") {
filledSellOrder = true;
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1f911} Ordem de venda executada com sucesso. Saldo atual: " +
@@ -359,7 +350,7 @@ function simpleStrategy() {
if (result.status == "CANCELED") {
filledSellOrder = true;
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1f6a8} Ordem de venda " +
@@ -384,7 +375,7 @@ function simpleStrategy() {
buyPriceTemp != 0 &&
countExpireBuy > 2
) {
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{231b} A ordem de compra expirou em " +
@@ -416,7 +407,7 @@ function simpleStrategy() {
sellPriceTemp != 0 &&
countExpireSell > 2
) {
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{231b} A ordem de venda expirou em " +
@@ -446,7 +437,7 @@ function simpleStrategy() {
SpreadTemp != spreadOpera &&
spreadOpera >= config.SPREAD_MIN
) {
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1f6a7} Ajuste no spread de mercado de " +
@@ -505,7 +496,7 @@ function simpleStrategy() {
botMemory.notifySellMin == 0
) {
sellPrice = sellPriceTemp;
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{2716} ALERTA: A ordem de venda está em um valor abaixo da diferença de spread " +
@@ -520,7 +511,7 @@ function simpleStrategy() {
);
}
} else {
- if (bot_enabled == 1 && botMemory.notifySellMin == 0) {
+ if (botMemory.telegram && botMemory.notifySellMin == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de venda está dentro da diferença de spread " +
@@ -532,7 +523,7 @@ function simpleStrategy() {
}
}
} else {
- if (bot_enabled == 1 && botMemory.notifySellMin == 0) {
+ if (botMemory.telegram && botMemory.notifySellMin == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de venda está dentro da diferença de spread " +
@@ -569,7 +560,7 @@ function simpleStrategy() {
botMemory.notifyBuyMax == 0
) {
buyPrice = buyPriceTemp;
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{2716} ALERTA: A ordem de compra está em um valor abaixo da diferença de spread " +
@@ -584,7 +575,7 @@ function simpleStrategy() {
);
}
} else {
- if (bot_enabled == 1 && botMemory.notifyBuyMax == 0) {
+ if (botMemory.telegram && botMemory.notifyBuyMax == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de compra está dentro da diferença de spread " +
@@ -596,7 +587,7 @@ function simpleStrategy() {
}
}
} else {
- if (bot_enabled == 1 && botMemory.notifyBuyMax == 0) {
+ if (botMemory.telegram && botMemory.notifyBuyMax == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de compra está dentro da diferença de spread " +
@@ -619,7 +610,7 @@ function simpleStrategy() {
console.log(
"DEFINIDOS....: Compra " + buyPrice + " e Venda " + sellPrice
);
-
+
let mess = `
TIMEOUT ORDERM: ${config.ORDER_EXPIRE} horas \n
HORA ATUAL....: ${new Date()}\n
@@ -668,7 +659,7 @@ function simpleStrategy() {
botMemory.notifyBuyMax = 0;
hasFundsBuy = 1;
buyPriceTemp = buyPrice;
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1F4C9} Order de compra criada com sucesso: Quantidade comprada: \u{1f4b5} " +
@@ -682,7 +673,7 @@ function simpleStrategy() {
}
} else {
if (
- bot_enabled == 1 &&
+ botMemory.telegram &&
botMemory.notifyBuyMax == 0 &&
marketBalanceFree >= buyAmount
) {
@@ -694,7 +685,7 @@ function simpleStrategy() {
);
botMemory.notifyBuyMax = 1;
}
- if (bot_enabled == 1 && hasFundsBuy == 1 && botMemory.notifyBuyMax == 0) {
+ if (botMemory.telegram && hasFundsBuy == 1 && botMemory.notifyBuyMax == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1F6AB} O bot está sem saldo para compras em " +
@@ -741,7 +732,7 @@ function simpleStrategy() {
botMemory.notifySellMin = 0;
hasFundsSell = 1;
sellPriceTemp = sellPrice;
- if (bot_enabled == 1) {
+ if (botMemory.telegram) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1F4C8} Order de venda criada com sucesso: Quantidade vendida: \u{1f4b5} " +
@@ -755,7 +746,7 @@ function simpleStrategy() {
}
} else {
if (
- bot_enabled == 1 &&
+ botMemory.telegram &&
botMemory.notifySellMin == 0 &&
currencyBalanceFree >= sellAmount
) {
@@ -767,7 +758,7 @@ function simpleStrategy() {
);
botMemory.notifySellMin = 1;
}
- if (bot_enabled == 1 && hasFundsSell == 1 && botMemory.notifySellMin == 0) {
+ if (botMemory.telegram && hasFundsSell == 1 && botMemory.notifySellMin == 0) {
bot.sendMessage(
config.BOT_CHAT,
"\u{1F6AB} O bot está sem saldo para vendas em " +
From 3ec25589940363c2752258d8e5235b0a6b56f2ce Mon Sep 17 00:00:00 2001
From: Gustavo
Date: Sun, 1 Mar 2020 11:30:06 -0300
Subject: [PATCH 4/6] fix unused variables and context
---
.eslintrc.json | 17 +
config.json | 21 -
package-lock.json | 1055 +++++++++++++++++++++++++
package.json | 7 +-
src/config.js | 21 +
src/index.js | 589 +++++++-------
src/report.js | 59 +-
src/utils.js | 5 -
yarn.lock | 1891 +++++++++++++++++++++++++++++++++++++++++++++
9 files changed, 3319 insertions(+), 346 deletions(-)
create mode 100644 .eslintrc.json
delete mode 100644 config.json
create mode 100644 src/config.js
delete mode 100644 src/utils.js
create mode 100644 yarn.lock
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..e7215b3
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,17 @@
+{
+ "env": {
+ "browser": true,
+ "es6": true
+ },
+ "extends": "eslint:recommended",
+ "globals": {
+ "Atomics": "readonly",
+ "SharedArrayBuffer": "readonly"
+ },
+ "parserOptions": {
+ "ecmaVersion": 2018,
+ "sourceType": "module"
+ },
+ "rules": {
+ }
+}
\ No newline at end of file
diff --git a/config.json b/config.json
deleted file mode 100644
index 2da3bd5..0000000
--- a/config.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "API_KEY": "",
- "SECRET_KEY": "",
- "CURRENCY": "PAX",
- "MARKET" : "USDT",
- "COINS" : ["TUSD", "USDT", "USDC", "USDC", "PAX", "USDS", "USDSB"],
- "SPREAD_SELL" : 0.00150,
- "SPREAD_BUY" : 0.00150,
- "BUY_MAX" : 0.9993,
- "SELL_MIN" : 1.0000,
- "ORDER_EXPIRE" : 24,
- "AUTO_SPREAD" : 1,
- "BUY_VALUE" : 11,
- "SPREAD_MIN" : 0.00150,
- "LOOP_TIME": 15,
- "TELEGRAM_TOKEN": "",
- "TELEGRAM_CHAT": "",
- "INITIAL_INVESTMENT": 2925.67,
- "LISTEN_PORT" : 82,
- "LISTEN_REPORT" : 3000
-}
diff --git a/package-lock.json b/package-lock.json
index ea8efbf..557ad44 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -4,6 +4,32 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
+ "@babel/code-frame": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.8.3.tgz",
+ "integrity": "sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==",
+ "dev": true,
+ "requires": {
+ "@babel/highlight": "^7.8.3"
+ }
+ },
+ "@babel/highlight": {
+ "version": "7.8.3",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.8.3.tgz",
+ "integrity": "sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==",
+ "dev": true,
+ "requires": {
+ "chalk": "^2.0.0",
+ "esutils": "^2.0.2",
+ "js-tokens": "^4.0.0"
+ }
+ },
+ "@types/color-name": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+ "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==",
+ "dev": true
+ },
"accepts": {
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
@@ -13,16 +39,85 @@
"negotiator": "0.6.2"
}
},
+ "acorn": {
+ "version": "7.1.1",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
+ "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==",
+ "dev": true
+ },
+ "acorn-jsx": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz",
+ "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==",
+ "dev": true
+ },
+ "ajv": {
+ "version": "6.12.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz",
+ "integrity": "sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==",
+ "dev": true,
+ "requires": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ }
+ },
+ "ansi-escapes": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.0.tgz",
+ "integrity": "sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==",
+ "dev": true,
+ "requires": {
+ "type-fest": "^0.8.1"
+ }
+ },
+ "ansi-regex": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
+ "dev": true
+ },
+ "ansi-styles": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+ "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+ "dev": true,
+ "requires": {
+ "color-convert": "^1.9.0"
+ }
+ },
+ "argparse": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
+ "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
+ "dev": true,
+ "requires": {
+ "sprintf-js": "~1.0.2"
+ }
+ },
"array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
},
+ "astral-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz",
+ "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==",
+ "dev": true
+ },
"async-limiter": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
},
+ "balanced-match": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+ "dev": true
+ },
"binance-api-node": {
"version": "0.9.2",
"resolved": "https://registry.npmjs.org/binance-api-node/-/binance-api-node-0.9.2.tgz",
@@ -51,11 +146,80 @@
"type-is": "~1.6.17"
}
},
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
"bytes": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
"integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
},
+ "callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true
+ },
+ "chalk": {
+ "version": "2.4.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+ "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.1",
+ "escape-string-regexp": "^1.0.5",
+ "supports-color": "^5.3.0"
+ }
+ },
+ "chardet": {
+ "version": "0.7.0",
+ "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz",
+ "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==",
+ "dev": true
+ },
+ "cli-cursor": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz",
+ "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==",
+ "dev": true,
+ "requires": {
+ "restore-cursor": "^3.1.0"
+ }
+ },
+ "cli-width": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz",
+ "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=",
+ "dev": true
+ },
+ "color-convert": {
+ "version": "1.9.3",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+ "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+ "dev": true,
+ "requires": {
+ "color-name": "1.1.3"
+ }
+ },
+ "color-name": {
+ "version": "1.1.3",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
+ "dev": true
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "dev": true
+ },
"content-disposition": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
@@ -79,6 +243,27 @@
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
},
+ "cross-spawn": {
+ "version": "6.0.5",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "dev": true,
+ "requires": {
+ "nice-try": "^1.0.4",
+ "path-key": "^2.0.1",
+ "semver": "^5.5.0",
+ "shebang-command": "^1.2.0",
+ "which": "^1.2.9"
+ },
+ "dependencies": {
+ "semver": {
+ "version": "5.7.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+ "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+ "dev": true
+ }
+ }
+ },
"debug": {
"version": "2.6.9",
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
@@ -87,6 +272,12 @@
"ms": "2.0.0"
}
},
+ "deep-is": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
+ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
+ "dev": true
+ },
"depd": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
@@ -97,11 +288,26 @@
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
},
+ "doctrine": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+ "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
+ "dev": true,
+ "requires": {
+ "esutils": "^2.0.2"
+ }
+ },
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
},
+ "emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
+ "dev": true
+ },
"encodeurl": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
@@ -120,11 +326,151 @@
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
},
+ "escape-string-regexp": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+ "dev": true
+ },
+ "eslint": {
+ "version": "6.8.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz",
+ "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==",
+ "dev": true,
+ "requires": {
+ "@babel/code-frame": "^7.0.0",
+ "ajv": "^6.10.0",
+ "chalk": "^2.1.0",
+ "cross-spawn": "^6.0.5",
+ "debug": "^4.0.1",
+ "doctrine": "^3.0.0",
+ "eslint-scope": "^5.0.0",
+ "eslint-utils": "^1.4.3",
+ "eslint-visitor-keys": "^1.1.0",
+ "espree": "^6.1.2",
+ "esquery": "^1.0.1",
+ "esutils": "^2.0.2",
+ "file-entry-cache": "^5.0.1",
+ "functional-red-black-tree": "^1.0.1",
+ "glob-parent": "^5.0.0",
+ "globals": "^12.1.0",
+ "ignore": "^4.0.6",
+ "import-fresh": "^3.0.0",
+ "imurmurhash": "^0.1.4",
+ "inquirer": "^7.0.0",
+ "is-glob": "^4.0.0",
+ "js-yaml": "^3.13.1",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "levn": "^0.3.0",
+ "lodash": "^4.17.14",
+ "minimatch": "^3.0.4",
+ "mkdirp": "^0.5.1",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.8.3",
+ "progress": "^2.0.0",
+ "regexpp": "^2.0.1",
+ "semver": "^6.1.2",
+ "strip-ansi": "^5.2.0",
+ "strip-json-comments": "^3.0.1",
+ "table": "^5.2.3",
+ "text-table": "^0.2.0",
+ "v8-compile-cache": "^2.0.3"
+ },
+ "dependencies": {
+ "debug": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
+ "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "ms": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
+ "dev": true
+ }
+ }
+ },
+ "eslint-scope": {
+ "version": "5.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz",
+ "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==",
+ "dev": true,
+ "requires": {
+ "esrecurse": "^4.1.0",
+ "estraverse": "^4.1.1"
+ }
+ },
+ "eslint-utils": {
+ "version": "1.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz",
+ "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==",
+ "dev": true,
+ "requires": {
+ "eslint-visitor-keys": "^1.1.0"
+ }
+ },
+ "eslint-visitor-keys": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz",
+ "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==",
+ "dev": true
+ },
"esm": {
"version": "3.2.25",
"resolved": "https://registry.npmjs.org/esm/-/esm-3.2.25.tgz",
"integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA=="
},
+ "espree": {
+ "version": "6.1.2",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.2.tgz",
+ "integrity": "sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==",
+ "dev": true,
+ "requires": {
+ "acorn": "^7.1.0",
+ "acorn-jsx": "^5.1.0",
+ "eslint-visitor-keys": "^1.1.0"
+ }
+ },
+ "esprima": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
+ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
+ "dev": true
+ },
+ "esquery": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.1.0.tgz",
+ "integrity": "sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==",
+ "dev": true,
+ "requires": {
+ "estraverse": "^4.0.0"
+ }
+ },
+ "esrecurse": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz",
+ "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==",
+ "dev": true,
+ "requires": {
+ "estraverse": "^4.1.0"
+ }
+ },
+ "estraverse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
+ "dev": true
+ },
+ "esutils": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz",
+ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==",
+ "dev": true
+ },
"etag": {
"version": "1.8.1",
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
@@ -167,6 +513,53 @@
"vary": "~1.1.2"
}
},
+ "external-editor": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz",
+ "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==",
+ "dev": true,
+ "requires": {
+ "chardet": "^0.7.0",
+ "iconv-lite": "^0.4.24",
+ "tmp": "^0.0.33"
+ }
+ },
+ "fast-deep-equal": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz",
+ "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==",
+ "dev": true
+ },
+ "fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true
+ },
+ "fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
+ "dev": true
+ },
+ "figures": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",
+ "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==",
+ "dev": true,
+ "requires": {
+ "escape-string-regexp": "^1.0.5"
+ }
+ },
+ "file-entry-cache": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz",
+ "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==",
+ "dev": true,
+ "requires": {
+ "flat-cache": "^2.0.1"
+ }
+ },
"finalhandler": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
@@ -181,6 +574,23 @@
"unpipe": "~1.0.0"
}
},
+ "flat-cache": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz",
+ "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==",
+ "dev": true,
+ "requires": {
+ "flatted": "^2.0.0",
+ "rimraf": "2.6.3",
+ "write": "1.0.3"
+ }
+ },
+ "flatted": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz",
+ "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==",
+ "dev": true
+ },
"forwarded": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
@@ -191,6 +601,56 @@
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
},
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "dev": true
+ },
+ "functional-red-black-tree": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
+ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
+ "dev": true
+ },
+ "glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "glob-parent": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.0.tgz",
+ "integrity": "sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
+ "globals": {
+ "version": "12.3.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-12.3.0.tgz",
+ "integrity": "sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==",
+ "dev": true,
+ "requires": {
+ "type-fest": "^0.8.1"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+ "dev": true
+ },
"html5-websocket": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/html5-websocket/-/html5-websocket-2.0.4.tgz",
@@ -231,21 +691,168 @@
"safer-buffer": ">= 2.1.2 < 3"
}
},
+ "ignore": {
+ "version": "4.0.6",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
+ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
+ "dev": true
+ },
+ "import-fresh": {
+ "version": "3.2.1",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz",
+ "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==",
+ "dev": true,
+ "requires": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ }
+ },
+ "imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
+ "dev": true
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "dev": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
"inherits": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
},
+ "inquirer": {
+ "version": "7.0.5",
+ "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.0.5.tgz",
+ "integrity": "sha512-6Z5cP+LAO0rzNE7xWjWtT84jxKa5ScLEGLgegPXeO3dGeU8lNe5Ii7SlXH6KVtLGlDuaEhsvsFjrjWjw8j5lFg==",
+ "dev": true,
+ "requires": {
+ "ansi-escapes": "^4.2.1",
+ "chalk": "^3.0.0",
+ "cli-cursor": "^3.1.0",
+ "cli-width": "^2.0.0",
+ "external-editor": "^3.0.3",
+ "figures": "^3.0.0",
+ "lodash": "^4.17.15",
+ "mute-stream": "0.0.8",
+ "run-async": "^2.4.0",
+ "rxjs": "^6.5.3",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0",
+ "through": "^2.3.6"
+ },
+ "dependencies": {
+ "ansi-styles": {
+ "version": "4.2.1",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+ "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+ "dev": true,
+ "requires": {
+ "@types/color-name": "^1.1.1",
+ "color-convert": "^2.0.1"
+ }
+ },
+ "chalk": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz",
+ "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ }
+ },
+ "color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dev": true,
+ "requires": {
+ "color-name": "~1.1.4"
+ }
+ },
+ "color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
+ "dev": true
+ },
+ "has-flag": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
+ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+ "dev": true
+ },
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ },
+ "supports-color": {
+ "version": "7.1.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz",
+ "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^4.0.0"
+ }
+ }
+ }
+ },
"ipaddr.js": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
"integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
},
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "4.0.1",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+ "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-promise": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz",
+ "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=",
+ "dev": true
+ },
"is-stream": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ="
},
+ "isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
+ "dev": true
+ },
"isomorphic-fetch": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz",
@@ -255,6 +862,50 @@
"whatwg-fetch": ">=0.10.0"
}
},
+ "js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
+ },
+ "js-yaml": {
+ "version": "3.13.1",
+ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
+ "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
+ "dev": true,
+ "requires": {
+ "argparse": "^1.0.7",
+ "esprima": "^4.0.0"
+ }
+ },
+ "json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
+ "dev": true
+ },
+ "levn": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
+ "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
+ "dev": true,
+ "requires": {
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2"
+ }
+ },
+ "lodash": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+ "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==",
+ "dev": true
+ },
"lodash.zipobject": {
"version": "4.1.3",
"resolved": "https://registry.npmjs.org/lodash.zipobject/-/lodash.zipobject-4.1.3.tgz",
@@ -293,16 +944,64 @@
"mime-db": "1.40.0"
}
},
+ "mimic-fn": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz",
+ "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==",
+ "dev": true
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "minimist": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
+ "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
+ "dev": true
+ },
+ "mkdirp": {
+ "version": "0.5.1",
+ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
+ "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
+ "dev": true,
+ "requires": {
+ "minimist": "0.0.8"
+ }
+ },
"ms": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
},
+ "mute-stream": {
+ "version": "0.0.8",
+ "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz",
+ "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==",
+ "dev": true
+ },
+ "natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
+ "dev": true
+ },
"negotiator": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
},
+ "nice-try": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
+ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
+ "dev": true
+ },
"node-cron": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/node-cron/-/node-cron-2.0.3.tgz",
@@ -329,21 +1028,92 @@
"ee-first": "1.1.1"
}
},
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "dev": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "onetime": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.0.tgz",
+ "integrity": "sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==",
+ "dev": true,
+ "requires": {
+ "mimic-fn": "^2.1.0"
+ }
+ },
"opencollective-postinstall": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz",
"integrity": "sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw=="
},
+ "optionator": {
+ "version": "0.8.3",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz",
+ "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==",
+ "dev": true,
+ "requires": {
+ "deep-is": "~0.1.3",
+ "fast-levenshtein": "~2.0.6",
+ "levn": "~0.3.0",
+ "prelude-ls": "~1.1.2",
+ "type-check": "~0.3.2",
+ "word-wrap": "~1.2.3"
+ }
+ },
+ "os-tmpdir": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
+ "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=",
+ "dev": true
+ },
+ "parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "requires": {
+ "callsites": "^3.0.0"
+ }
+ },
"parseurl": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
},
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "dev": true
+ },
+ "path-key": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+ "dev": true
+ },
"path-to-regexp": {
"version": "0.1.7",
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
},
+ "prelude-ls": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
+ "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
+ "dev": true
+ },
+ "progress": {
+ "version": "2.0.3",
+ "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
+ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
+ "dev": true
+ },
"proxy-addr": {
"version": "2.0.5",
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
@@ -353,6 +1123,12 @@
"ipaddr.js": "1.9.0"
}
},
+ "punycode": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
+ "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
+ "dev": true
+ },
"qs": {
"version": "6.7.0",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
@@ -379,6 +1155,55 @@
"resolved": "https://registry.npmjs.org/reconnecting-websocket/-/reconnecting-websocket-3.2.2.tgz",
"integrity": "sha512-SWSfoXiaHVOqXuPWFgGWeUxKnb5HIY7I/Fh5C/hy4wUOgeOh7YIMXEiv5/eHBlNs4tNzCrO5YDR9AH62NWle0Q=="
},
+ "regexpp": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz",
+ "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==",
+ "dev": true
+ },
+ "resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true
+ },
+ "restore-cursor": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz",
+ "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==",
+ "dev": true,
+ "requires": {
+ "onetime": "^5.1.0",
+ "signal-exit": "^3.0.2"
+ }
+ },
+ "rimraf": {
+ "version": "2.6.3",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
+ "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
+ "run-async": {
+ "version": "2.4.0",
+ "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.0.tgz",
+ "integrity": "sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==",
+ "dev": true,
+ "requires": {
+ "is-promise": "^2.1.0"
+ }
+ },
+ "rxjs": {
+ "version": "6.5.4",
+ "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.4.tgz",
+ "integrity": "sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==",
+ "dev": true,
+ "requires": {
+ "tslib": "^1.9.0"
+ }
+ },
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
@@ -389,6 +1214,12 @@
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
+ "semver": {
+ "version": "6.3.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
+ "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
+ "dev": true
+ },
"send": {
"version": "0.17.1",
"resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
@@ -432,16 +1263,195 @@
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
"integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
},
+ "shebang-command": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+ "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+ "dev": true,
+ "requires": {
+ "shebang-regex": "^1.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+ "dev": true
+ },
+ "signal-exit": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
+ "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
+ "dev": true
+ },
+ "slice-ansi": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz",
+ "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==",
+ "dev": true,
+ "requires": {
+ "ansi-styles": "^3.2.0",
+ "astral-regex": "^1.0.0",
+ "is-fullwidth-code-point": "^2.0.0"
+ },
+ "dependencies": {
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ }
+ }
+ },
+ "sprintf-js": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
+ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
+ "dev": true
+ },
"statuses": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
},
+ "string-width": {
+ "version": "4.2.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+ "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "dependencies": {
+ "strip-ansi": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+ "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^5.0.0"
+ }
+ }
+ }
+ },
+ "strip-ansi": {
+ "version": "5.2.0",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
+ "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
+ "dev": true,
+ "requires": {
+ "ansi-regex": "^4.1.0"
+ },
+ "dependencies": {
+ "ansi-regex": {
+ "version": "4.1.0",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
+ "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
+ "dev": true
+ }
+ }
+ },
+ "strip-json-comments": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz",
+ "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==",
+ "dev": true
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ },
+ "table": {
+ "version": "5.4.6",
+ "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz",
+ "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==",
+ "dev": true,
+ "requires": {
+ "ajv": "^6.10.2",
+ "lodash": "^4.17.14",
+ "slice-ansi": "^2.1.0",
+ "string-width": "^3.0.0"
+ },
+ "dependencies": {
+ "emoji-regex": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
+ "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
+ "dev": true
+ },
+ "is-fullwidth-code-point": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
+ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
+ "dev": true
+ },
+ "string-width": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
+ "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
+ "dev": true,
+ "requires": {
+ "emoji-regex": "^7.0.1",
+ "is-fullwidth-code-point": "^2.0.0",
+ "strip-ansi": "^5.1.0"
+ }
+ }
+ }
+ },
+ "text-table": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
+ "dev": true
+ },
+ "through": {
+ "version": "2.3.8",
+ "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz",
+ "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=",
+ "dev": true
+ },
+ "tmp": {
+ "version": "0.0.33",
+ "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz",
+ "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==",
+ "dev": true,
+ "requires": {
+ "os-tmpdir": "~1.0.2"
+ }
+ },
"toidentifier": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
},
+ "tslib": {
+ "version": "1.11.1",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz",
+ "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==",
+ "dev": true
+ },
+ "type-check": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
+ "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
+ "dev": true,
+ "requires": {
+ "prelude-ls": "~1.1.2"
+ }
+ },
+ "type-fest": {
+ "version": "0.8.1",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
+ "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
+ "dev": true
+ },
"type-is": {
"version": "1.6.18",
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
@@ -466,11 +1476,26 @@
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
},
+ "uri-js": {
+ "version": "4.2.2",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
+ "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
+ "dev": true,
+ "requires": {
+ "punycode": "^2.1.0"
+ }
+ },
"utils-merge": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
},
+ "v8-compile-cache": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz",
+ "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==",
+ "dev": true
+ },
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -480,6 +1505,36 @@
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz",
"integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q=="
+ },
+ "which": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "word-wrap": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
+ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
+ "dev": true
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "dev": true
+ },
+ "write": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz",
+ "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==",
+ "dev": true,
+ "requires": {
+ "mkdirp": "^0.5.1"
+ }
}
}
}
diff --git a/package.json b/package.json
index d707320..b229a2c 100644
--- a/package.json
+++ b/package.json
@@ -22,7 +22,8 @@
"http": "0.0.0",
"lowdb": "^1.0.0",
"node-cron": "^2.0.3",
- "node-telegram-bot-api": "^0.29.0"
+ "node-telegram-bot-api": "^0.29.0",
+ "telegraf": "^3.36.0"
},
"keywords": [
"javascript",
@@ -32,5 +33,7 @@
"tusd",
"usdt"
],
- "devDependencies": {}
+ "devDependencies": {
+ "eslint": "^6.8.0"
+ }
}
diff --git a/src/config.js b/src/config.js
new file mode 100644
index 0000000..86326fa
--- /dev/null
+++ b/src/config.js
@@ -0,0 +1,21 @@
+export default {
+ API_KEY: "",
+ SECRET_KEY: "",
+ CURRENCY: "PAX",
+ MARKET: "USDT",
+ COINS: ["TUSD", "USDT", "USDC", "USDC", "PAX", "USDS", "USDSB"],
+ SPREAD_SELL: 0.0015,
+ SPREAD_BUY: 0.0015,
+ BUY_MAX: 0.9993,
+ SELL_MIN: 1.0,
+ ORDER_EXPIRE: 24,
+ AUTO_SPREAD: true,
+ BUY_VALUE: 11,
+ SPREAD_MIN: 0.0015,
+ LOOP_TIME: 15,
+ TELEGRAM_TOKEN: "",
+ TELEGRAM_CHAT: "",
+ INITIAL_INVESTMENT: 2925.67,
+ LISTEN_PORT: 82,
+ LISTEN_REPORT: 3000
+};
diff --git a/src/index.js b/src/index.js
index 253f0b4..3b08336 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,11 +1,54 @@
-import config from "./config.json";
+import config from "./config.js";
import cron from "node-cron";
import express from "express";
import Binance from "binance-api-node";
-import { isInArray } from "./utils.js";
-import telegraf from 'telegraf';
+import Telegraf from "telegraf";
-let app = express();
+const app = express();
+
+let tgBot = null;
+
+const botMemory = {
+ notifyBuyMax: 0,
+ notifySellMin: 0,
+ otherStables: 0,
+ hasFundsBuy: true,
+ hasFundsSell: true,
+ countExpireBuy: 0,
+ countExpireSell: 0,
+ dateOrderBuy: 0,
+ dateOrderBuyExpire: 0,
+ dateOrderSell: 0,
+ dateOrderSellExpire: 0,
+ buyPriceTemp: 0,
+ sellPriceTemp: 0,
+ changePriceTemp: 0,
+ startTime: Date.now(),
+ avgPrice: 0,
+ OrderBuyID: 0,
+ filledBuyOrder: true,
+ filledSellOrder: true,
+ OrderSellID: 0,
+ SpreadTemp: 0,
+ totalBuys: 0,
+ totalSells: 0,
+ marketBalanceLocked: 0,
+ marketBalanceFree: 0,
+ currencyBalanceLocked: 0,
+ currencyBalanceFree: 0,
+ total: 0,
+ setAmount: 0,
+ setBuyOrder: 0,
+ balance_BNB: 0,
+ balance_TUSD: 0,
+ balance_USDT: 0,
+ balance_USDC: 0,
+ balance_PAX: 0,
+ balance_USDS: 0,
+ balance_USDSB: 0,
+ total_stable: 0,
+ telegram: false
+};
const client = Binance({
apiKey: config.API_KEY,
@@ -13,16 +56,19 @@ const client = Binance({
});
if (config.BOT_TOKEN != "" && config.BOT_CHAT != "") {
- const TelegramBot = require("node-telegram-bot-api");
- const TOKEN = config.BOT_TOKEN;
- var bot = new TelegramBot(TOKEN, { polling: true });
- bot.sendMessage(
+ tgBot = new Telegraf(config.BOT_TOKEN);
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{1F916} stablecoins-infinity-profit-bot iniciando"
);
botMemory.telegram = true;
}
+function showMessage(message) {
+ if (botMemory.telegram) tgBot.telegram.sendMessage(config.BOT_CHAT, message);
+ console.log(message);
+}
+
client
.openOrders({
symbol: config.CURRENCY + config.MARKET
@@ -30,209 +76,208 @@ client
.then(result => {
for (let i = 0; i < result.length; i++) {
if (result[i].side == "BUY") {
- if (botMemory.telegram) {
- bot.sendMessage(
- config.BOT_CHAT,
- "\u{1F5E3} Order de compra encontrada: " +
- result[i].orderId +
- " No total de: " +
- result[i].origQty +
- " no valor de: " +
- result[i].price +
- ""
- );
- }
- console.log(
- "Order de compra encontrada: " +
- result[i].orderId +
- " No total de: " +
- result[i].origQty +
- " no valor de: " +
- result[i].price +
- ""
- );
- filledBuyOrder = false;
- OrderBuyID = result[i].orderId;
- buyAmount = result[i].origQty;
- buyPriceTemp = result[i].price;
- }
- if (result[i].side == "SELL") {
- if (botMemory.telegram) {
- bot.sendMessage(
- config.BOT_CHAT,
- "\u{1F5E3} Order de venda encontrada: " +
- result[i].orderId +
- " No total de: " +
- result[i].origQty +
- " no valor de: " +
- result[i].price +
- ""
- );
- }
- console.log(
- "Order de venda encontrada: " +
- result[i].orderId +
- " No total de: " +
- result[i].origQty +
- " no valor de: " +
- result[i].price +
- ""
- );
- filledSellOrder = false;
- OrderSellID = result[i].orderId;
- sellAmount = result[i].origQty;
- sellPriceTemp = result[i].price;
+ botMemory.filledBuyOrder = false;
+ botMemory.OrderBuyID = result[i].orderId;
+ botMemory.buyAmount = result[i].origQty;
+ botMemory.buyPriceTemp = result[i].price;
+ } else {
+ botMemory.filledSellOrder = false;
+ botMemory.OrderSellID = result[i].orderId;
+ botMemory.sellAmount = result[i].origQty;
+ botMemory.sellPriceTemp = result[i].price;
}
+ showMessage(
+ `Order de ${
+ result[i].side === "BUY" ? "compra" : "venda"
+ } encontrada: ${result[i].orderId} No total de: ${
+ result[i].origQty
+ } no valor de: ${result[i].price}`
+ );
}
});
-var task = cron.schedule(
+const task = cron.schedule(
"*/" + config.LOOP_TIME + " * * * * *",
() => {
client
.dailyStats({ symbol: config.CURRENCY + config.MARKET })
.then(result => {
- changePrice = parseFloat(result.priceChangePercent);
- avgPrice = parseFloat(result.lastPrice);
- minDay = parseFloat(result.lowPrice);
- maxDay = parseFloat(result.highPrice);
- spreadDay = parseFloat(maxDay - minDay).toFixed(4);
- spreadOpera = parseFloat(spreadDay / 4);
+ botMemory.changePrice = parseFloat(result.priceChangePercent);
+ botMemory.avgPrice = parseFloat(result.lastPrice);
+ botMemory.minDay = parseFloat(result.lowPrice);
+ botMemory.maxDay = parseFloat(result.highPrice);
+ botMemory.spreadDay = parseFloat(
+ botMemory.maxDay - botMemory.minDay
+ ).toFixed(4);
+ botMemory.spreadOpera = parseFloat(botMemory.spreadDay / 4);
botMemory.otherStables = 0;
client
.accountInfo({ useServerTime: true })
.then(result => {
for (let i = 0; i < result.balances.length; i++) {
if (result.balances[i].asset == "BNB") {
- balanceBNB =
+ botMemory.balance_BNB =
parseFloat(result.balances[i].locked) +
parseFloat(result.balances[i].free);
} else if (result.balances[i].asset == "TUSD") {
- botMemory.saldo_TUSD = (
+ botMemory.balance_TUSD = (
parseFloat(result.balances[i].locked) +
parseFloat(result.balances[i].free)
).toFixed(8);
} else if (result.balances[i].asset == "USDT") {
- botMemory.saldo_USDT = (
+ botMemory.balance_USDT = (
parseFloat(result.balances[i].locked) +
parseFloat(result.balances[i].free)
).toFixed(8);
} else if (result.balances[i].asset == "USDC") {
- botMemory.saldo_USDC = (
+ botMemory.balance_USDC = (
parseFloat(result.balances[i].locked) +
parseFloat(result.balances[i].free)
).toFixed(8);
} else if (result.balances[i].asset == "PAX") {
- botMemory.saldo_PAX = (
+ botMemory.balance_PAX = (
parseFloat(result.balances[i].locked) +
parseFloat(result.balances[i].free)
).toFixed(8);
} else if (result.balances[i].asset == "USDS") {
- botMemory.saldo_USDS = (
+ botMemory.balance_USDS = (
parseFloat(result.balances[i].locked) +
parseFloat(result.balances[i].free)
).toFixed(8);
} else if (result.balances[i].asset == "USDSB") {
- botMemory.saldo_USDSB = (
+ botMemory.balance_USDSB = (
parseFloat(result.balances[i].locked) +
parseFloat(result.balances[i].free)
).toFixed(8);
} else if (result.balances[i].asset == config.MARKET) {
- marketBalanceLocked = parseFloat(result.balances[i].locked);
- marketBalanceFree = parseFloat(result.balances[i].free);
+ botMemory.marketBalanceLocked = parseFloat(
+ result.balances[i].locked
+ );
+ botMemory.marketBalanceFree = parseFloat(
+ result.balances[i].free
+ );
} else if (result.balances[i].asset == config.CURRENCY) {
- currencyBalanceLocked = parseFloat(result.balances[i].locked);
- currencyBalanceFree = parseFloat(result.balances[i].free);
- } else if (isInArray(config.COINS, result.balances[i].asset)) {
+ botMemory.currencyBalanceLocked = parseFloat(
+ result.balances[i].locked
+ );
+ botMemory.currencyBalanceFree = parseFloat(
+ result.balances[i].free
+ );
+ } else if (config.COINS.includes(result.balances[i].asset)) {
if (
result.balances[i].asset != config.MARKET &&
result.balances[i].asset != config.CURRENCY
) {
botMemory.botMemory.otherStables =
- botMemory.otherStables + (parseFloat(result.balances[i].locked) + parseFloat(result.balances[i].free));
+ botMemory.otherStables +
+ (parseFloat(result.balances[i].locked) +
+ parseFloat(result.balances[i].free));
}
}
}
- total = (
- marketBalanceLocked +
- marketBalanceFree +
- currencyBalanceLocked +
- currencyBalanceFree +
+ botMemory.total = (
+ botMemory.marketBalanceLocked +
+ botMemory.marketBalanceFree +
+ botMemory.currencyBalanceLocked +
+ botMemory.currencyBalanceFree +
botMemory.botMemory.otherStables
).toFixed(8);
- if (marketBalanceLocked + marketBalanceFree < total / 2) {
- buyAmount = (((total / 2) * config.BUY_VALUE) / 100).toFixed(2);
- sellAmount = (((total / 2) * config.BUY_VALUE) / 100).toFixed(2);
+ if (
+ botMemory.marketBalanceLocked + botMemory.marketBalanceFree <
+ botMemory.total / 2
+ ) {
+ botMemory.buyAmount = (
+ ((botMemory.total / 2) * config.BUY_VALUE) /
+ 100
+ ).toFixed(2);
+ botMemory.sellAmount = (
+ ((botMemory.total / 2) * config.BUY_VALUE) /
+ 100
+ ).toFixed(2);
} else {
- if (currencyBalanceLocked + currencyBalanceFree < total / 2) {
- buyAmount = (((total / 2) * config.BUY_VALUE) / 100).toFixed(2);
- sellAmount = (((total / 2) * config.BUY_VALUE) / 100).toFixed(
- 2
- );
+ if (
+ botMemory.currencyBalanceLocked +
+ botMemory.currencyBalanceFree <
+ botMemory.total / 2
+ ) {
+ botMemory.buyAmount = (
+ ((botMemory.total / 2) * config.BUY_VALUE) /
+ 100
+ ).toFixed(2);
+ botMemory.sellAmount = (
+ ((botMemory.total / 2) * config.BUY_VALUE) /
+ 100
+ ).toFixed(2);
} else {
- if (setAmount == 0) {
- buyAmount = (
- ((marketBalanceLocked + marketBalanceFree) *
+ if (botMemory.setAmount == 0) {
+ botMemory.buyAmount = (
+ ((botMemory.marketBalanceLocked +
+ botMemory.marketBalanceFree) *
config.BUY_VALUE) /
100
).toFixed(2);
- sellAmount = (
- ((currencyBalanceLocked + currencyBalanceFree) *
+ botMemory.sellAmount = (
+ ((botMemory.currencyBalanceLocked +
+ botMemory.currencyBalanceFree) *
config.BUY_VALUE) /
100
).toFixed(2);
- setAmount = 1;
+ botMemory.setAmount = 1;
}
}
}
- if (config.AUTO_SPREAD == 1) {
- status_spread = "ATIVADO";
+ if (config.AUTO_SPREAD) {
+ botMemory.status_spread = "ATIVADO";
} else {
- status_spread = "DESATIVADO";
+ botMemory.status_spread = "DESATIVADO";
}
console.clear();
- let mess = '===========================================';
+ let mess = "===========================================";
mess += `
- SALDO ${config.MARKET}...: ${marketBalanceLocked + marketBalanceFree}\n
- SALDO ${config.CURRENCY}...: ${currencyBalanceLocked + currencyBalanceFree}\n
+ SALDO ${config.MARKET}...: ${botMemory.marketBalanceLocked +
+ botMemory.marketBalanceFree}\n
+ SALDO ${config.CURRENCY}...: ${botMemory.currencyBalanceLocked +
+ botMemory.currencyBalanceFree}\n
OUTRAS STABLE: ${botMemory.otherStables.toFixed(8)}\n
- SALDO BNB....: ${balanceBNB}\n
- SALDO TOTAL..: ${total} USD\n
- AUTO SPREAD..: ${status_spread}\n
- MINIMA DO DIA: ${minDay}\n
- MAXIMA DO DIA: ${maxDay}\n
- ${config.CURRENCY + config.MARKET}.....: ${avgPrice}\n
- VARIACAO 24H.: ${changePrice} %\n
- SPREAD 24H...: ${spreadDay}\n
- SPREAD OPERA.: ${spreadOpera}\n
+ SALDO BNB....: ${botMemory.balanceBNB}\n
+ SALDO TOTAL..: ${botMemory.total} USD\n
+ AUTO SPREAD..: ${botMemory.status_spread}\n
+ MINIMA DO DIA: ${botMemory.minDay}\n
+ MAXIMA DO DIA: ${botMemory.maxDay}\n
+ ${config.CURRENCY + config.MARKET}.....: ${botMemory.avgPrice}\n
+ VARIACAO 24H.: ${botMemory.changePrice} %\n
+ SPREAD 24H...: ${botMemory.spreadDay}\n
+ SPREAD OPERA.: ${botMemory.spreadOpera}\n
SALDO INICIAL: ${config.INITIAL_INVESTMENT} USD\n
- LUCRO........: ${(total - config.INITIAL_INVESTMENT).toFixed(4)} USD\n
- ${ (
- ((total - config.INITIAL_INVESTMENT) * 100) /
- config.INITIAL_INVESTMENT
- ).toFixed(2)} %\n
+ LUCRO........: ${(
+ botMemory.total - config.INITIAL_INVESTMENT
+ ).toFixed(4)} USD\n
+ ${(
+ ((botMemory.total - config.INITIAL_INVESTMENT) *
+ 100) /
+ config.INITIAL_INVESTMENT
+ ).toFixed(2)} %\n
===========================================`;
console.log(mess);
console.log(
"UPTIME.......:",
- ((Math.floor(+new Date() / 1000) - startTime) / 3600).toFixed(2),
+ ((Math.floor(+new Date() / 1000) - botMemory.startTime) / 3600).toFixed(2),
"horas"
);
console.log(
"ORDENS.......:",
"VENDAS: [",
- totalVendas,
+ botMemory.totalSells,
"] COMPRAS: [",
- totalCompras,
+ botMemory.totalBuys,
"]"
);
- let mess =
simpleStrategy();
})
.catch(err => {
@@ -240,63 +285,56 @@ var task = cron.schedule(
});
})
.catch(err => {
- console.log(err);
+ console.error(err);
});
},
{ scheduled: false }
);
function simpleStrategy() {
- if (OrderBuyID != 0 && hasFundsBuy == 1) {
+ if (botMemory.OrderBuyID != 0 && botMemory.hasFundsBuy) {
client
.getOrder({
symbol: config.CURRENCY + config.MARKET,
- orderId: OrderBuyID
+ orderId: botMemory.OrderBuyID
})
.then(result => {
- dateOrderBuy = result.time;
+ botMemory.dateOrderBuy = result.time;
if (result.status == "FILLED") {
- filledBuyOrder = true;
+ botMemory.filledBuyOrder = true;
if (botMemory.telegram) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
- "\u{1f911} Ordem de compra executada com sucesso. Saldo atual: " +
- config.MARKET +
- ": " +
- (marketBalanceLocked + marketBalanceFree).toFixed(4) +
- " " +
- config.CURRENCY +
- " " +
- (currencyBalanceLocked + currencyBalanceFree).toFixed(4) +
- " Lucro atual: " +
- (total - config.INITIAL_INVESTMENT).toFixed(4) +
- " USD" +
- " \u{1F4B0} " +
- (
- ((total - config.INITIAL_INVESTMENT) * 100) /
- config.INITIAL_INVESTMENT
- ).toFixed(2) +
- "%"
+ `\u{1f911} Ordem de compra executada com sucesso. Saldo atual: ${
+ config.MARKET
+ } : ${(
+ botMemory.marketBalanceLocked + botMemory.marketBalanceFree
+ ).toFixed(4)} ${config.CURRENCY}${(
+ botMemory.currencyBalanceLocked + botMemory.currencyBalanceFree
+ ).toFixed(4)} Lucro atual: ${(
+ botMemory.total - config.INITIAL_INVESTMENT
+ ).toFixed(4)} USD \u{1F4B0} ${(
+ ((botMemory.total - config.INITIAL_INVESTMENT) * 100) /
+ config.INITIAL_INVESTMENT
+ ).toFixed(2)}%`
);
}
client
.cancelOrder({
symbol: config.CURRENCY + config.MARKET,
- orderId: OrderSellID
+ orderId: botMemory.OrderSellID
})
.catch(err => {
- console.log(err);
+ console.error(err);
});
}
if (result.status == "CANCELED") {
- filledBuyOrder = true;
+ botMemory.filledBuyOrder = true;
if (botMemory.telegram) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
- "\u{1f6a8} Ordem de compra " +
- OrderBuyID +
- " cancelada na exchange, gerando uma nova ordem."
+ `\u{1f6a8} Ordem de compra ${botMemory.OrderBuyID} cancelada na exchange, gerando uma nova ordem.`
);
}
}
@@ -306,27 +344,31 @@ function simpleStrategy() {
});
}
- if (OrderSellID != 0 && hasFundsSell == 1) {
+ if (botMemory.OrderSellID != 0 && botMemory.hasFundsSell) {
client
.getOrder({
symbol: config.CURRENCY + config.MARKET,
- orderId: OrderSellID
+ orderId: botMemory.OrderSellID
})
.then(result => {
dateOrderSell = result.time;
if (result.status == "FILLED") {
filledSellOrder = true;
if (botMemory.telegram) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{1f911} Ordem de venda executada com sucesso. Saldo atual: " +
config.MARKET +
": " +
- (marketBalanceLocked + marketBalanceFree).toFixed(4) +
+ (
+ botMemory.marketBalanceLocked + botMemory.marketBalanceFree
+ ).toFixed(4) +
" " +
config.CURRENCY +
" " +
- (currencyBalanceLocked + currencyBalanceFree).toFixed(4) +
+ (botMemory.currencyBalanceLocked + currencyBalanceFree).toFixed(
+ 4
+ ) +
" Lucro atual: " +
(total - config.INITIAL_INVESTMENT).toFixed(4) +
" USD" +
@@ -344,14 +386,14 @@ function simpleStrategy() {
orderId: OrderBuyID
})
.catch(err => {
- console.log(err);
+ console.error(err);
});
}
if (result.status == "CANCELED") {
filledSellOrder = true;
if (botMemory.telegram) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{1f6a8} Ordem de venda " +
OrderSellID +
@@ -376,7 +418,7 @@ function simpleStrategy() {
countExpireBuy > 2
) {
if (botMemory.telegram) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{231b} A ordem de compra expirou em " +
new Date(dateOrderSellExpire) +
@@ -391,7 +433,7 @@ function simpleStrategy() {
orderId: OrderBuyID
})
.catch(err => {
- console.log(err);
+ console.error(err);
});
countExpireBuy = 0;
} else {
@@ -408,7 +450,7 @@ function simpleStrategy() {
countExpireSell > 2
) {
if (botMemory.telegram) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{231b} A ordem de venda expirou em " +
new Date(dateOrderSellExpire) +
@@ -423,7 +465,7 @@ function simpleStrategy() {
orderId: OrderSellID
})
.catch(err => {
- console.log(err);
+ console.error(err);
});
countExpireSell = 0;
} else {
@@ -432,13 +474,13 @@ function simpleStrategy() {
}
if (
- config.AUTO_SPREAD == 1 &&
+ config.AUTO_SPREAD &&
SpreadTemp != 0 &&
SpreadTemp != spreadOpera &&
spreadOpera >= config.SPREAD_MIN
) {
if (botMemory.telegram) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{1f6a7} Ajuste no spread de mercado de " +
SpreadTemp +
@@ -453,7 +495,7 @@ function simpleStrategy() {
SpreadTemp = spreadOpera;
changePriceTemp = changePrice;
- if (config.AUTO_SPREAD == 1) {
+ if (config.AUTO_SPREAD) {
if (
(OrderSellID == 0 && OrderBuyID == 0) ||
spreadOpera <= config.SPREAD_MIN
@@ -475,11 +517,11 @@ function simpleStrategy() {
symbol: config.CURRENCY + config.MARKET
})
.then(result => {
- if (filledSellOrder == true) {
+ if (filledSellOrder) {
for (let i = result.length - 1; i > 1; i--) {
if (
- result[i].isBuyer == true &&
- filledSellOrder == true &&
+ result[i].isBuyer &&
+ filledSellOrder &&
currencyBalanceFree >= 20
) {
if (
@@ -497,7 +539,7 @@ function simpleStrategy() {
) {
sellPrice = sellPriceTemp;
if (botMemory.telegram) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{2716} ALERTA: A ordem de venda está em um valor abaixo da diferença de spread " +
spreadOpera +
@@ -512,7 +554,7 @@ function simpleStrategy() {
}
} else {
if (botMemory.telegram && botMemory.notifySellMin == 0) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de venda está dentro da diferença de spread " +
spreadOpera +
@@ -524,7 +566,7 @@ function simpleStrategy() {
}
} else {
if (botMemory.telegram && botMemory.notifySellMin == 0) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de venda está dentro da diferença de spread " +
spreadOpera +
@@ -539,12 +581,12 @@ function simpleStrategy() {
}
}
- if (filledBuyOrder == true) {
+ if (filledBuyOrder) {
for (let i = result.length - 1; i > 1; i--) {
if (
- result[i].isBuyer == false &&
- filledBuyOrder == true &&
- marketBalanceFree >= 20
+ !result[i].isBuyer &&
+ filledBuyOrder &&
+ botMemory.marketBalanceFree >= 20
) {
if (
buyPrice - parseFloat(result[i].price).toFixed(4) <
@@ -561,7 +603,7 @@ function simpleStrategy() {
) {
buyPrice = buyPriceTemp;
if (botMemory.telegram) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{2716} ALERTA: A ordem de compra está em um valor abaixo da diferença de spread " +
spreadOpera +
@@ -576,7 +618,7 @@ function simpleStrategy() {
}
} else {
if (botMemory.telegram && botMemory.notifyBuyMax == 0) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de compra está dentro da diferença de spread " +
spreadOpera +
@@ -588,7 +630,7 @@ function simpleStrategy() {
}
} else {
if (botMemory.telegram && botMemory.notifyBuyMax == 0) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de compra está dentro da diferença de spread " +
spreadOpera +
@@ -608,7 +650,7 @@ function simpleStrategy() {
.dailyStats({ symbol: "BTC" + config.MARKET })
.then(result => {
console.log(
- "DEFINIDOS....: Compra " + buyPrice + " e Venda " + sellPrice
+ "DEFINIDOS....: Compra " + botMemory.buyPrice + " e Venda " + botMemory.sellPrice
);
let mess = `
@@ -617,57 +659,61 @@ function simpleStrategy() {
============== DADOS DE COMPRA ============\n
VALOR COMPRA..: ${botMemory.buyAmount}\n
PRECO COMPRA..: ${parseFloat(botMemory.buyPriceTemp).toFixed(4)}\n
- ID ORDEM BUY..: ${OrderBuyID}\n
- EXPIRA EM.....: ${new Date(dateOrderBuyExpire)}\n
+ ID ORDEM BUY..: ${botMemory.OrderBuyID}\n
+ EXPIRA EM.....: ${new Date(botMemory.dateOrderBuyExpire)}\n
"============== DADOS DE VENDA =============\n
- VALOR VENDA...: ${sellAmount}\n
- PRECO VENDA...: ${parseFloat(sellPriceTemp).toFixed(4)}\n
- ID ORDEM SELL.: ${OrderSellID}\n
- EXPIRA EM.....: ${new Date(dateOrderSellExpire)}
+ VALOR VENDA...: ${botMemory.sellAmount}\n
+ PRECO VENDA...: ${parseFloat(botMemory.sellPriceTemp).toFixed(4)}\n
+ ID ORDEM SELL.: ${botMemory.OrderSellID}\n
+ EXPIRA EM.....: ${new Date(botMemory.dateOrderSellExpire)}
===========================================`;
console.log(mess);
client
.openOrders({
symbol: config.CURRENCY + config.MARKET
})
- .then(result => {
- if (filledBuyOrder == true) {
+ .then(() => {
+ if (botMemory.filledBuyOrder) {
if (
- (marketBalanceFree > 20 || marketBalanceFree >= buyAmount) &&
- buyPrice < config.BUY_MAX
+ (botMemory.marketBalanceFree > 20 ||
+ botMemory.marketBalanceFree >= botMemory.buyAmount) &&
+ botMemory.buyPrice < config.BUY_MAX
) {
- if (marketBalanceFree > 20 && marketBalanceFree <= buyAmount) {
- buyAmount = parseFloat(marketBalanceFree).toFixed(2);
+ if (
+ botMemory.marketBalanceFree > 20 &&
+ botMemory.marketBalanceFree <= botMemory.buyAmount
+ ) {
+ botMemory.buyAmount = parseFloat(botMemory.marketBalanceFree).toFixed(2);
}
client
.order({
symbol: config.CURRENCY + config.MARKET,
side: "BUY",
- quantity: buyAmount,
- price: buyPrice,
+ quantity: botMemory.buyAmount,
+ price: botMemory.buyPrice,
useServerTime: true
})
.then(result => {
- totalCompras++;
- OrderBuyID = result.orderId;
- filledBuyOrder = false;
+ botMemory.totalBuys++;
+ botMemory.OrderBuyID = result.orderId;
+ botMemory.filledBuyOrder = false;
})
.catch(err => {
- totalCompras--;
+ botMemory.totalBuys--;
throw err;
});
botMemory.notifyBuyMax = 0;
- hasFundsBuy = 1;
- buyPriceTemp = buyPrice;
+ botMemory.hasFundsBuy = 1;
+ botMemory.buyPriceTemp = botMemory.buyPrice;
if (botMemory.telegram) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{1F4C9} Order de compra criada com sucesso: Quantidade comprada: \u{1f4b5} " +
- buyAmount +
+ botMemory.buyAmount +
", valor de compra: \u{1f3f7} " +
- buyPrice +
+ botMemory.buyPrice +
" utilizando spread em " +
- spreadOpera +
+ botMemory.spreadOpera +
"."
);
}
@@ -675,9 +721,9 @@ function simpleStrategy() {
if (
botMemory.telegram &&
botMemory.notifyBuyMax == 0 &&
- marketBalanceFree >= buyAmount
+ botMemory.marketBalanceFree >= botMemory.buyAmount
) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{274C} O valor de compra do mercado esta acima do definido em " +
config.BUY_MAX +
@@ -685,62 +731,66 @@ function simpleStrategy() {
);
botMemory.notifyBuyMax = 1;
}
- if (botMemory.telegram && hasFundsBuy == 1 && botMemory.notifyBuyMax == 0) {
- bot.sendMessage(
+ if (
+ botMemory.telegram &&
+ botMemory.hasFundsBuy &&
+ botMemory.notifyBuyMax == 0
+ ) {
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{1F6AB} O bot está sem saldo para compras em " +
config.MARKET +
". Seu saldo atual é: " +
- marketBalanceFree +
+ botMemory.marketBalanceFree +
". O bot vai aguardar até que uma compra seja executada para liberar saldo."
);
botMemory.notifyBuyMax = 1;
}
- OrderBuyID = 0;
- hasFundsBuy = 0;
+ botMemory.OrderBuyID = 0;
+ botMemory.hasFundsBuy = false;
}
}
- if (filledSellOrder == true) {
+ if (botMemory.filledSellOrder) {
if (
- (currencyBalanceFree > 20 || currencyBalanceFree >= sellAmount) &&
- sellPrice > config.SELL_MIN
+ (botMemory.currencyBalanceFree > 20 || botMemory.currencyBalanceFree >= botMemory.sellAmount) &&
+ botMemory.sellPrice > config.SELL_MIN
) {
if (
- currencyBalanceFree > 20 &&
- currencyBalanceFree <= sellAmount
+ botMemory.currencyBalanceFree > 20 &&
+ botMemory.currencyBalanceFree <= botMemory.sellAmount
) {
- sellAmount = parseFloat(currencyBalanceFree).toFixed(2);
+ botMemory.sellAmount = parseFloat(botMemory.currencyBalanceFree).toFixed(2);
}
client
.order({
symbol: config.CURRENCY + config.MARKET,
side: "SELL",
- quantity: sellAmount,
- price: sellPrice,
+ quantity: botMemory.sellAmount,
+ price: botMemory.sellPrice,
useServerTime: true
})
.then(result => {
- totalVendas++;
- OrderSellID = result.orderId;
- filledSellOrder = false;
+ botMemory.totalSells++;
+ botMemory.OrderSellID = result.orderId;
+ botMemory.filledSellOrder = false;
})
.catch(err => {
- totalVendas--;
+ botMemory.totalSells--;
throw err;
});
botMemory.notifySellMin = 0;
- hasFundsSell = 1;
- sellPriceTemp = sellPrice;
+ botMemory.hasFundsSell = 1;
+ botMemory.sellPriceTemp = botMemory.sellPrice;
if (botMemory.telegram) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{1F4C8} Order de venda criada com sucesso: Quantidade vendida: \u{1f4b5} " +
- sellAmount +
+ botMemory.sellAmount +
", valor de venda: \u{1f3f7} " +
- sellPrice +
+ botMemory.sellPrice +
" utilizando spread em " +
- spreadOpera +
+ botMemory.spreadOpera +
"."
);
}
@@ -748,9 +798,9 @@ function simpleStrategy() {
if (
botMemory.telegram &&
botMemory.notifySellMin == 0 &&
- currencyBalanceFree >= sellAmount
+ botMemory.currencyBalanceFree >= botMemory.sellAmount
) {
- bot.sendMessage(
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{274C} O valor de venda do mercado esta abaixo do definido em " +
config.SELL_MIN +
@@ -758,19 +808,23 @@ function simpleStrategy() {
);
botMemory.notifySellMin = 1;
}
- if (botMemory.telegram && hasFundsSell == 1 && botMemory.notifySellMin == 0) {
- bot.sendMessage(
+ if (
+ botMemory.telegram &&
+ botMemory.hasFundsSell &&
+ botMemory.notifySellMin == 0
+ ) {
+ tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{1F6AB} O bot está sem saldo para vendas em " +
config.CURRENCY +
". Seu saldo atual é: " +
- currencyBalanceFree +
+ botMemory.currencyBalanceFree +
". O bot vai aguardar até que uma compra seja executada para liberar saldo."
);
botMemory.notifySellMin = 1;
}
- OrderSellID = 0;
- hasFundsSell = 0;
+ botMemory.OrderSellID = 0;
+ botMemory.hasFundsSell = 0;
}
}
})
@@ -783,73 +837,32 @@ function simpleStrategy() {
});
}
-// limpa o console
console.clear();
-// define as variaveis
-let botMemory = {
- notifyBuyMax: 0,
- notifySellMin: 0,
- otherStables: 0,
- hasFundsBuy: 1,
- hasFundsSell: 1,
- countExpireBuy: 0,
- countExpireSell: 0,
- dateOrderBuy: 0,
- dateOrderBuyExpire: 0,
- dateOrderSell: 0,
- dateOrderSellExpire: 0,
- buyPriceTemp: 0,
- sellPriceTemp: 0,
- changePriceTemp: 0,
- startTime: Date.now(),
- avgPrice: 0,
- OrderBuyID: 0,
- filledBuyOrder: true,
- filledSellOrder: true,
- OrderSellID: 0,
- SpreadTemp: 0,
- totalCompras: 0,
- totalVendas: 0,
- marketBalanceLocked: 0,
- marketBalanceFree: 0,
- currencyBalanceLocked: 0,
- currencyBalanceFree: 0,
- total: 0,
- setAmount: 0,
- setBuyOrder: 0,
- saldo_TUSD: 0,
- saldo_USDT: 0,
- saldo_USDC: 0,
- saldo_PAX: 0,
- saldo_USDS: 0,
- saldo_USDSB: 0,
- total_stable: 0,
- telegram = false
-};
-
console.log("Iniciando...");
task.start();
app.get("/*", (req, res) => {
- let total_investiment = (botMemory.total - config.INITIAL_INVESTMENT).toFixed(8);
+ let total_investiment = (botMemory.total - config.INITIAL_INVESTMENT).toFixed(
+ 8
+ );
res.json({
initialInvestment: config.INITIAL_INVESTMENT,
market: config.MARKET,
currency: config.CURRENCY,
balances: {
- usdt: parseFloat(botMemory.saldo_USDT),
- tusd: parseFloat(botMemory.saldo_TUSD),
- pax: parseFloat(botMemory.saldo_PAX),
- usdc: parseFloat(botMemory.saldo_USDC),
- usds: parseFloat(botMemory.saldo_USDS),
- usdsb: parseFloat(botMemory.saldo_USDSB)
+ usdt: parseFloat(botMemory.balance_USDT),
+ tusd: parseFloat(botMemory.balance_TUSD),
+ pax: parseFloat(botMemory.balance_PAX),
+ usdc: parseFloat(botMemory.balance_USDC),
+ usds: parseFloat(botMemory.balance_USDS),
+ usdsb: parseFloat(botMemory.balance_USDSB)
},
profit: {
USD: parseFloat(total_investiment),
percent: parseFloat(
(
- ((total - config.INITIAL_INVESTMENT) * 100) /
+ ((botMemory.total - config.INITIAL_INVESTMENT) * 100) /
config.INITIAL_INVESTMENT
).toFixed(2)
)
diff --git a/src/report.js b/src/report.js
index f0c80cf..6c760e5 100644
--- a/src/report.js
+++ b/src/report.js
@@ -3,8 +3,7 @@ const adapter = new FileSync('db.json');
const low = require('lowdb');
const db = low(adapter);
-
-var config = require('./config.json');
+var config = require('./config.js/index.js');
var http = require('http');
var ip = '0.0.0.0';
var port = config.LISTEN_REPORT;
@@ -12,12 +11,12 @@ var getJSON = require('get-json');
var dateFormat = require('dateformat');
var cron = require('node-cron');
-saldo_TUSD = 0;
-saldo_USDT = 0;
-saldo_USDC = 0;
-saldo_PAX = 0;
-saldo_USDS = 0;
-saldo_USDSB = 0;
+balance_TUSD = 0;
+balance_USDT = 0;
+balance_USDC = 0;
+balance_PAX = 0;
+balance_USDS = 0;
+balance_USDSB = 0;
total_stable = 0;
date = 0;
@@ -26,7 +25,7 @@ profit_day_percentage = 0;
total_profit = 0;
total_profit_percentage = 0;
-db.defaults({ reports: [], date: {}, saldo_USDT: {}, saldo_TUSD: {}, saldo_USDC: {}, saldo_PAX: {}, saldo_USDS: {}, saldo_USDSB: {}, profit_day: {}, profit_day_percentage: {}, total_profit: {}, total_profit_percentage: {}, id: 0 }).write();
+db.defaults({ reports: [], date: {}, balance_USDT: {}, balance_TUSD: {}, balance_USDC: {}, balance_PAX: {}, balance_USDS: {}, balance_USDSB: {}, profit_day: {}, profit_day_percentage: {}, total_profit: {}, total_profit_percentage: {}, id: 0 }).write();
total_report = db.get('reports').size().value();
if(total_report == 0) {
profit_day = total_profit;
@@ -34,17 +33,17 @@ if(total_report == 0) {
getJSON('http://localhost', function(error, response){
total_profit = parseFloat(response.profit['USD'], 8);
date = dateFormat(new Date(), "dd/mm/yyyy");
- saldo_USDT = parseFloat(response.balances['usdt'], 8);
- saldo_TUSD = parseFloat(response.balances['tusd'], 8);
- saldo_USDC = parseFloat(response.balances['usdc'], 8);
- saldo_PAX = parseFloat(response.balances['pax'], 8);
- saldo_USDS = parseFloat(response.balances['usds'], 8);
- saldo_USDSB = parseFloat(response.balances['usdsb'], 8);
+ balance_USDT = parseFloat(response.balances['usdt'], 8);
+ balance_TUSD = parseFloat(response.balances['tusd'], 8);
+ balance_USDC = parseFloat(response.balances['usdc'], 8);
+ balance_PAX = parseFloat(response.balances['pax'], 8);
+ balance_USDS = parseFloat(response.balances['usds'], 8);
+ balance_USDSB = parseFloat(response.balances['usdsb'], 8);
total_profit_percentage = response.profit['percent'].toFixed(2);
total_profit_percentage = parseFloat(total_profit_percentage);
profit_day = total_profit;
profit_day_percentage = total_profit_percentage;
- db.get('reports').push({ date: date, saldo_USDT: saldo_USDT, saldo_TUSD: saldo_TUSD, saldo_USDC: saldo_USDC, saldo_PAX: saldo_PAX, saldo_USDS: saldo_USDS, saldo_USDSB: saldo_USDSB, profit_day: profit_day, profit_day_percentage: profit_day_percentage, total_profit: total_profit, total_profit_percentage: total_profit_percentage, id: total_report}).write();
+ db.get('reports').push({ date: date, balance_USDT: balance_USDT, balance_TUSD: balance_TUSD, balance_USDC: balance_USDC, balance_PAX: balance_PAX, balance_USDS: balance_USDS, balance_USDSB: balance_USDSB, profit_day: profit_day, profit_day_percentage: profit_day_percentage, total_profit: total_profit, total_profit_percentage: total_profit_percentage, id: total_report}).write();
db.update('id', n => n + 1).write();
});
}
@@ -55,12 +54,12 @@ var task = cron.schedule('0 0 * * *', () => {
total_profit = parseFloat(response.profit['USD'], 8);
date = dateFormat(new Date(), "dd/mm/yyyy");
- saldo_USDT = parseFloat(response.balances['usdt'], 8);
- saldo_TUSD = parseFloat(response.balances['tusd'], 8);
- saldo_USDC = parseFloat(response.balances['usdc'], 8);
- saldo_PAX = parseFloat(response.balances['pax'], 8);
- saldo_USDS = parseFloat(response.balances['usds'], 8);
- saldo_USDSB = parseFloat(response.balances['usdsb'], 8);
+ balance_USDT = parseFloat(response.balances['usdt'], 8);
+ balance_TUSD = parseFloat(response.balances['tusd'], 8);
+ balance_USDC = parseFloat(response.balances['usdc'], 8);
+ balance_PAX = parseFloat(response.balances['pax'], 8);
+ balance_USDS = parseFloat(response.balances['usds'], 8);
+ balance_USDSB = parseFloat(response.balances['usdsb'], 8);
total_profit_percentage = response.profit['percent'].toFixed(2);
total_profit_percentage = parseFloat(total_profit_percentage);
@@ -75,7 +74,7 @@ var task = cron.schedule('0 0 * * *', () => {
profit_day_percentage = Math.abs(profit_day_percentage);
profit_day_percentage = parseFloat(profit_day_percentage);
- db.get('reports').push({ date: date, saldo_USDT: saldo_USDT, saldo_TUSD: saldo_TUSD, saldo_USDC: saldo_USDC, saldo_PAX: saldo_PAX, saldo_USDS: saldo_USDS, saldo_USDSB: saldo_USDSB, profit_day: profit_day, profit_day_percentage: profit_day_percentage, total_profit: total_profit, total_profit_percentage: total_profit_percentage, id: total_report}).write();
+ db.get('reports').push({ date: date, balance_USDT: balance_USDT, balance_TUSD: balance_TUSD, balance_USDC: balance_USDC, balance_PAX: balance_PAX, balance_USDS: balance_USDS, balance_USDSB: balance_USDSB, profit_day: profit_day, profit_day_percentage: profit_day_percentage, total_profit: total_profit, total_profit_percentage: total_profit_percentage, id: total_report}).write();
db.update('id', n => n + 1).write();
});
});
@@ -92,14 +91,14 @@ var server=http.createServer((function(request,response)
response.write('
Stable Coin - Report
| Balances |
');
var total_report = db.get('reports').size().value();
var result_report = db.get('reports').find({ id: (total_report - 1) }).value();
- response.write(' | USDT | '+result_report.saldo_USDT+' |
');
- response.write(' | PAX | '+result_report.saldo_PAX+' |
');
- response.write(' | TUSD | '+result_report.saldo_TUSD+' |
');
- response.write(' | USDC | '+result_report.saldo_USDC+' |
');
- response.write(' | USDS | '+result_report.saldo_USDS+' |
');
- response.write(' | USDSB | '+result_report.saldo_USDSB+' |
');
+ response.write(' | USDT | '+result_report.balance_USDT+' |
');
+ response.write(' | PAX | '+result_report.balance_PAX+' |
');
+ response.write(' | TUSD | '+result_report.balance_TUSD+' |
');
+ response.write(' | USDC | '+result_report.balance_USDC+' |
');
+ response.write(' | USDS | '+result_report.balance_USDS+' |
');
+ response.write(' | USDSB | '+result_report.balance_USDSB+' |
');
response.write(' | Initial Invest |  '+config.INITIAL_INVESTMENT+' | ');
- response.write('
| Total: | '+(result_report.saldo_USDT + result_report.saldo_PAX + result_report.saldo_TUSD + result_report.saldo_USDC + result_report.saldo_USDS + result_report.saldo_USDSB) +' |
');
+ response.write(' | Total: | '+(result_report.balance_USDT + result_report.balance_PAX + result_report.balance_TUSD + result_report.balance_USDC + result_report.balance_USDS + result_report.balance_USDSB) +' |
');
response.write('| Date | Profit Today USD | % Today | Total Profit | Total % |
');
var result_report = db.get('reports').value();
for (let index = 0; index < result_report.length; index++) {
diff --git a/src/utils.js b/src/utils.js
deleted file mode 100644
index 4be30a9..0000000
--- a/src/utils.js
+++ /dev/null
@@ -1,5 +0,0 @@
-export function isInArray(array, value) {
- if (array.indexOf(value) == -1) return false;
- return true;
- }
-
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
new file mode 100644
index 0000000..1197b2e
--- /dev/null
+++ b/yarn.lock
@@ -0,0 +1,1891 @@
+# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
+# yarn lockfile v1
+
+
+"@babel/code-frame@^7.0.0":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.8.3.tgz#33e25903d7481181534e12ec0a25f16b6fcf419e"
+ integrity sha512-a9gxpmdXtZEInkCSHUJDLHZVBgb1QS0jhss4cPP93EW7s+uC5bikET2twEF3KV+7rDblJcmNvTR7VJejqd2C2g==
+ dependencies:
+ "@babel/highlight" "^7.8.3"
+
+"@babel/highlight@^7.8.3":
+ version "7.8.3"
+ resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.8.3.tgz#28f173d04223eaaa59bc1d439a3836e6d1265797"
+ integrity sha512-PX4y5xQUvy0fnEVHrYOarRPXVWafSjTW9T0Hab8gVIawpl2Sj0ORyrygANq+KjcNlSSTw0YCLSNA8OyZ1I4yEg==
+ dependencies:
+ chalk "^2.0.0"
+ esutils "^2.0.2"
+ js-tokens "^4.0.0"
+
+"@types/color-name@^1.1.1":
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0"
+ integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==
+
+"@types/node@^13.1.0":
+ version "13.7.7"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-13.7.7.tgz#1628e6461ba8cc9b53196dfeaeec7b07fa6eea99"
+ integrity sha512-Uo4chgKbnPNlxQwoFmYIwctkQVkMMmsAoGGU4JKwLuvBefF0pCq4FybNSnfkfRCpC7ZW7kttcC/TrRtAJsvGtg==
+
+accepts@~1.3.7:
+ version "1.3.7"
+ resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
+ integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
+ dependencies:
+ mime-types "~2.1.24"
+ negotiator "0.6.2"
+
+acorn-jsx@^5.1.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.2.0.tgz#4c66069173d6fdd68ed85239fc256226182b2ebe"
+ integrity sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==
+
+acorn@^7.1.0:
+ version "7.1.1"
+ resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.1.tgz#e35668de0b402f359de515c5482a1ab9f89a69bf"
+ integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg==
+
+ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5:
+ version "6.12.0"
+ resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7"
+ integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw==
+ dependencies:
+ fast-deep-equal "^3.1.1"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.4.1"
+ uri-js "^4.2.2"
+
+ansi-escapes@^4.2.1:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.0.tgz#a4ce2b33d6b214b7950d8595c212f12ac9cc569d"
+ integrity sha512-EiYhwo0v255HUL6eDyuLrXEkTi7WwVCLAw+SeOQ7M7qdun1z1pum4DEm/nuqIVbPvi9RPPc9k9LbyBv6H0DwVg==
+ dependencies:
+ type-fest "^0.8.1"
+
+ansi-regex@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997"
+ integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==
+
+ansi-regex@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75"
+ integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==
+
+ansi-styles@^3.2.0, ansi-styles@^3.2.1:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
+ integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
+ dependencies:
+ color-convert "^1.9.0"
+
+ansi-styles@^4.1.0:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.2.1.tgz#90ae75c424d008d2624c5bf29ead3177ebfcf359"
+ integrity sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==
+ dependencies:
+ "@types/color-name" "^1.1.1"
+ color-convert "^2.0.1"
+
+argparse@^1.0.7:
+ version "1.0.10"
+ resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911"
+ integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==
+ dependencies:
+ sprintf-js "~1.0.2"
+
+array-flatten@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
+ integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
+
+array.prototype.findindex@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/array.prototype.findindex/-/array.prototype.findindex-2.1.0.tgz#f43f8ed823274f0733647ee403b2c0c9771a97fe"
+ integrity sha512-25kJHCjXltdtljjwcyKvCTywmbUAeTJVB2ADVe0oP4jcefsd+K9pJJ3IdHPahLICoszcCLoNF+evWpEduzBlng==
+ dependencies:
+ define-properties "^1.1.3"
+ es-abstract "^1.17.4"
+
+asn1@~0.2.3:
+ version "0.2.4"
+ resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136"
+ integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==
+ dependencies:
+ safer-buffer "~2.1.0"
+
+assert-plus@1.0.0, assert-plus@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
+ integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
+
+astral-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
+ integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
+
+asynckit@^0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
+ integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
+
+aws-sign2@~0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
+ integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
+
+aws4@^1.8.0:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e"
+ integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==
+
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+ integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
+
+bcrypt-pbkdf@^1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e"
+ integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=
+ dependencies:
+ tweetnacl "^0.14.3"
+
+binance-api-node@^0.9.2:
+ version "0.9.15"
+ resolved "https://registry.yarnpkg.com/binance-api-node/-/binance-api-node-0.9.15.tgz#fd8ff8eb71abfec6278e2bdda63f3c0af7095273"
+ integrity sha512-1ox8JxtCxdxtURi3qfQREmxc9qw9b2jnC3Kmg0b+gNG2LzBo9oBNxi/m6mCr7Awvyr0mcV2hl2afykxpnNbGpw==
+ dependencies:
+ isomorphic-fetch "^2.2.1"
+ lodash.zipobject "^4.1.3"
+ reconnecting-websocket "^4.2.0"
+ ws "^7.2.0"
+
+bl@^1.1.2:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c"
+ integrity sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==
+ dependencies:
+ readable-stream "^2.3.5"
+ safe-buffer "^5.1.1"
+
+bluebird@^3.3.4, bluebird@^3.5.0:
+ version "3.7.2"
+ resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f"
+ integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==
+
+body-parser@1.19.0:
+ version "1.19.0"
+ resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a"
+ integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==
+ dependencies:
+ bytes "3.1.0"
+ content-type "~1.0.4"
+ debug "2.6.9"
+ depd "~1.1.2"
+ http-errors "1.7.2"
+ iconv-lite "0.4.24"
+ on-finished "~2.3.0"
+ qs "6.7.0"
+ raw-body "2.4.0"
+ type-is "~1.6.17"
+
+brace-expansion@^1.1.7:
+ version "1.1.11"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
+ integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
+bytes@3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
+ integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
+
+callsites@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73"
+ integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==
+
+caseless@~0.12.0:
+ version "0.12.0"
+ resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc"
+ integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=
+
+chalk@^2.0.0, chalk@^2.1.0:
+ version "2.4.2"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
+ integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
+ dependencies:
+ ansi-styles "^3.2.1"
+ escape-string-regexp "^1.0.5"
+ supports-color "^5.3.0"
+
+chalk@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4"
+ integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==
+ dependencies:
+ ansi-styles "^4.1.0"
+ supports-color "^7.1.0"
+
+chardet@^0.7.0:
+ version "0.7.0"
+ resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
+ integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
+
+cli-cursor@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307"
+ integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==
+ dependencies:
+ restore-cursor "^3.1.0"
+
+cli-width@^2.0.0:
+ version "2.2.0"
+ resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
+ integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=
+
+color-convert@^1.9.0:
+ version "1.9.3"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
+ integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
+ dependencies:
+ color-name "1.1.3"
+
+color-convert@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
+ integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
+ dependencies:
+ color-name "~1.1.4"
+
+color-name@1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
+ integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
+
+color-name@~1.1.4:
+ version "1.1.4"
+ resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
+ integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
+
+combined-stream@^1.0.6, combined-stream@~1.0.6:
+ version "1.0.8"
+ resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
+ integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
+ dependencies:
+ delayed-stream "~1.0.0"
+
+concat-map@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
+ integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
+
+content-disposition@0.5.3:
+ version "0.5.3"
+ resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd"
+ integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==
+ dependencies:
+ safe-buffer "5.1.2"
+
+content-type@~1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
+ integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
+
+cookie-signature@1.0.6:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
+ integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
+
+cookie@0.4.0:
+ version "0.4.0"
+ resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba"
+ integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==
+
+core-util-is@1.0.2, core-util-is@~1.0.0:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
+ integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
+
+cross-spawn@^6.0.5:
+ version "6.0.5"
+ resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
+ integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==
+ dependencies:
+ nice-try "^1.0.4"
+ path-key "^2.0.1"
+ semver "^5.5.0"
+ shebang-command "^1.2.0"
+ which "^1.2.9"
+
+dashdash@^1.12.0:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0"
+ integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=
+ dependencies:
+ assert-plus "^1.0.0"
+
+dateformat@^3.0.3:
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
+ integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
+
+debug@*, debug@^4.0.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
+ integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==
+ dependencies:
+ ms "^2.1.1"
+
+debug@2.6.9, debug@^2.2.0:
+ version "2.6.9"
+ resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
+ integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
+ dependencies:
+ ms "2.0.0"
+
+deep-is@~0.1.3:
+ version "0.1.3"
+ resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
+ integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=
+
+define-properties@^1.1.2, define-properties@^1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
+ integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
+ dependencies:
+ object-keys "^1.0.12"
+
+delayed-stream@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+ integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
+
+depd@^1.1.0, depd@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
+ integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
+
+destroy@~1.0.4:
+ version "1.0.4"
+ resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
+ integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
+
+doctrine@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961"
+ integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==
+ dependencies:
+ esutils "^2.0.2"
+
+ecc-jsbn@~0.1.1:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9"
+ integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=
+ dependencies:
+ jsbn "~0.1.0"
+ safer-buffer "^2.1.0"
+
+ee-first@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
+ integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
+
+emoji-regex@^7.0.1:
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
+ integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==
+
+emoji-regex@^8.0.0:
+ version "8.0.0"
+ resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
+ integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
+
+encodeurl@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
+ integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
+
+encoding@^0.1.11:
+ version "0.1.12"
+ resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.12.tgz#538b66f3ee62cd1ab51ec323829d1f9480c74beb"
+ integrity sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=
+ dependencies:
+ iconv-lite "~0.4.13"
+
+end-of-stream@^1.1.0:
+ version "1.4.4"
+ resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
+ integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
+ dependencies:
+ once "^1.4.0"
+
+es-abstract@^1.17.4:
+ version "1.17.4"
+ resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.17.4.tgz#e3aedf19706b20e7c2594c35fc0d57605a79e184"
+ integrity sha512-Ae3um/gb8F0mui/jPL+QiqmglkUsaQf7FwBEHYIFkztkneosu9imhqHpBzQ3h1vit8t5iQ74t6PEVvphBZiuiQ==
+ dependencies:
+ es-to-primitive "^1.2.1"
+ function-bind "^1.1.1"
+ has "^1.0.3"
+ has-symbols "^1.0.1"
+ is-callable "^1.1.5"
+ is-regex "^1.0.5"
+ object-inspect "^1.7.0"
+ object-keys "^1.1.1"
+ object.assign "^4.1.0"
+ string.prototype.trimleft "^2.1.1"
+ string.prototype.trimright "^2.1.1"
+
+es-to-primitive@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a"
+ integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==
+ dependencies:
+ is-callable "^1.1.4"
+ is-date-object "^1.0.1"
+ is-symbol "^1.0.2"
+
+escape-html@~1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
+ integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
+
+escape-string-regexp@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
+ integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
+
+eslint-scope@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9"
+ integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==
+ dependencies:
+ esrecurse "^4.1.0"
+ estraverse "^4.1.1"
+
+eslint-utils@^1.4.3:
+ version "1.4.3"
+ resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f"
+ integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==
+ dependencies:
+ eslint-visitor-keys "^1.1.0"
+
+eslint-visitor-keys@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz#e2a82cea84ff246ad6fb57f9bde5b46621459ec2"
+ integrity sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==
+
+eslint@^6.8.0:
+ version "6.8.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb"
+ integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==
+ dependencies:
+ "@babel/code-frame" "^7.0.0"
+ ajv "^6.10.0"
+ chalk "^2.1.0"
+ cross-spawn "^6.0.5"
+ debug "^4.0.1"
+ doctrine "^3.0.0"
+ eslint-scope "^5.0.0"
+ eslint-utils "^1.4.3"
+ eslint-visitor-keys "^1.1.0"
+ espree "^6.1.2"
+ esquery "^1.0.1"
+ esutils "^2.0.2"
+ file-entry-cache "^5.0.1"
+ functional-red-black-tree "^1.0.1"
+ glob-parent "^5.0.0"
+ globals "^12.1.0"
+ ignore "^4.0.6"
+ import-fresh "^3.0.0"
+ imurmurhash "^0.1.4"
+ inquirer "^7.0.0"
+ is-glob "^4.0.0"
+ js-yaml "^3.13.1"
+ json-stable-stringify-without-jsonify "^1.0.1"
+ levn "^0.3.0"
+ lodash "^4.17.14"
+ minimatch "^3.0.4"
+ mkdirp "^0.5.1"
+ natural-compare "^1.4.0"
+ optionator "^0.8.3"
+ progress "^2.0.0"
+ regexpp "^2.0.1"
+ semver "^6.1.2"
+ strip-ansi "^5.2.0"
+ strip-json-comments "^3.0.1"
+ table "^5.2.3"
+ text-table "^0.2.0"
+ v8-compile-cache "^2.0.3"
+
+esm@^3.2.25:
+ version "3.2.25"
+ resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10"
+ integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==
+
+espree@^6.1.2:
+ version "6.1.2"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-6.1.2.tgz#6c272650932b4f91c3714e5e7b5f5e2ecf47262d"
+ integrity sha512-2iUPuuPP+yW1PZaMSDM9eyVf8D5P0Hi8h83YtZ5bPc/zHYjII5khoixIUTMO794NOY8F/ThF1Bo8ncZILarUTA==
+ dependencies:
+ acorn "^7.1.0"
+ acorn-jsx "^5.1.0"
+ eslint-visitor-keys "^1.1.0"
+
+esprima@^4.0.0:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
+ integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
+
+esquery@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.1.0.tgz#c5c0b66f383e7656404f86b31334d72524eddb48"
+ integrity sha512-MxYW9xKmROWF672KqjO75sszsA8Mxhw06YFeS5VHlB98KDHbOSurm3ArsjO60Eaf3QmGMCP1yn+0JQkNLo/97Q==
+ dependencies:
+ estraverse "^4.0.0"
+
+esrecurse@^4.1.0:
+ version "4.2.1"
+ resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
+ integrity sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==
+ dependencies:
+ estraverse "^4.1.0"
+
+estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1:
+ version "4.3.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
+ integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
+
+esutils@^2.0.2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64"
+ integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==
+
+etag@~1.8.1:
+ version "1.8.1"
+ resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
+ integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
+
+eventemitter3@^2.0.2:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-2.0.3.tgz#b5e1079b59fb5e1ba2771c0a993be060a58c99ba"
+ integrity sha1-teEHm1n7XhuidxwKmTvgYKWMmbo=
+
+express@^4.17.1:
+ version "4.17.1"
+ resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134"
+ integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==
+ dependencies:
+ accepts "~1.3.7"
+ array-flatten "1.1.1"
+ body-parser "1.19.0"
+ content-disposition "0.5.3"
+ content-type "~1.0.4"
+ cookie "0.4.0"
+ cookie-signature "1.0.6"
+ debug "2.6.9"
+ depd "~1.1.2"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ finalhandler "~1.1.2"
+ fresh "0.5.2"
+ merge-descriptors "1.0.1"
+ methods "~1.1.2"
+ on-finished "~2.3.0"
+ parseurl "~1.3.3"
+ path-to-regexp "0.1.7"
+ proxy-addr "~2.0.5"
+ qs "6.7.0"
+ range-parser "~1.2.1"
+ safe-buffer "5.1.2"
+ send "0.17.1"
+ serve-static "1.14.1"
+ setprototypeof "1.1.1"
+ statuses "~1.5.0"
+ type-is "~1.6.18"
+ utils-merge "1.0.1"
+ vary "~1.1.2"
+
+extend@~3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
+ integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
+
+external-editor@^3.0.3:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495"
+ integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==
+ dependencies:
+ chardet "^0.7.0"
+ iconv-lite "^0.4.24"
+ tmp "^0.0.33"
+
+extsprintf@1.3.0:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
+ integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=
+
+extsprintf@^1.2.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"
+ integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=
+
+fast-deep-equal@^3.1.1:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz#545145077c501491e33b15ec408c294376e94ae4"
+ integrity sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==
+
+fast-json-stable-stringify@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
+ integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
+
+fast-levenshtein@~2.0.6:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
+ integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
+
+figures@^3.0.0:
+ version "3.2.0"
+ resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af"
+ integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==
+ dependencies:
+ escape-string-regexp "^1.0.5"
+
+file-entry-cache@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c"
+ integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==
+ dependencies:
+ flat-cache "^2.0.1"
+
+file-type@^3.9.0:
+ version "3.9.0"
+ resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9"
+ integrity sha1-JXoHg4TR24CHvESdEH1SpSZyuek=
+
+finalhandler@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d"
+ integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==
+ dependencies:
+ debug "2.6.9"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ on-finished "~2.3.0"
+ parseurl "~1.3.3"
+ statuses "~1.5.0"
+ unpipe "~1.0.0"
+
+flat-cache@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0"
+ integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==
+ dependencies:
+ flatted "^2.0.0"
+ rimraf "2.6.3"
+ write "1.0.3"
+
+flatted@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08"
+ integrity sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==
+
+forever-agent@~0.6.1:
+ version "0.6.1"
+ resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91"
+ integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=
+
+form-data@~2.3.2:
+ version "2.3.3"
+ resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6"
+ integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==
+ dependencies:
+ asynckit "^0.4.0"
+ combined-stream "^1.0.6"
+ mime-types "^2.1.12"
+
+forwarded@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
+ integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
+
+fresh@0.5.2:
+ version "0.5.2"
+ resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
+ integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
+
+fs.realpath@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
+ integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
+
+function-bind@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
+ integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==
+
+functional-red-black-tree@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
+ integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=
+
+get-json@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/get-json/-/get-json-1.0.1.tgz#61b983f0b1b61e9c74d4413290af6b2a4e671ac8"
+ integrity sha512-buUOE2bLaxIsF6zGIrwvsTVlvgU85qwAWf0Hgq/EJBBoSssUqOauXWKpsh4wgPdTlZHEVllLtphiuIzFM4UEHQ==
+ dependencies:
+ is-node "0.0.0"
+ jsonp "0.0.4"
+ phin "^2.2.6"
+
+getpass@^0.1.1:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa"
+ integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=
+ dependencies:
+ assert-plus "^1.0.0"
+
+glob-parent@^5.0.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.0.tgz#5f4c1d1e748d30cd73ad2944b3577a81b081e8c2"
+ integrity sha512-qjtRgnIVmOfnKUE3NJAQEdk+lKrxfw8t5ke7SXtfMTHcjsBfOfWXCQfdb30zfDoZQ2IRSIiidmjtbHZPZ++Ihw==
+ dependencies:
+ is-glob "^4.0.1"
+
+glob@^7.1.3:
+ version "7.1.6"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6"
+ integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
+globals@^12.1.0:
+ version "12.3.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-12.3.0.tgz#1e564ee5c4dded2ab098b0f88f24702a3c56be13"
+ integrity sha512-wAfjdLgFsPZsklLJvOBUBmzYE8/CwhEqSBEMRXA3qxIiNtyqvjYurAtIfDh6chlEPUfmTY3MnZh5Hfh4q0UlIw==
+ dependencies:
+ type-fest "^0.8.1"
+
+graceful-fs@^4.1.3:
+ version "4.2.3"
+ resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.3.tgz#4a12ff1b60376ef09862c2093edd908328be8423"
+ integrity sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==
+
+har-schema@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
+ integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
+
+har-validator@~5.1.3:
+ version "5.1.3"
+ resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.3.tgz#1ef89ebd3e4996557675eed9893110dc350fa080"
+ integrity sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==
+ dependencies:
+ ajv "^6.5.5"
+ har-schema "^2.0.0"
+
+has-flag@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
+ integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0=
+
+has-flag@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
+ integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
+
+has-symbols@^1.0.0, has-symbols@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.1.tgz#9f5214758a44196c406d9bd76cebf81ec2dd31e8"
+ integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==
+
+has@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
+ integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==
+ dependencies:
+ function-bind "^1.1.1"
+
+http-errors@1.7.2:
+ version "1.7.2"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f"
+ integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==
+ dependencies:
+ depd "~1.1.2"
+ inherits "2.0.3"
+ setprototypeof "1.1.1"
+ statuses ">= 1.5.0 < 2"
+ toidentifier "1.0.0"
+
+http-errors@~1.7.2:
+ version "1.7.3"
+ resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06"
+ integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==
+ dependencies:
+ depd "~1.1.2"
+ inherits "2.0.4"
+ setprototypeof "1.1.1"
+ statuses ">= 1.5.0 < 2"
+ toidentifier "1.0.0"
+
+http-signature@~1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
+ integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=
+ dependencies:
+ assert-plus "^1.0.0"
+ jsprim "^1.2.2"
+ sshpk "^1.7.0"
+
+http@0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/http/-/http-0.0.0.tgz#86e6326d29c5d039de9fac584a45689f929f4f72"
+ integrity sha1-huYybSnF0Dnen6xYSkVon5KfT3I=
+
+iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@~0.4.13:
+ version "0.4.24"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
+ integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
+ dependencies:
+ safer-buffer ">= 2.1.2 < 3"
+
+ignore@^4.0.6:
+ version "4.0.6"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
+ integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==
+
+import-fresh@^3.0.0:
+ version "3.2.1"
+ resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.2.1.tgz#633ff618506e793af5ac91bf48b72677e15cbe66"
+ integrity sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==
+ dependencies:
+ parent-module "^1.0.0"
+ resolve-from "^4.0.0"
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+ integrity sha1-khi5srkoojixPcT7a21XbyMUU+o=
+
+inflight@^1.0.4:
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
+ integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
+ dependencies:
+ once "^1.3.0"
+ wrappy "1"
+
+inherits@2, inherits@2.0.4, inherits@~2.0.3:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
+ integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
+
+inherits@2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
+ integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
+
+inquirer@^7.0.0:
+ version "7.0.5"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.0.5.tgz#fb95b238ba19966c1a1f55db53c3f0ce5c9e4275"
+ integrity sha512-6Z5cP+LAO0rzNE7xWjWtT84jxKa5ScLEGLgegPXeO3dGeU8lNe5Ii7SlXH6KVtLGlDuaEhsvsFjrjWjw8j5lFg==
+ dependencies:
+ ansi-escapes "^4.2.1"
+ chalk "^3.0.0"
+ cli-cursor "^3.1.0"
+ cli-width "^2.0.0"
+ external-editor "^3.0.3"
+ figures "^3.0.0"
+ lodash "^4.17.15"
+ mute-stream "0.0.8"
+ run-async "^2.4.0"
+ rxjs "^6.5.3"
+ string-width "^4.1.0"
+ strip-ansi "^6.0.0"
+ through "^2.3.6"
+
+ipaddr.js@1.9.1:
+ version "1.9.1"
+ resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3"
+ integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==
+
+is-callable@^1.1.4, is-callable@^1.1.5:
+ version "1.1.5"
+ resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.5.tgz#f7e46b596890456db74e7f6e976cb3273d06faab"
+ integrity sha512-ESKv5sMCJB2jnHTWZ3O5itG+O128Hsus4K4Qh1h2/cgn2vbgnLSVqfV46AeJA9D5EeeLa9w81KUXMtn34zhX+Q==
+
+is-date-object@^1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.2.tgz#bda736f2cd8fd06d32844e7743bfa7494c3bfd7e"
+ integrity sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==
+
+is-extglob@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
+ integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=
+
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+ integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=
+
+is-fullwidth-code-point@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
+ integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
+
+is-glob@^4.0.0, is-glob@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc"
+ integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==
+ dependencies:
+ is-extglob "^2.1.1"
+
+is-node@0.0.0:
+ version "0.0.0"
+ resolved "https://registry.yarnpkg.com/is-node/-/is-node-0.0.0.tgz#87dd650b87fb6a39c50caafee0e9f6835ec15e41"
+ integrity sha1-h91lC4f7ajnFDKr+4On2g17BXkE=
+
+is-promise@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
+ integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=
+
+is-regex@^1.0.5:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae"
+ integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ==
+ dependencies:
+ has "^1.0.3"
+
+is-stream@^1.0.1:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
+ integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ=
+
+is-symbol@^1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.3.tgz#38e1014b9e6329be0de9d24a414fd7441ec61937"
+ integrity sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==
+ dependencies:
+ has-symbols "^1.0.1"
+
+is-typedarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a"
+ integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=
+
+isarray@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
+ integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
+
+isexe@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
+ integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=
+
+isomorphic-fetch@^2.2.1:
+ version "2.2.1"
+ resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
+ integrity sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=
+ dependencies:
+ node-fetch "^1.0.1"
+ whatwg-fetch ">=0.10.0"
+
+isstream@~0.1.2:
+ version "0.1.2"
+ resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
+ integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=
+
+js-tokens@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
+ integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+
+js-yaml@^3.13.1:
+ version "3.13.1"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
+ integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^4.0.0"
+
+jsbn@~0.1.0:
+ version "0.1.1"
+ resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
+ integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM=
+
+json-schema-traverse@^0.4.1:
+ version "0.4.1"
+ resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
+ integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
+
+json-schema@0.2.3:
+ version "0.2.3"
+ resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
+ integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
+
+json-stable-stringify-without-jsonify@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
+ integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
+
+json-stringify-safe@~5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
+ integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
+
+jsonp@0.0.4:
+ version "0.0.4"
+ resolved "https://registry.yarnpkg.com/jsonp/-/jsonp-0.0.4.tgz#94665a4b771aabecb8aac84135b99594756918bd"
+ integrity sha1-lGZaS3caq+y4qshBNbmVlHVpGL0=
+ dependencies:
+ debug "*"
+
+jsprim@^1.2.2:
+ version "1.4.1"
+ resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2"
+ integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=
+ dependencies:
+ assert-plus "1.0.0"
+ extsprintf "1.3.0"
+ json-schema "0.2.3"
+ verror "1.10.0"
+
+levn@^0.3.0, levn@~0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
+ integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=
+ dependencies:
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+
+lodash.zipobject@^4.1.3:
+ version "4.1.3"
+ resolved "https://registry.yarnpkg.com/lodash.zipobject/-/lodash.zipobject-4.1.3.tgz#b399f5aba8ff62a746f6979bf20b214f964dbef8"
+ integrity sha1-s5n1q6j/YqdG9peb8gshT5ZNvvg=
+
+lodash@4, lodash@^4.17.14, lodash@^4.17.15:
+ version "4.17.15"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
+ integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
+
+lowdb@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/lowdb/-/lowdb-1.0.0.tgz#5243be6b22786ccce30e50c9a33eac36b20c8064"
+ integrity sha512-2+x8esE/Wb9SQ1F9IHaYWfsC9FIecLOPrK4g17FGEayjUWH172H6nwicRovGvSE2CPZouc2MCIqCI7h9d+GftQ==
+ dependencies:
+ graceful-fs "^4.1.3"
+ is-promise "^2.1.0"
+ lodash "4"
+ pify "^3.0.0"
+ steno "^0.4.1"
+
+media-typer@0.3.0:
+ version "0.3.0"
+ resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
+ integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
+
+merge-descriptors@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
+ integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
+
+methods@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
+ integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
+
+mime-db@1.43.0:
+ version "1.43.0"
+ resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.43.0.tgz#0a12e0502650e473d735535050e7c8f4eb4fae58"
+ integrity sha512-+5dsGEEovYbT8UY9yD7eE4XTc4UwJ1jBYlgaQQF38ENsKR3wj/8q8RFZrF9WIZpB2V1ArTVFUva8sAul1NzRzQ==
+
+mime-types@^2.1.12, mime-types@~2.1.19, mime-types@~2.1.24:
+ version "2.1.26"
+ resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.26.tgz#9c921fc09b7e149a65dfdc0da4d20997200b0a06"
+ integrity sha512-01paPWYgLrkqAyrlDorC1uDwl2p3qZT7yl806vW7DvDoxwXi46jsjFbg+WdwotBIk6/MbEhO/dh5aZ5sNj/dWQ==
+ dependencies:
+ mime-db "1.43.0"
+
+mime@1.6.0, mime@^1.3.4:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
+ integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==
+
+mimic-fn@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
+ integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
+
+minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
+ dependencies:
+ brace-expansion "^1.1.7"
+
+minimist@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
+ integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
+
+minimist@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
+ integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
+
+mkdirp@^0.5.1:
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
+ integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=
+ dependencies:
+ minimist "0.0.8"
+
+module-alias@^2.2.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/module-alias/-/module-alias-2.2.2.tgz#151cdcecc24e25739ff0aa6e51e1c5716974c0e0"
+ integrity sha512-A/78XjoX2EmNvppVWEhM2oGk3x4lLxnkEA4jTbaK97QKSDjkIoOsKQlfylt/d3kKKi596Qy3NP5XrXJ6fZIC9Q==
+
+ms@2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+ integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
+
+ms@2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
+ integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==
+
+ms@^2.1.1:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
+ integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
+
+mute-stream@0.0.8:
+ version "0.0.8"
+ resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d"
+ integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==
+
+natural-compare@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
+ integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
+
+negotiator@0.6.2:
+ version "0.6.2"
+ resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
+ integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
+
+nice-try@^1.0.4:
+ version "1.0.5"
+ resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366"
+ integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==
+
+node-cron@^2.0.3:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/node-cron/-/node-cron-2.0.3.tgz#b9649784d0d6c00758410eef22fa54a10e3f602d"
+ integrity sha512-eJI+QitXlwcgiZwNNSRbqsjeZMp5shyajMR81RZCqeW0ZDEj4zU9tpd4nTh/1JsBiKbF8d08FCewiipDmVIYjg==
+ dependencies:
+ opencollective-postinstall "^2.0.0"
+ tz-offset "0.0.1"
+
+node-fetch@^1.0.1:
+ version "1.7.3"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
+ integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==
+ dependencies:
+ encoding "^0.1.11"
+ is-stream "^1.0.1"
+
+node-fetch@^2.2.0:
+ version "2.6.0"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.0.tgz#e633456386d4aa55863f676a7ab0daa8fdecb0fd"
+ integrity sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==
+
+node-telegram-bot-api@^0.29.0:
+ version "0.29.0"
+ resolved "https://registry.yarnpkg.com/node-telegram-bot-api/-/node-telegram-bot-api-0.29.0.tgz#4f184915b5d153410e3dea0faab6199318f34bbc"
+ integrity sha512-WZBp5ccr0zMLRNtZ3avrevGpj05mrN59lDmxgpltls0bl3W/wqyNalNGKatTZEJ1cY0pctgd9FqKyCzWr36HcQ==
+ dependencies:
+ array.prototype.findindex "^2.0.0"
+ bl "^1.1.2"
+ bluebird "^3.3.4"
+ debug "^2.2.0"
+ depd "^1.1.0"
+ eventemitter3 "^2.0.2"
+ file-type "^3.9.0"
+ mime "^1.3.4"
+ pump "^1.0.1"
+ request "^2.69.0"
+ request-promise "^4.1.1"
+
+oauth-sign@~0.9.0:
+ version "0.9.0"
+ resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
+ integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==
+
+object-inspect@^1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67"
+ integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==
+
+object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
+ integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
+
+object.assign@^4.1.0:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da"
+ integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==
+ dependencies:
+ define-properties "^1.1.2"
+ function-bind "^1.1.1"
+ has-symbols "^1.0.0"
+ object-keys "^1.0.11"
+
+on-finished@~2.3.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
+ integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=
+ dependencies:
+ ee-first "1.1.1"
+
+once@^1.3.0, once@^1.3.1, once@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
+ integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
+ dependencies:
+ wrappy "1"
+
+onetime@^5.1.0:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.0.tgz#fff0f3c91617fe62bb50189636e99ac8a6df7be5"
+ integrity sha512-5NcSkPHhwTVFIQN+TUqXoS5+dlElHXdpAWu9I0HP20YOtIi+aZ0Ct82jdlILDxjLEAWwvm+qj1m6aEtsDVmm6Q==
+ dependencies:
+ mimic-fn "^2.1.0"
+
+opencollective-postinstall@^2.0.0:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.2.tgz#5657f1bede69b6e33a45939b061eb53d3c6c3a89"
+ integrity sha512-pVOEP16TrAO2/fjej1IdOyupJY8KDUM1CvsaScRbw6oddvpQoOfGk4ywha0HKKVAD6RkW4x6Q+tNBwhf3Bgpuw==
+
+optionator@^0.8.3:
+ version "0.8.3"
+ resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495"
+ integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==
+ dependencies:
+ deep-is "~0.1.3"
+ fast-levenshtein "~2.0.6"
+ levn "~0.3.0"
+ prelude-ls "~1.1.2"
+ type-check "~0.3.2"
+ word-wrap "~1.2.3"
+
+os-tmpdir@~1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
+ integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=
+
+parent-module@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2"
+ integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==
+ dependencies:
+ callsites "^3.0.0"
+
+parseurl@~1.3.3:
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
+ integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
+
+path-is-absolute@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+ integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
+
+path-key@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40"
+ integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=
+
+path-to-regexp@0.1.7:
+ version "0.1.7"
+ resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
+ integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
+
+performance-now@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
+ integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=
+
+phin@^2.2.6:
+ version "2.9.3"
+ resolved "https://registry.yarnpkg.com/phin/-/phin-2.9.3.tgz#f9b6ac10a035636fb65dfc576aaaa17b8743125c"
+ integrity sha512-CzFr90qM24ju5f88quFC/6qohjC144rehe5n6DH900lgXmUe86+xCKc10ev56gRKC4/BkHUoG4uSiQgBiIXwDA==
+
+pify@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
+ integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
+
+prelude-ls@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
+ integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=
+
+process-nextick-args@~2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
+ integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
+
+progress@^2.0.0:
+ version "2.0.3"
+ resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
+ integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
+
+proxy-addr@~2.0.5:
+ version "2.0.6"
+ resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf"
+ integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw==
+ dependencies:
+ forwarded "~0.1.2"
+ ipaddr.js "1.9.1"
+
+psl@^1.1.28:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/psl/-/psl-1.7.0.tgz#f1c4c47a8ef97167dea5d6bbf4816d736e884a3c"
+ integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ==
+
+pump@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954"
+ integrity sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==
+ dependencies:
+ end-of-stream "^1.1.0"
+ once "^1.3.1"
+
+punycode@^2.1.0, punycode@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
+ integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
+
+qs@6.7.0:
+ version "6.7.0"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
+ integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
+
+qs@~6.5.2:
+ version "6.5.2"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
+ integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
+
+range-parser@~1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
+ integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
+
+raw-body@2.4.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332"
+ integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==
+ dependencies:
+ bytes "3.1.0"
+ http-errors "1.7.2"
+ iconv-lite "0.4.24"
+ unpipe "1.0.0"
+
+readable-stream@^2.3.5:
+ version "2.3.7"
+ resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
+ integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
+ dependencies:
+ core-util-is "~1.0.0"
+ inherits "~2.0.3"
+ isarray "~1.0.0"
+ process-nextick-args "~2.0.0"
+ safe-buffer "~5.1.1"
+ string_decoder "~1.1.1"
+ util-deprecate "~1.0.1"
+
+reconnecting-websocket@^4.2.0:
+ version "4.4.0"
+ resolved "https://registry.yarnpkg.com/reconnecting-websocket/-/reconnecting-websocket-4.4.0.tgz#3b0e5b96ef119e78a03135865b8bb0af1b948783"
+ integrity sha512-D2E33ceRPga0NvTDhJmphEgJ7FUYF0v4lr1ki0csq06OdlxKfugGzN0dSkxM/NfqCxYELK4KcaTOUOjTV6Dcng==
+
+regexpp@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
+ integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==
+
+request-promise-core@1.1.3:
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/request-promise-core/-/request-promise-core-1.1.3.tgz#e9a3c081b51380dfea677336061fea879a829ee9"
+ integrity sha512-QIs2+ArIGQVp5ZYbWD5ZLCY29D5CfWizP8eWnm8FoGD1TX61veauETVQbrV60662V0oFBkrDOuaBI8XgtuyYAQ==
+ dependencies:
+ lodash "^4.17.15"
+
+request-promise@^4.1.1:
+ version "4.2.5"
+ resolved "https://registry.yarnpkg.com/request-promise/-/request-promise-4.2.5.tgz#186222c59ae512f3497dfe4d75a9c8461bd0053c"
+ integrity sha512-ZgnepCykFdmpq86fKGwqntyTiUrHycALuGggpyCZwMvGaZWgxW6yagT0FHkgo5LzYvOaCNvxYwWYIjevSH1EDg==
+ dependencies:
+ bluebird "^3.5.0"
+ request-promise-core "1.1.3"
+ stealthy-require "^1.1.1"
+ tough-cookie "^2.3.3"
+
+request@^2.69.0:
+ version "2.88.2"
+ resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3"
+ integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==
+ dependencies:
+ aws-sign2 "~0.7.0"
+ aws4 "^1.8.0"
+ caseless "~0.12.0"
+ combined-stream "~1.0.6"
+ extend "~3.0.2"
+ forever-agent "~0.6.1"
+ form-data "~2.3.2"
+ har-validator "~5.1.3"
+ http-signature "~1.2.0"
+ is-typedarray "~1.0.0"
+ isstream "~0.1.2"
+ json-stringify-safe "~5.0.1"
+ mime-types "~2.1.19"
+ oauth-sign "~0.9.0"
+ performance-now "^2.1.0"
+ qs "~6.5.2"
+ safe-buffer "^5.1.2"
+ tough-cookie "~2.5.0"
+ tunnel-agent "^0.6.0"
+ uuid "^3.3.2"
+
+resolve-from@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"
+ integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==
+
+restore-cursor@^3.1.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e"
+ integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==
+ dependencies:
+ onetime "^5.1.0"
+ signal-exit "^3.0.2"
+
+rimraf@2.6.3:
+ version "2.6.3"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
+ integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==
+ dependencies:
+ glob "^7.1.3"
+
+run-async@^2.4.0:
+ version "2.4.0"
+ resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.0.tgz#e59054a5b86876cfae07f431d18cbaddc594f1e8"
+ integrity sha512-xJTbh/d7Lm7SBhc1tNvTpeCHaEzoyxPrqNlvSdMfBTYwaY++UJFyXUOxAtsRUXjlqOfj8luNaR9vjCh4KeV+pg==
+ dependencies:
+ is-promise "^2.1.0"
+
+rxjs@^6.5.3:
+ version "6.5.4"
+ resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.4.tgz#e0777fe0d184cec7872df147f303572d414e211c"
+ integrity sha512-naMQXcgEo3csAEGvw/NydRA0fuS2nDZJiw1YUWFKU7aPPAPGZEsD4Iimit96qwCieH6y614MCLYwdkrWx7z/7Q==
+ dependencies:
+ tslib "^1.9.0"
+
+safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
+ version "5.1.2"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+ integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
+
+safe-buffer@^5.0.1, safe-buffer@^5.1.1, safe-buffer@^5.1.2:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.0.tgz#b74daec49b1148f88c64b68d49b1e815c1f2f519"
+ integrity sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==
+
+"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
+ integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
+
+sandwich-stream@^2.0.1:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/sandwich-stream/-/sandwich-stream-2.0.2.tgz#6d1feb6cf7e9fe9fadb41513459a72c2e84000fa"
+ integrity sha512-jLYV0DORrzY3xaz/S9ydJL6Iz7essZeAfnAavsJ+zsJGZ1MOnsS52yRjU3uF3pJa/lla7+wisp//fxOwOH8SKQ==
+
+semver@^5.5.0:
+ version "5.7.1"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7"
+ integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==
+
+semver@^6.1.2:
+ version "6.3.0"
+ resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
+ integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
+
+send@0.17.1:
+ version "0.17.1"
+ resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
+ integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==
+ dependencies:
+ debug "2.6.9"
+ depd "~1.1.2"
+ destroy "~1.0.4"
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ etag "~1.8.1"
+ fresh "0.5.2"
+ http-errors "~1.7.2"
+ mime "1.6.0"
+ ms "2.1.1"
+ on-finished "~2.3.0"
+ range-parser "~1.2.1"
+ statuses "~1.5.0"
+
+serve-static@1.14.1:
+ version "1.14.1"
+ resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9"
+ integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==
+ dependencies:
+ encodeurl "~1.0.2"
+ escape-html "~1.0.3"
+ parseurl "~1.3.3"
+ send "0.17.1"
+
+setprototypeof@1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
+ integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==
+
+shebang-command@^1.2.0:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
+ integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=
+ dependencies:
+ shebang-regex "^1.0.0"
+
+shebang-regex@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
+ integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=
+
+signal-exit@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+ integrity sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=
+
+slice-ansi@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636"
+ integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==
+ dependencies:
+ ansi-styles "^3.2.0"
+ astral-regex "^1.0.0"
+ is-fullwidth-code-point "^2.0.0"
+
+sprintf-js@~1.0.2:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
+ integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=
+
+sshpk@^1.7.0:
+ version "1.16.1"
+ resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877"
+ integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==
+ dependencies:
+ asn1 "~0.2.3"
+ assert-plus "^1.0.0"
+ bcrypt-pbkdf "^1.0.0"
+ dashdash "^1.12.0"
+ ecc-jsbn "~0.1.1"
+ getpass "^0.1.1"
+ jsbn "~0.1.0"
+ safer-buffer "^2.0.2"
+ tweetnacl "~0.14.0"
+
+"statuses@>= 1.5.0 < 2", statuses@~1.5.0:
+ version "1.5.0"
+ resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
+ integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
+
+stealthy-require@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b"
+ integrity sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=
+
+steno@^0.4.1:
+ version "0.4.4"
+ resolved "https://registry.yarnpkg.com/steno/-/steno-0.4.4.tgz#071105bdfc286e6615c0403c27e9d7b5dcb855cb"
+ integrity sha1-BxEFvfwobmYVwEA8J+nXtdy4Vcs=
+ dependencies:
+ graceful-fs "^4.1.3"
+
+string-width@^3.0.0:
+ version "3.1.0"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
+ integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==
+ dependencies:
+ emoji-regex "^7.0.1"
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^5.1.0"
+
+string-width@^4.1.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.0.tgz#952182c46cc7b2c313d1596e623992bd163b72b5"
+ integrity sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==
+ dependencies:
+ emoji-regex "^8.0.0"
+ is-fullwidth-code-point "^3.0.0"
+ strip-ansi "^6.0.0"
+
+string.prototype.trimleft@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.1.tgz#9bdb8ac6abd6d602b17a4ed321870d2f8dcefc74"
+ integrity sha512-iu2AGd3PuP5Rp7x2kEZCrB2Nf41ehzh+goo8TV7z8/XDBbsvc6HQIlUl9RjkZ4oyrW1XM5UwlGl1oVEaDjg6Ag==
+ dependencies:
+ define-properties "^1.1.3"
+ function-bind "^1.1.1"
+
+string.prototype.trimright@^2.1.1:
+ version "2.1.1"
+ resolved "https://registry.yarnpkg.com/string.prototype.trimright/-/string.prototype.trimright-2.1.1.tgz#440314b15996c866ce8a0341894d45186200c5d9"
+ integrity sha512-qFvWL3/+QIgZXVmJBfpHmxLB7xsUXz6HsUmP8+5dRaC3Q7oKUv9Vo6aMCRZC1smrtyECFsIT30PqBJ1gTjAs+g==
+ dependencies:
+ define-properties "^1.1.3"
+ function-bind "^1.1.1"
+
+string_decoder@~1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
+ integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
+ dependencies:
+ safe-buffer "~5.1.0"
+
+strip-ansi@^5.1.0, strip-ansi@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae"
+ integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==
+ dependencies:
+ ansi-regex "^4.1.0"
+
+strip-ansi@^6.0.0:
+ version "6.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532"
+ integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==
+ dependencies:
+ ansi-regex "^5.0.0"
+
+strip-json-comments@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7"
+ integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==
+
+supports-color@^5.3.0:
+ version "5.5.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
+ integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
+ dependencies:
+ has-flag "^3.0.0"
+
+supports-color@^7.1.0:
+ version "7.1.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.1.0.tgz#68e32591df73e25ad1c4b49108a2ec507962bfd1"
+ integrity sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==
+ dependencies:
+ has-flag "^4.0.0"
+
+table@^5.2.3:
+ version "5.4.6"
+ resolved "https://registry.yarnpkg.com/table/-/table-5.4.6.tgz#1292d19500ce3f86053b05f0e8e7e4a3bb21079e"
+ integrity sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==
+ dependencies:
+ ajv "^6.10.2"
+ lodash "^4.17.14"
+ slice-ansi "^2.1.0"
+ string-width "^3.0.0"
+
+telegraf@^3.36.0:
+ version "3.36.0"
+ resolved "https://registry.yarnpkg.com/telegraf/-/telegraf-3.36.0.tgz#eab1160159df6033d3cb92ac990902523277822a"
+ integrity sha512-9o6AJKRiTm5vMWYI6WpTfBHzu4FMpWBNKxvnMxRds/cbMY9RnsVVjdi8i4bFFlfd+xbi73EbrnI3dybayryICA==
+ dependencies:
+ "@types/node" "^13.1.0"
+ debug "^4.0.1"
+ minimist "^1.2.0"
+ module-alias "^2.2.2"
+ node-fetch "^2.2.0"
+ sandwich-stream "^2.0.1"
+ telegram-typings "^3.6.0"
+
+telegram-typings@^3.6.0:
+ version "3.6.1"
+ resolved "https://registry.yarnpkg.com/telegram-typings/-/telegram-typings-3.6.1.tgz#1288d547f8694b61f1c01c2993e295f3114d9e25"
+ integrity sha512-njVv1EAhIZnmQVLocZEADYUyqA1WIXuVcDYlsp+mXua/XB0pxx+PKtMSPeZ/EE4wPWTw9h/hA9ASTT6yQelkiw==
+
+text-table@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
+ integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=
+
+through@^2.3.6:
+ version "2.3.8"
+ resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
+ integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=
+
+tmp@^0.0.33:
+ version "0.0.33"
+ resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
+ integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==
+ dependencies:
+ os-tmpdir "~1.0.2"
+
+toidentifier@1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
+ integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
+
+tough-cookie@^2.3.3, tough-cookie@~2.5.0:
+ version "2.5.0"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2"
+ integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==
+ dependencies:
+ psl "^1.1.28"
+ punycode "^2.1.1"
+
+tslib@^1.9.0:
+ version "1.11.1"
+ resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.11.1.tgz#eb15d128827fbee2841549e171f45ed338ac7e35"
+ integrity sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==
+
+tunnel-agent@^0.6.0:
+ version "0.6.0"
+ resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd"
+ integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=
+ dependencies:
+ safe-buffer "^5.0.1"
+
+tweetnacl@^0.14.3, tweetnacl@~0.14.0:
+ version "0.14.5"
+ resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
+ integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=
+
+type-check@~0.3.2:
+ version "0.3.2"
+ resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72"
+ integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=
+ dependencies:
+ prelude-ls "~1.1.2"
+
+type-fest@^0.8.1:
+ version "0.8.1"
+ resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
+ integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==
+
+type-is@~1.6.17, type-is@~1.6.18:
+ version "1.6.18"
+ resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
+ integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
+ dependencies:
+ media-typer "0.3.0"
+ mime-types "~2.1.24"
+
+tz-offset@0.0.1:
+ version "0.0.1"
+ resolved "https://registry.yarnpkg.com/tz-offset/-/tz-offset-0.0.1.tgz#fef920257024d3583ed9072a767721a18bdb8a76"
+ integrity sha512-kMBmblijHJXyOpKzgDhKx9INYU4u4E1RPMB0HqmKSgWG8vEcf3exEfLh4FFfzd3xdQOw9EuIy/cP0akY6rHopQ==
+
+unpipe@1.0.0, unpipe@~1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
+ integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
+
+uri-js@^4.2.2:
+ version "4.2.2"
+ resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
+ integrity sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==
+ dependencies:
+ punycode "^2.1.0"
+
+util-deprecate@~1.0.1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
+ integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
+
+utils-merge@1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
+ integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
+
+uuid@^3.3.2:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
+ integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
+
+v8-compile-cache@^2.0.3:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz#e14de37b31a6d194f5690d67efc4e7f6fc6ab30e"
+ integrity sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==
+
+vary@~1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
+ integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
+
+verror@1.10.0:
+ version "1.10.0"
+ resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
+ integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=
+ dependencies:
+ assert-plus "^1.0.0"
+ core-util-is "1.0.2"
+ extsprintf "^1.2.0"
+
+whatwg-fetch@>=0.10.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz#fc804e458cc460009b1a2b966bc8817d2578aefb"
+ integrity sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==
+
+which@^1.2.9:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
+ integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==
+ dependencies:
+ isexe "^2.0.0"
+
+word-wrap@~1.2.3:
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
+ integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==
+
+wrappy@1:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+ integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
+
+write@1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3"
+ integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==
+ dependencies:
+ mkdirp "^0.5.1"
+
+ws@^7.2.0:
+ version "7.2.1"
+ resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.1.tgz#03ed52423cd744084b2cf42ed197c8b65a936b8e"
+ integrity sha512-sucePNSafamSKoOqoNfBd8V0StlkzJKL2ZAhGQinCfNQ+oacw+Pk7lcdAElecBF2VkLNZRiIb5Oi1Q5lVUVt2A==
From 64ebebb295eda1355f39c8b38e8b7b9329abd875 Mon Sep 17 00:00:00 2001
From: Gustavo
Date: Sun, 1 Mar 2020 13:55:39 -0300
Subject: [PATCH 5/6] separate bot memory
---
src/botMemory.js | 42 ++++
src/index.js | 593 ++++++++++++++++++++++-------------------------
2 files changed, 315 insertions(+), 320 deletions(-)
create mode 100644 src/botMemory.js
diff --git a/src/botMemory.js b/src/botMemory.js
new file mode 100644
index 0000000..79680ac
--- /dev/null
+++ b/src/botMemory.js
@@ -0,0 +1,42 @@
+export default {
+ notifyBuyMax: false,
+ notifySellMin: false,
+ otherStables: 0,
+ hasFundsBuy: true,
+ hasFundsSell: true,
+ countExpireBuy: 0,
+ countExpireSell: 0,
+ dateOrderBuy: 0,
+ dateOrderBuyExpire: 0,
+ dateOrderSell: 0,
+ dateOrderSellExpire: 0,
+ buyPriceTemp: 0,
+ sellPriceTemp: 0,
+ changePriceTemp: 0,
+ startTime: Date.now(),
+ avgPrice: 0,
+ OrderBuyID: 0,
+ filledBuyOrder: true,
+ filledSellOrder: true,
+ OrderSellID: 0,
+ SpreadTemp: 0,
+ totalBuys: 0,
+ totalSells: 0,
+ marketBalanceLocked: 0,
+ marketBalanceFree: 0,
+ currencyBalanceLocked: 0,
+ currencyBalanceFree: 0,
+ total: 0,
+ settedAmount: false,
+ balance_BNB: 0,
+ balance_TUSD: 0,
+ balance_USDT: 0,
+ balance_USDC: 0,
+ balance_PAX: 0,
+ balance_USDS: 0,
+ balance_USDSB: 0,
+ total_stable: 0,
+ sellAmount: 0,
+ buyAmount: 0,
+ telegram: false
+};
diff --git a/src/index.js b/src/index.js
index 3b08336..f42f786 100644
--- a/src/index.js
+++ b/src/index.js
@@ -3,53 +3,12 @@ import cron from "node-cron";
import express from "express";
import Binance from "binance-api-node";
import Telegraf from "telegraf";
+import botMemory from "./botMemory.js";
const app = express();
let tgBot = null;
-const botMemory = {
- notifyBuyMax: 0,
- notifySellMin: 0,
- otherStables: 0,
- hasFundsBuy: true,
- hasFundsSell: true,
- countExpireBuy: 0,
- countExpireSell: 0,
- dateOrderBuy: 0,
- dateOrderBuyExpire: 0,
- dateOrderSell: 0,
- dateOrderSellExpire: 0,
- buyPriceTemp: 0,
- sellPriceTemp: 0,
- changePriceTemp: 0,
- startTime: Date.now(),
- avgPrice: 0,
- OrderBuyID: 0,
- filledBuyOrder: true,
- filledSellOrder: true,
- OrderSellID: 0,
- SpreadTemp: 0,
- totalBuys: 0,
- totalSells: 0,
- marketBalanceLocked: 0,
- marketBalanceFree: 0,
- currencyBalanceLocked: 0,
- currencyBalanceFree: 0,
- total: 0,
- setAmount: 0,
- setBuyOrder: 0,
- balance_BNB: 0,
- balance_TUSD: 0,
- balance_USDT: 0,
- balance_USDC: 0,
- balance_PAX: 0,
- balance_USDS: 0,
- balance_USDSB: 0,
- total_stable: 0,
- telegram: false
-};
-
const client = Binance({
apiKey: config.API_KEY,
apiSecret: config.SECRET_KEY
@@ -97,7 +56,7 @@ client
});
const task = cron.schedule(
- "*/" + config.LOOP_TIME + " * * * * *",
+ `*/${config.LOOP_TIME} * * * * *`,
() => {
client
.dailyStats({ symbol: config.CURRENCY + config.MARKET })
@@ -211,7 +170,7 @@ const task = cron.schedule(
100
).toFixed(2);
} else {
- if (botMemory.setAmount == 0) {
+ if (!botMemory.settedAmount) {
botMemory.buyAmount = (
((botMemory.marketBalanceLocked +
botMemory.marketBalanceFree) *
@@ -224,7 +183,7 @@ const task = cron.schedule(
config.BUY_VALUE) /
100
).toFixed(2);
- botMemory.setAmount = 1;
+ botMemory.settedAmount = true;
}
}
}
@@ -236,9 +195,8 @@ const task = cron.schedule(
}
console.clear();
- let mess = "===========================================";
-
- mess += `
+ console.log(`
+ ===========================================
SALDO ${config.MARKET}...: ${botMemory.marketBalanceLocked +
botMemory.marketBalanceFree}\n
SALDO ${config.CURRENCY}...: ${botMemory.currencyBalanceLocked +
@@ -262,21 +220,14 @@ const task = cron.schedule(
100) /
config.INITIAL_INVESTMENT
).toFixed(2)} %\n
- ===========================================`;
- console.log(mess);
- console.log(
- "UPTIME.......:",
- ((Math.floor(+new Date() / 1000) - botMemory.startTime) / 3600).toFixed(2),
- "horas"
- );
- console.log(
- "ORDENS.......:",
- "VENDAS: [",
- botMemory.totalSells,
- "] COMPRAS: [",
- botMemory.totalBuys,
- "]"
- );
+ ===========================================
+ UPTIME.......: ${(
+ (Math.floor(+new Date() / 1000) - botMemory.startTime) /
+ 3600
+ ).toFixed(2)} horas
+ ORDENS.......: VENDAS: [${botMemory.totalSells}] COMPRAS: [${
+ botMemory.totalBuys
+ }]`);
simpleStrategy();
})
@@ -351,9 +302,9 @@ function simpleStrategy() {
orderId: botMemory.OrderSellID
})
.then(result => {
- dateOrderSell = result.time;
+ botMemory.dateOrderSell = result.time;
if (result.status == "FILLED") {
- filledSellOrder = true;
+ botMemory.filledSellOrder = true;
if (botMemory.telegram) {
tgBot.telegram.sendMessage(
config.BOT_CHAT,
@@ -366,15 +317,16 @@ function simpleStrategy() {
" " +
config.CURRENCY +
" " +
- (botMemory.currencyBalanceLocked + currencyBalanceFree).toFixed(
- 4
- ) +
+ (
+ botMemory.currencyBalanceLocked +
+ botMemory.currencyBalanceFree
+ ).toFixed(4) +
" Lucro atual: " +
- (total - config.INITIAL_INVESTMENT).toFixed(4) +
+ (botMemory.total - config.INITIAL_INVESTMENT).toFixed(4) +
" USD" +
" \u{1F4B0} " +
(
- ((total - config.INITIAL_INVESTMENT) * 100) /
+ ((botMemory.total - config.INITIAL_INVESTMENT) * 100) /
config.INITIAL_INVESTMENT
).toFixed(2) +
"%"
@@ -383,7 +335,7 @@ function simpleStrategy() {
client
.cancelOrder({
symbol: config.CURRENCY + config.MARKET,
- orderId: OrderBuyID
+ orderId: botMemory.OrderBuyID
})
.catch(err => {
console.error(err);
@@ -391,12 +343,12 @@ function simpleStrategy() {
}
if (result.status == "CANCELED") {
- filledSellOrder = true;
+ botMemory.filledSellOrder = true;
if (botMemory.telegram) {
tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{1f6a8} Ordem de venda " +
- OrderSellID +
+ botMemory.OrderSellID +
" cancelada na exchange, gerando uma nova ordem."
);
}
@@ -408,20 +360,22 @@ function simpleStrategy() {
}
if (config.ORDER_EXPIRE != 0) {
- date = new Date(dateOrderBuy);
- dateOrderBuyExpire = date.setHours(date.getHours() + config.ORDER_EXPIRE);
+ botMemory.date = new Date(botMemory.dateOrderBuy);
+ botMemory.dateOrderBuyExpire = botMemory.date.setHours(
+ botMemory.date.getHours() + config.ORDER_EXPIRE
+ );
if (
- dateOrderBuyExpire > 1546300800 &&
- Date.now() > dateOrderBuyExpire &&
- OrderBuyID != 0 &&
- buyPriceTemp != 0 &&
- countExpireBuy > 2
+ botMemory.dateOrderBuyExpire > 1546300800 &&
+ Date.now() > botMemory.dateOrderBuyExpire &&
+ botMemory.OrderBuyID != 0 &&
+ botMemory.buyPriceTemp != 0 &&
+ botMemory.countExpireBuy > 2
) {
if (botMemory.telegram) {
tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{231b} A ordem de compra expirou em " +
- new Date(dateOrderSellExpire) +
+ new Date(botMemory.dateOrderSellExpire) +
" sem execução do mercado. Timeout em " +
config.ORDER_EXPIRE +
" horas. Será gerada uma nova ordem de compra para operação."
@@ -430,30 +384,32 @@ function simpleStrategy() {
client
.cancelOrder({
symbol: config.CURRENCY + config.MARKET,
- orderId: OrderBuyID
+ orderId: botMemory.OrderBuyID
})
.catch(err => {
console.error(err);
});
- countExpireBuy = 0;
+ botMemory.countExpireBuy = 0;
} else {
- countExpireBuy++;
+ botMemory.countExpireBuy++;
}
- date = new Date(dateOrderSell);
- dateOrderSellExpire = date.setHours(date.getHours() + config.ORDER_EXPIRE);
+ botMemory.date = new Date(botMemory.dateOrderSell);
+ botMemory.dateOrderSellExpire = botMemory.date.setHours(
+ botMemory.date.getHours() + config.ORDER_EXPIRE
+ );
if (
- dateOrderSellExpire > 1546300800 &&
- Date.now() > dateOrderSellExpire &&
- OrderSellID != 0 &&
- sellPriceTemp != 0 &&
- countExpireSell > 2
+ botMemory.dateOrderSellExpire > 1546300800 &&
+ Date.now() > botMemory.dateOrderSellExpire &&
+ botMemory.OrderSellID != 0 &&
+ botMemory.sellPriceTemp != 0 &&
+ botMemory.countExpireSell > 2
) {
if (botMemory.telegram) {
tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{231b} A ordem de venda expirou em " +
- new Date(dateOrderSellExpire) +
+ new Date(botMemory.dateOrderSellExpire) +
" sem execução do mercado. Timeout em " +
config.ORDER_EXPIRE +
" horas. Será gerada uma nova ordem de venda para operação."
@@ -462,54 +418,69 @@ function simpleStrategy() {
client
.cancelOrder({
symbol: config.CURRENCY + config.MARKET,
- orderId: OrderSellID
+ orderId: botMemory.OrderSellID
})
.catch(err => {
console.error(err);
});
- countExpireSell = 0;
+ botMemory.countExpireSell = 0;
} else {
- countExpireSell++;
+ botMemory.countExpireSell++;
}
}
if (
config.AUTO_SPREAD &&
- SpreadTemp != 0 &&
- SpreadTemp != spreadOpera &&
- spreadOpera >= config.SPREAD_MIN
+ botMemory.SpreadTemp != 0 &&
+ botMemory.SpreadTemp != botMemory.spreadOpera &&
+ botMemory.spreadOpera >= config.SPREAD_MIN
) {
if (botMemory.telegram) {
tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{1f6a7} Ajuste no spread de mercado de " +
- SpreadTemp +
+ botMemory.SpreadTemp +
" para " +
- spreadOpera +
+ botMemory.spreadOpera +
" para variação de " +
- changePrice +
+ botMemory.changePrice +
" %. As próximas ordens vão utilizar esta margem."
);
}
}
- SpreadTemp = spreadOpera;
- changePriceTemp = changePrice;
+ botMemory.SpreadTemp = botMemory.spreadOpera;
+ botMemory.changePriceTemp = botMemory.changePrice;
if (config.AUTO_SPREAD) {
if (
- (OrderSellID == 0 && OrderBuyID == 0) ||
- spreadOpera <= config.SPREAD_MIN
+ (botMemory.OrderSellID == 0 && botMemory.OrderBuyID == 0) ||
+ botMemory.spreadOpera <= config.SPREAD_MIN
) {
- spreadOpera = config.SPREAD_MIN;
- buyPrice = (avgPrice * (1 - spreadOpera)).toFixed(4);
- sellPrice = (avgPrice * (1 + spreadOpera)).toFixed(4);
+ botMemory.spreadOpera = config.SPREAD_MIN;
+ botMemory.buyPrice = (
+ botMemory.avgPrice *
+ (1 - botMemory.spreadOpera)
+ ).toFixed(4);
+ botMemory.sellPrice = (
+ botMemory.avgPrice *
+ (1 + botMemory.spreadOpera)
+ ).toFixed(4);
} else {
- buyPrice = (avgPrice - spreadOpera).toFixed(4);
- sellPrice = (avgPrice + spreadOpera).toFixed(4);
+ botMemory.buyPrice = (botMemory.avgPrice - botMemory.spreadOpera).toFixed(
+ 4
+ );
+ botMemory.sellPrice = (
+ botMemory.avgPrice + botMemory.spreadOpera
+ ).toFixed(4);
}
} else {
- buyPrice = (avgPrice * (1 - config.SPREAD_BUY)).toFixed(4);
- sellPrice = (avgPrice * (1 + config.SPREAD_SELL)).toFixed(4);
+ botMemory.buyPrice = (botMemory.avgPrice * (1 - config.SPREAD_BUY)).toFixed(
+ 4
+ );
+ botMemory.sellPrice = (
+ botMemory.avgPrice *
+ (1 + config.SPREAD_SELL)
+ ).toFixed(4);
}
client
@@ -517,47 +488,47 @@ function simpleStrategy() {
symbol: config.CURRENCY + config.MARKET
})
.then(result => {
- if (filledSellOrder) {
+ if (botMemory.filledSellOrder) {
for (let i = result.length - 1; i > 1; i--) {
if (
result[i].isBuyer &&
- filledSellOrder &&
- currencyBalanceFree >= 20
+ botMemory.filledSellOrder &&
+ botMemory.currencyBalanceFree >= 20
) {
if (
- sellPrice - parseFloat(result[i].price).toFixed(4) <
- spreadOpera
+ botMemory.sellPrice - parseFloat(result[i].price).toFixed(4) <
+ botMemory.spreadOpera
) {
let sellPriceTemp = (
parseFloat(result[i].price).toFixed(4) *
- (1 + spreadOpera)
+ (1 + botMemory.spreadOpera)
).toFixed(4);
if (
- sellPriceTemp > avgPrice &&
- sellPriceTemp - avgPrice >= spreadOpera &&
- botMemory.notifySellMin == 0
+ sellPriceTemp > botMemory.avgPrice &&
+ sellPriceTemp - botMemory.avgPrice >= botMemory.spreadOpera &&
+ !botMemory.notifySellMin
) {
- sellPrice = sellPriceTemp;
+ botMemory.sellPrice = sellPriceTemp;
if (botMemory.telegram) {
tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{2716} ALERTA: A ordem de venda está em um valor abaixo da diferença de spread " +
- spreadOpera +
+ botMemory.spreadOpera +
" da última ordem de compra no valor de " +
parseFloat(result[i].price).toFixed(4) +
" comparado ao preço atual de mercado em " +
- avgPrice +
+ botMemory.avgPrice +
". Ela teve seu valor reajustado para: " +
- sellPrice +
+ botMemory.sellPrice +
"."
);
}
} else {
- if (botMemory.telegram && botMemory.notifySellMin == 0) {
+ if (botMemory.telegram && !botMemory.notifySellMin) {
tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de venda está dentro da diferença de spread " +
- spreadOpera +
+ botMemory.spreadOpera +
" da última ordem de compra no valor de " +
parseFloat(result[i].price).toFixed(4) +
""
@@ -565,11 +536,11 @@ function simpleStrategy() {
}
}
} else {
- if (botMemory.telegram && botMemory.notifySellMin == 0) {
+ if (botMemory.telegram && !botMemory.notifySellMin) {
tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de venda está dentro da diferença de spread " +
- spreadOpera +
+ botMemory.spreadOpera +
" da última ordem de compra no valor de " +
parseFloat(result[i].price).toFixed(4) +
""
@@ -581,47 +552,47 @@ function simpleStrategy() {
}
}
- if (filledBuyOrder) {
+ if (botMemory.filledBuyOrder) {
for (let i = result.length - 1; i > 1; i--) {
if (
!result[i].isBuyer &&
- filledBuyOrder &&
+ botMemory.filledBuyOrder &&
botMemory.marketBalanceFree >= 20
) {
if (
- buyPrice - parseFloat(result[i].price).toFixed(4) <
- spreadOpera
+ botMemory.buyPrice - parseFloat(result[i].price).toFixed(4) <
+ botMemory.spreadOpera
) {
let buyPriceTemp = (
parseFloat(result[i].price).toFixed(4) *
- (1 - spreadOpera)
+ (1 - botMemory.spreadOpera)
).toFixed(4);
if (
- buyPriceTemp < avgPrice &&
- avgPrice - buyPriceTemp >= spreadOpera &&
+ buyPriceTemp < botMemory.avgPrice &&
+ botMemory.avgPrice - buyPriceTemp >= botMemory.spreadOpera &&
botMemory.notifyBuyMax == 0
) {
- buyPrice = buyPriceTemp;
+ botMemory.buyPrice = buyPriceTemp;
if (botMemory.telegram) {
tgBot.telegram.sendMessage(
config.BOT_CHAT,
- "\u{2716} ALERTA: A ordem de compra está em um valor abaixo da diferença de spread " +
- spreadOpera +
- " da última ordem de venda no valor de " +
- parseFloat(result[i].price).toFixed(4) +
- " comparado ao preço atual de mercado em " +
- avgPrice +
- ". Ela teve seu valor reajustado para: " +
- buyPrice +
- "."
+ `\u{2716} ALERTA: A ordem de compra está em um valor abaixo da diferença de spread ${
+ botMemory.spreadOpera
+ } da última ordem de venda no valor de ${parseFloat(
+ result[i].price
+ ).toFixed(4)} comparado ao preço atual de mercado em ${
+ botMemory.avgPrice
+ }. Ela teve seu valor reajustado para: ${
+ botMemory.buyPrice
+ }.`
);
}
} else {
- if (botMemory.telegram && botMemory.notifyBuyMax == 0) {
+ if (botMemory.telegram && !botMemory.notifyBuyMax) {
tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de compra está dentro da diferença de spread " +
- spreadOpera +
+ botMemory.spreadOpera +
" da última ordem de venda no valor de " +
parseFloat(result[i].price).toFixed(4) +
""
@@ -629,11 +600,11 @@ function simpleStrategy() {
}
}
} else {
- if (botMemory.telegram && botMemory.notifyBuyMax == 0) {
+ if (botMemory.telegram && !botMemory.notifyBuyMax) {
tgBot.telegram.sendMessage(
config.BOT_CHAT,
"\u{2714} AVISO: A ordem de compra está dentro da diferença de spread " +
- spreadOpera +
+ botMemory.spreadOpera +
" da última ordem de venda no valor de " +
parseFloat(result[i].price).toFixed(4) +
""
@@ -646,14 +617,8 @@ function simpleStrategy() {
}
});
- client
- .dailyStats({ symbol: "BTC" + config.MARKET })
- .then(result => {
- console.log(
- "DEFINIDOS....: Compra " + botMemory.buyPrice + " e Venda " + botMemory.sellPrice
- );
-
- let mess = `
+ console.log(`
+ DEFINIDOS....: Compra ${botMemory.buyPrice} e Venda ${botMemory.sellPrice}
TIMEOUT ORDERM: ${config.ORDER_EXPIRE} horas \n
HORA ATUAL....: ${new Date()}\n
============== DADOS DE COMPRA ============\n
@@ -666,175 +631,163 @@ function simpleStrategy() {
PRECO VENDA...: ${parseFloat(botMemory.sellPriceTemp).toFixed(4)}\n
ID ORDEM SELL.: ${botMemory.OrderSellID}\n
EXPIRA EM.....: ${new Date(botMemory.dateOrderSellExpire)}
- ===========================================`;
- console.log(mess);
+ ===========================================`);
+
+ if (botMemory.filledBuyOrder) {
+ if (
+ (botMemory.marketBalanceFree > 20 ||
+ botMemory.marketBalanceFree >= botMemory.buyAmount) &&
+ botMemory.buyPrice < config.BUY_MAX
+ ) {
+ if (
+ botMemory.marketBalanceFree > 20 &&
+ botMemory.marketBalanceFree <= botMemory.buyAmount
+ ) {
+ botMemory.buyAmount = parseFloat(botMemory.marketBalanceFree).toFixed(
+ 2
+ );
+ }
client
- .openOrders({
- symbol: config.CURRENCY + config.MARKET
+ .order({
+ symbol: config.CURRENCY + config.MARKET,
+ side: "BUY",
+ quantity: botMemory.buyAmount,
+ price: botMemory.buyPrice,
+ useServerTime: true
})
- .then(() => {
- if (botMemory.filledBuyOrder) {
- if (
- (botMemory.marketBalanceFree > 20 ||
- botMemory.marketBalanceFree >= botMemory.buyAmount) &&
- botMemory.buyPrice < config.BUY_MAX
- ) {
- if (
- botMemory.marketBalanceFree > 20 &&
- botMemory.marketBalanceFree <= botMemory.buyAmount
- ) {
- botMemory.buyAmount = parseFloat(botMemory.marketBalanceFree).toFixed(2);
- }
- client
- .order({
- symbol: config.CURRENCY + config.MARKET,
- side: "BUY",
- quantity: botMemory.buyAmount,
- price: botMemory.buyPrice,
- useServerTime: true
- })
- .then(result => {
- botMemory.totalBuys++;
- botMemory.OrderBuyID = result.orderId;
- botMemory.filledBuyOrder = false;
- })
- .catch(err => {
- botMemory.totalBuys--;
- throw err;
- });
- botMemory.notifyBuyMax = 0;
- botMemory.hasFundsBuy = 1;
- botMemory.buyPriceTemp = botMemory.buyPrice;
- if (botMemory.telegram) {
- tgBot.telegram.sendMessage(
- config.BOT_CHAT,
- "\u{1F4C9} Order de compra criada com sucesso: Quantidade comprada: \u{1f4b5} " +
- botMemory.buyAmount +
- ", valor de compra: \u{1f3f7} " +
- botMemory.buyPrice +
- " utilizando spread em " +
- botMemory.spreadOpera +
- "."
- );
- }
- } else {
- if (
- botMemory.telegram &&
- botMemory.notifyBuyMax == 0 &&
- botMemory.marketBalanceFree >= botMemory.buyAmount
- ) {
- tgBot.telegram.sendMessage(
- config.BOT_CHAT,
- "\u{274C} O valor de compra do mercado esta acima do definido em " +
- config.BUY_MAX +
- ". O bot vai aguardar o preço reduzir até o valor definido para evitar prejuízos."
- );
- botMemory.notifyBuyMax = 1;
- }
- if (
- botMemory.telegram &&
- botMemory.hasFundsBuy &&
- botMemory.notifyBuyMax == 0
- ) {
- tgBot.telegram.sendMessage(
- config.BOT_CHAT,
- "\u{1F6AB} O bot está sem saldo para compras em " +
- config.MARKET +
- ". Seu saldo atual é: " +
- botMemory.marketBalanceFree +
- ". O bot vai aguardar até que uma compra seja executada para liberar saldo."
- );
- botMemory.notifyBuyMax = 1;
- }
- botMemory.OrderBuyID = 0;
- botMemory.hasFundsBuy = false;
- }
- }
+ .then(result => {
+ botMemory.totalBuys++;
+ botMemory.OrderBuyID = result.orderId;
+ botMemory.filledBuyOrder = false;
+ })
+ .catch(err => {
+ botMemory.totalBuys--;
+ throw err;
+ });
+ botMemory.notifyBuyMax = false;
+ botMemory.hasFundsBuy = true;
+ botMemory.buyPriceTemp = botMemory.buyPrice;
+ if (botMemory.telegram) {
+ tgBot.telegram.sendMessage(
+ config.BOT_CHAT,
+ "\u{1F4C9} Order de compra criada com sucesso: Quantidade comprada: \u{1f4b5} " +
+ botMemory.buyAmount +
+ ", valor de compra: \u{1f3f7} " +
+ botMemory.buyPrice +
+ " utilizando spread em " +
+ botMemory.spreadOpera +
+ "."
+ );
+ }
+ } else {
+ if (
+ botMemory.telegram &&
+ botMemory.notifyBuyMax == 0 &&
+ botMemory.marketBalanceFree >= botMemory.buyAmount
+ ) {
+ tgBot.telegram.sendMessage(
+ config.BOT_CHAT,
+ "\u{274C} O valor de compra do mercado esta acima do definido em " +
+ config.BUY_MAX +
+ ". O bot vai aguardar o preço reduzir até o valor definido para evitar prejuízos."
+ );
+ botMemory.notifyBuyMax = true;
+ }
+ if (
+ botMemory.telegram &&
+ botMemory.hasFundsBuy &&
+ botMemory.notifyBuyMax == 0
+ ) {
+ tgBot.telegram.sendMessage(
+ config.BOT_CHAT,
+ "\u{1F6AB} O bot está sem saldo para compras em " +
+ config.MARKET +
+ ". Seu saldo atual é: " +
+ botMemory.marketBalanceFree +
+ ". O bot vai aguardar até que uma compra seja executada para liberar saldo."
+ );
+ botMemory.notifyBuyMax = true;
+ }
+ botMemory.OrderBuyID = 0;
+ botMemory.hasFundsBuy = false;
+ }
+ }
- if (botMemory.filledSellOrder) {
- if (
- (botMemory.currencyBalanceFree > 20 || botMemory.currencyBalanceFree >= botMemory.sellAmount) &&
- botMemory.sellPrice > config.SELL_MIN
- ) {
- if (
- botMemory.currencyBalanceFree > 20 &&
- botMemory.currencyBalanceFree <= botMemory.sellAmount
- ) {
- botMemory.sellAmount = parseFloat(botMemory.currencyBalanceFree).toFixed(2);
- }
- client
- .order({
- symbol: config.CURRENCY + config.MARKET,
- side: "SELL",
- quantity: botMemory.sellAmount,
- price: botMemory.sellPrice,
- useServerTime: true
- })
- .then(result => {
- botMemory.totalSells++;
- botMemory.OrderSellID = result.orderId;
- botMemory.filledSellOrder = false;
- })
- .catch(err => {
- botMemory.totalSells--;
- throw err;
- });
- botMemory.notifySellMin = 0;
- botMemory.hasFundsSell = 1;
- botMemory.sellPriceTemp = botMemory.sellPrice;
- if (botMemory.telegram) {
- tgBot.telegram.sendMessage(
- config.BOT_CHAT,
- "\u{1F4C8} Order de venda criada com sucesso: Quantidade vendida: \u{1f4b5} " +
- botMemory.sellAmount +
- ", valor de venda: \u{1f3f7} " +
- botMemory.sellPrice +
- " utilizando spread em " +
- botMemory.spreadOpera +
- "."
- );
- }
- } else {
- if (
- botMemory.telegram &&
- botMemory.notifySellMin == 0 &&
- botMemory.currencyBalanceFree >= botMemory.sellAmount
- ) {
- tgBot.telegram.sendMessage(
- config.BOT_CHAT,
- "\u{274C} O valor de venda do mercado esta abaixo do definido em " +
- config.SELL_MIN +
- ". O bot vai aguardar o preço aumentar até o valor definido para evitar prejuízos."
- );
- botMemory.notifySellMin = 1;
- }
- if (
- botMemory.telegram &&
- botMemory.hasFundsSell &&
- botMemory.notifySellMin == 0
- ) {
- tgBot.telegram.sendMessage(
- config.BOT_CHAT,
- "\u{1F6AB} O bot está sem saldo para vendas em " +
- config.CURRENCY +
- ". Seu saldo atual é: " +
- botMemory.currencyBalanceFree +
- ". O bot vai aguardar até que uma compra seja executada para liberar saldo."
- );
- botMemory.notifySellMin = 1;
- }
- botMemory.OrderSellID = 0;
- botMemory.hasFundsSell = 0;
- }
- }
+ if (botMemory.filledSellOrder) {
+ if (
+ (botMemory.currencyBalanceFree > 20 ||
+ botMemory.currencyBalanceFree >= botMemory.sellAmount) &&
+ botMemory.sellPrice > config.SELL_MIN
+ ) {
+ if (
+ botMemory.currencyBalanceFree > 20 &&
+ botMemory.currencyBalanceFree <= botMemory.sellAmount
+ ) {
+ botMemory.sellAmount = parseFloat(
+ botMemory.currencyBalanceFree
+ ).toFixed(2);
+ }
+ client
+ .order({
+ symbol: config.CURRENCY + config.MARKET,
+ side: "SELL",
+ quantity: botMemory.sellAmount,
+ price: botMemory.sellPrice,
+ useServerTime: true
+ })
+ .then(result => {
+ botMemory.totalSells++;
+ botMemory.OrderSellID = result.orderId;
+ botMemory.filledSellOrder = false;
})
.catch(err => {
+ botMemory.totalSells--;
throw err;
});
- })
- .catch(err => {
- throw err;
- });
+ botMemory.notifySellMin = false;
+ botMemory.hasFundsSell = true;
+ botMemory.sellPriceTemp = botMemory.sellPrice;
+ if (botMemory.telegram) {
+ tgBot.telegram.sendMessage(
+ config.BOT_CHAT,
+ "\u{1F4C8} Order de venda criada com sucesso: Quantidade vendida: \u{1f4b5} " +
+ botMemory.sellAmount +
+ ", valor de venda: \u{1f3f7} " +
+ botMemory.sellPrice +
+ " utilizando spread em " +
+ botMemory.spreadOpera +
+ "."
+ );
+ }
+ } else {
+ if (
+ botMemory.telegram &&
+ !botMemory.notifySellMin &&
+ botMemory.currencyBalanceFree >= botMemory.sellAmount
+ ) {
+ tgBot.telegram.sendMessage(
+ config.BOT_CHAT,
+ "\u{274C} O valor de venda do mercado esta abaixo do definido em " +
+ config.SELL_MIN +
+ ". O bot vai aguardar o preço aumentar até o valor definido para evitar prejuízos."
+ );
+ botMemory.notifySellMin = true;
+ }
+ if (
+ botMemory.telegram &&
+ botMemory.hasFundsSell &&
+ !botMemory.notifySellMin
+ ) {
+ tgBot.telegram.sendMessage(
+ config.BOT_CHAT,
+ `\u{1F6AB} O bot está sem saldo para vendas em ${config.CURRENCY}. Seu saldo atual é: ${botMemory.currencyBalanceFree}. O bot vai aguardar até que uma compra seja executada para liberar saldo.`
+ );
+ botMemory.notifySellMin = true;
+ }
+ botMemory.OrderSellID = 0;
+ botMemory.hasFundsSell = 0;
+ }
+ }
}
console.clear();
From 92408b41f4b404b2095747949cbecaab2a99430b Mon Sep 17 00:00:00 2001
From: Gustavo
Date: Sun, 1 Mar 2020 14:02:14 -0300
Subject: [PATCH 6/6] change default value
---
src/config.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/config.js b/src/config.js
index 86326fa..d12d20d 100644
--- a/src/config.js
+++ b/src/config.js
@@ -10,7 +10,7 @@ export default {
SELL_MIN: 1.0,
ORDER_EXPIRE: 24,
AUTO_SPREAD: true,
- BUY_VALUE: 11,
+ BUY_VALUE: 100,
SPREAD_MIN: 0.0015,
LOOP_TIME: 15,
TELEGRAM_TOKEN: "",