From 23ae02e73065a41f4c9292c626b9735f5addf792 Mon Sep 17 00:00:00 2001 From: Chase Date: Wed, 24 Oct 2018 22:27:37 +0200 Subject: [PATCH 01/12] stale[bot] (#1744) --- .github/stale.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000000..37bc16f8ce --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,18 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 +# Issues with these labels will never be considered stale +exemptLabels: + - enhancement + - bug + - Sticky +# Label to use when marking an issue as stale +staleLabel: wontfix +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false From d27e0934743fd3fac92b2a32c9c0850f7b46d010 Mon Sep 17 00:00:00 2001 From: Snyk bot Date: Wed, 8 Apr 2020 12:06:10 +0300 Subject: [PATCH 02/12] fix: upgrade lint-staged from 10.1.1 to 10.1.2 (#2063) Snyk has created this PR to upgrade lint-staged from 10.1.1 to 10.1.2. See this package in NPM: https://www.npmjs.com/package/lint-staged See this project in Snyk: https://app.snyk.io/org/deviavir/project/14e19887-e219-40d4-89b6-6c657bf78942?utm_source=github&utm_medium=upgrade-pr --- package-lock.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index a9ad816903..c79a350715 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7679,9 +7679,9 @@ "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, "lint-staged": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.1.1.tgz", - "integrity": "sha512-wAeu/ePaBAOfwM2+cVbgPWDtn17B0Sxiv0NvNEqDAIvB8Yhvl60vafKFiK4grcYn87K1iK+a0zVoETvKbdT9/Q==", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-10.1.2.tgz", + "integrity": "sha512-Vtbe8rhWbJxPNlnXk6jczRh6wvAVjGg+VhELAIjLakOjTACdB4qJOD4W2R8oUXLRCqL1t9WMUsXbSlVK34A8Lg==", "requires": { "chalk": "^3.0.0", "commander": "^4.0.1", @@ -7743,9 +7743,9 @@ "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==" }, "cross-spawn": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.1.tgz", - "integrity": "sha512-u7v4o84SwFpD32Z8IIcPZ6z1/ie24O6RU3RbtL5Y316l3KuHVPx9ItBgWQ6VlfAFnRnTtMUrsQ9MUUTuEZjogg==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.2.tgz", + "integrity": "sha512-PD6G8QG3S4FK/XCGFbEQrDqO2AnMMsy0meR7lerlIOHAAbkuavGU/pOqprrlvfTNjvowivTeBsjebAL0NSoMxw==", "requires": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", diff --git a/package.json b/package.json index 19438cca74..3a923f4287 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "jsonexport": "^2.4.1", "keltnerchannel": "^1.4.2", "kraken-api": "^1.0.0", - "lint-staged": "^10.1.1", + "lint-staged": "^10.1.2", "lodash": "^4.17.15", "lolex": "^6.0.0", "mathjs": "^6.6.2", From 5b843bf895021bf5b8b0ded8b481bc3468fe5334 Mon Sep 17 00:00:00 2001 From: Snyk bot Date: Wed, 8 Apr 2020 12:06:18 +0300 Subject: [PATCH 03/12] fix: upgrade ccxt from 1.25.80 to 1.25.81 (#2064) Snyk has created this PR to upgrade ccxt from 1.25.80 to 1.25.81. See this package in NPM: https://www.npmjs.com/package/ccxt See this project in Snyk: https://app.snyk.io/org/deviavir/project/14e19887-e219-40d4-89b6-6c657bf78942?utm_source=github&utm_medium=upgrade-pr --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index c79a350715..a4ed2f307c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2841,9 +2841,9 @@ "integrity": "sha512-MCLjfpHAcI3gPdx26xoQx2JqRdNMf68ovhJkqNSiZIx/yQP6yNYYKbf8ww2J6kgNTPGIrXyugFlNz5jmGtg8BQ==" }, "ccxt": { - "version": "1.25.80", - "resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.25.80.tgz", - "integrity": "sha512-AUWagxMa8PMexRabbktWezlmVacj6L2Ep4844ebIXUOyME2Ommg7O/9/pq0F2Ne1IHcJnNJzHrMYQvkh2gBtlw==" + "version": "1.25.81", + "resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.25.81.tgz", + "integrity": "sha512-XumSzJzJJZlIeps/pXbomR0xfiu2lhYC3hGm+lhacIsrWwKeH7Am/9vQMVMpDWloC84d5APAvSCE3/KxdllPpA==" }, "cexio-api-node": { "version": "1.2.0", diff --git a/package.json b/package.json index 3a923f4287..45fbb88225 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "bl": "^4.0.2", "bollinger-bands": "^3.0.1", "bootstrap": "^4.4.1", - "ccxt": "^1.25.80", + "ccxt": "^1.25.81", "cexio-api-node": "^1.0.8", "cliff": "^0.1.10", "coinbase-pro": "^0.9.0", From 2c8301a74373a36365bcc4090bc33af92eb852ef Mon Sep 17 00:00:00 2001 From: Travis CI Date: Wed, 8 Apr 2020 17:43:33 +0000 Subject: [PATCH 04/12] Exchanges: update-products 5838 --- extensions/exchanges/cexio/products.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/extensions/exchanges/cexio/products.json b/extensions/exchanges/cexio/products.json index e570741082..25649f86a6 100644 --- a/extensions/exchanges/cexio/products.json +++ b/extensions/exchanges/cexio/products.json @@ -614,5 +614,13 @@ "max_size": null, "increment": "0.01", "label": "MATIC/USD" + }, + { + "asset": "MATIC", + "currency": "EUR", + "min_size": "100", + "max_size": null, + "increment": "0.01", + "label": "MATIC/EUR" } ] \ No newline at end of file From 2ea7ed09f296225f77dbda2aca59dbefeec4da58 Mon Sep 17 00:00:00 2001 From: Snyk bot Date: Thu, 9 Apr 2020 11:58:51 +0300 Subject: [PATCH 05/12] fix: upgrade css-loader from 3.4.2 to 3.5.0 (#2067) Snyk has created this PR to upgrade css-loader from 3.4.2 to 3.5.0. See this package in NPM: https://www.npmjs.com/package/css-loader See this project in Snyk: https://app.snyk.io/org/deviavir/project/14e19887-e219-40d4-89b6-6c657bf78942?utm_source=github&utm_medium=upgrade-pr --- package-lock.json | 20 +++++++++++++------- package.json | 2 +- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index a4ed2f307c..276c90070a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4075,22 +4075,23 @@ } }, "css-loader": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.4.2.tgz", - "integrity": "sha512-jYq4zdZT0oS0Iykt+fqnzVLRIeiPWhka+7BqPn+oSIpWJAHak5tmB/WZrJ2a21JhCeFyNnnlroSl8c+MtVndzA==", + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.5.0.tgz", + "integrity": "sha512-zed7D7JNZEq7htpu3H9oBUVWVgI6s8FgigejbVq+dc5zHV3SUPsyYBozXLIC9Eb73ahAYmnVdnn/SAB4WA75AQ==", "requires": { "camelcase": "^5.3.1", "cssesc": "^3.0.0", "icss-utils": "^4.1.1", "loader-utils": "^1.2.3", "normalize-path": "^3.0.0", - "postcss": "^7.0.23", + "postcss": "^7.0.27", "postcss-modules-extract-imports": "^2.0.0", "postcss-modules-local-by-default": "^3.0.2", - "postcss-modules-scope": "^2.1.1", + "postcss-modules-scope": "^2.2.0", "postcss-modules-values": "^3.0.0", - "postcss-value-parser": "^4.0.2", - "schema-utils": "^2.6.0" + "postcss-value-parser": "^4.0.3", + "schema-utils": "^2.6.5", + "semver": "^6.3.0" }, "dependencies": { "ajv": { @@ -4143,6 +4144,11 @@ "ajv-keywords": "^3.4.1" } }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", diff --git a/package.json b/package.json index 45fbb88225..199f926a25 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "commander": "^5.0.0", "convnetjs": "0.3.0", "counterup": "^1.0.2", - "css-loader": "^3.4.2", + "css-loader": "^3.5.0", "echarts": "^4.7.0", "ejs": "^3.0.2", "exports-loader": "^0.7.0", From fd30bb9c238c836666367c3472b5a9e96cf4babe Mon Sep 17 00:00:00 2001 From: Snyk bot Date: Thu, 9 Apr 2020 11:59:06 +0300 Subject: [PATCH 06/12] fix: upgrade ccxt from 1.25.81 to 1.25.83 (#2066) Snyk has created this PR to upgrade ccxt from 1.25.81 to 1.25.83. See this package in NPM: https://www.npmjs.com/package/ccxt See this project in Snyk: https://app.snyk.io/org/deviavir/project/14e19887-e219-40d4-89b6-6c657bf78942?utm_source=github&utm_medium=upgrade-pr --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 276c90070a..21158c0546 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2841,9 +2841,9 @@ "integrity": "sha512-MCLjfpHAcI3gPdx26xoQx2JqRdNMf68ovhJkqNSiZIx/yQP6yNYYKbf8ww2J6kgNTPGIrXyugFlNz5jmGtg8BQ==" }, "ccxt": { - "version": "1.25.81", - "resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.25.81.tgz", - "integrity": "sha512-XumSzJzJJZlIeps/pXbomR0xfiu2lhYC3hGm+lhacIsrWwKeH7Am/9vQMVMpDWloC84d5APAvSCE3/KxdllPpA==" + "version": "1.25.83", + "resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.25.83.tgz", + "integrity": "sha512-OVvO8m09Qat12laYZizB+CPuzRg8SnRnLcm8drTABbGqalhqaGiZxR899hjfSqCtgWzOkbL4incuV5d+86z5FQ==" }, "cexio-api-node": { "version": "1.2.0", diff --git a/package.json b/package.json index 199f926a25..2a36288787 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "bl": "^4.0.2", "bollinger-bands": "^3.0.1", "bootstrap": "^4.4.1", - "ccxt": "^1.25.81", + "ccxt": "^1.25.83", "cexio-api-node": "^1.0.8", "cliff": "^0.1.10", "coinbase-pro": "^0.9.0", From c7e096c339eec2f3e5d34f1402a9f11a30e04e12 Mon Sep 17 00:00:00 2001 From: Snyk bot Date: Thu, 9 Apr 2020 11:59:21 +0300 Subject: [PATCH 07/12] fix: upgrade semver from 7.1.3 to 7.2.1 (#2065) Snyk has created this PR to upgrade semver from 7.1.3 to 7.2.1. See this package in NPM: https://www.npmjs.com/package/semver See this project in Snyk: https://app.snyk.io/org/deviavir/project/14e19887-e219-40d4-89b6-6c657bf78942?utm_source=github&utm_medium=upgrade-pr --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index 21158c0546..b7398ea855 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11160,9 +11160,9 @@ } }, "semver": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.1.3.tgz", - "integrity": "sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA==" + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.2.1.tgz", + "integrity": "sha512-aHhm1pD02jXXkyIpq25qBZjr3CQgg8KST8uX0OWXch3xE6jw+1bfbWnCjzMwojsTquroUmKFHNzU6x26mEiRxw==" }, "semver-compare": { "version": "1.0.0", diff --git a/package.json b/package.json index 2a36288787..6b9e7e0b40 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "regression": "^2.0.0", "resolve-url-loader": "^3.1.1", "sass-loader": "^8.0.2", - "semver": "^7.1.3", + "semver": "^7.2.1", "simple-xmpp": "^1.3.0", "stats-lite": "2.2.0", "style-loader": "^1.1.3", From 84eae4577802149979298f0eb5ec4870a2988b2f Mon Sep 17 00:00:00 2001 From: Travis CI Date: Thu, 9 Apr 2020 17:46:06 +0000 Subject: [PATCH 08/12] Exchanges: update-products 5852 --- extensions/exchanges/bittrex/products.json | 24 +++++++++++++++++++++ extensions/exchanges/poloniex/products.json | 16 ++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/extensions/exchanges/bittrex/products.json b/extensions/exchanges/bittrex/products.json index 571ac56872..7c55299618 100644 --- a/extensions/exchanges/bittrex/products.json +++ b/extensions/exchanges/bittrex/products.json @@ -3126,5 +3126,29 @@ "max_size": "1000000", "increment": "0.00000001", "label": "BTC/ALGO" + }, + { + "asset": "OXT", + "currency": "BTC", + "min_size": "23.00000000", + "max_size": "1000000", + "increment": "0.00000001", + "label": "BTC/OXT" + }, + { + "asset": "OXT", + "currency": "USDT", + "min_size": "23.00000000", + "max_size": "1000000", + "increment": "0.00000001", + "label": "USDT/OXT" + }, + { + "asset": "ICX", + "currency": "BTC", + "min_size": "13.00000000", + "max_size": "1000000", + "increment": "0.00000001", + "label": "BTC/ICX" } ] \ No newline at end of file diff --git a/extensions/exchanges/poloniex/products.json b/extensions/exchanges/poloniex/products.json index e0d5c5d729..feb5f3f790 100644 --- a/extensions/exchanges/poloniex/products.json +++ b/extensions/exchanges/poloniex/products.json @@ -127,6 +127,22 @@ "increment": "0.00000001", "label": "Bancor/Bitcoin" }, + { + "asset": "BSVBEAR", + "currency": "USDT", + "min_total": "1", + "max_size": null, + "increment": "0.00000001", + "label": "3X Short Bitcoin SV Token/Tether USD" + }, + { + "asset": "BSVBULL", + "currency": "USDT", + "min_total": "1", + "max_size": null, + "increment": "0.00000001", + "label": "3X Long Bitcoin SV Token/Tether USD" + }, { "asset": "BTC", "currency": "PAX", From 1e78e061be155b3148482400a0b7ec03691fea30 Mon Sep 17 00:00:00 2001 From: Snyk bot Date: Fri, 10 Apr 2020 13:12:14 +0300 Subject: [PATCH 09/12] fix: upgrade css-loader from 3.5.0 to 3.5.1 (#2069) Snyk has created this PR to upgrade css-loader from 3.5.0 to 3.5.1. See this package in NPM: https://www.npmjs.com/package/css-loader See this project in Snyk: https://app.snyk.io/org/deviavir/project/14e19887-e219-40d4-89b6-6c657bf78942?utm_source=github&utm_medium=upgrade-pr --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index b7398ea855..c3a048fa6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4075,9 +4075,9 @@ } }, "css-loader": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.5.0.tgz", - "integrity": "sha512-zed7D7JNZEq7htpu3H9oBUVWVgI6s8FgigejbVq+dc5zHV3SUPsyYBozXLIC9Eb73ahAYmnVdnn/SAB4WA75AQ==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.5.1.tgz", + "integrity": "sha512-0G4CbcZzQ9D1Q6ndOfjFuMDo8uLYMu5vc9Abs5ztyHcKvmil6GJrMiNjzzi3tQvUF+mVRuDg7bE6Oc0Prolgig==", "requires": { "camelcase": "^5.3.1", "cssesc": "^3.0.0", diff --git a/package.json b/package.json index 6b9e7e0b40..a938dcecbd 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "commander": "^5.0.0", "convnetjs": "0.3.0", "counterup": "^1.0.2", - "css-loader": "^3.5.0", + "css-loader": "^3.5.1", "echarts": "^4.7.0", "ejs": "^3.0.2", "exports-loader": "^0.7.0", From d0e7d6d5aab977f5d7b3d97dce1a018b70e0f7cb Mon Sep 17 00:00:00 2001 From: Snyk bot Date: Fri, 10 Apr 2020 13:12:48 +0300 Subject: [PATCH 10/12] fix: upgrade ccxt from 1.25.83 to 1.25.86 (#2068) Snyk has created this PR to upgrade ccxt from 1.25.83 to 1.25.86. See this package in NPM: https://www.npmjs.com/package/ccxt See this project in Snyk: https://app.snyk.io/org/deviavir/project/14e19887-e219-40d4-89b6-6c657bf78942?utm_source=github&utm_medium=upgrade-pr --- package-lock.json | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index c3a048fa6a..0e80c4a551 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2841,9 +2841,9 @@ "integrity": "sha512-MCLjfpHAcI3gPdx26xoQx2JqRdNMf68ovhJkqNSiZIx/yQP6yNYYKbf8ww2J6kgNTPGIrXyugFlNz5jmGtg8BQ==" }, "ccxt": { - "version": "1.25.83", - "resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.25.83.tgz", - "integrity": "sha512-OVvO8m09Qat12laYZizB+CPuzRg8SnRnLcm8drTABbGqalhqaGiZxR899hjfSqCtgWzOkbL4incuV5d+86z5FQ==" + "version": "1.25.86", + "resolved": "https://registry.npmjs.org/ccxt/-/ccxt-1.25.86.tgz", + "integrity": "sha512-kKXPpDrpXZSHdqtgmiLeZaSHoennG66EgD5XzlJD4ZJP6ql7ukyqiSZk8QdhTow1L/76NI4oh+n1VItVFARbUw==" }, "cexio-api-node": { "version": "1.2.0", diff --git a/package.json b/package.json index a938dcecbd..ce62e19d87 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "bl": "^4.0.2", "bollinger-bands": "^3.0.1", "bootstrap": "^4.4.1", - "ccxt": "^1.25.83", + "ccxt": "^1.25.86", "cexio-api-node": "^1.0.8", "cliff": "^0.1.10", "coinbase-pro": "^0.9.0", From 69bbf10ae04812602d55cf29a9ab424ea601b06f Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 10 Apr 2020 17:44:47 +0000 Subject: [PATCH 11/12] Exchanges: update-products 5862 --- extensions/exchanges/binance/products.json | 33 +++++++++++++++++++++ extensions/exchanges/bittrex/products.json | 32 ++++++++++++++++++++ extensions/exchanges/cexio/products.json | 8 +++++ extensions/exchanges/poloniex/products.json | 24 +++++++++++++++ 4 files changed, 97 insertions(+) diff --git a/extensions/exchanges/binance/products.json b/extensions/exchanges/binance/products.json index f1deaf0d80..d13ec7a011 100644 --- a/extensions/exchanges/binance/products.json +++ b/extensions/exchanges/binance/products.json @@ -8611,5 +8611,38 @@ "increment": "0.00100000", "asset_increment": "0.00100000", "label": "XZC/USDT" + }, + { + "id": "SOLBNB", + "asset": "SOL", + "currency": "BNB", + "min_size": "0.10000000", + "max_size": "9000000.00000000", + "min_total": "0.10000000", + "increment": "0.00001000", + "asset_increment": "0.10000000", + "label": "SOL/BNB" + }, + { + "id": "SOLBTC", + "asset": "SOL", + "currency": "BTC", + "min_size": "1.00000000", + "max_size": "90000000.00000000", + "min_total": "0.00010000", + "increment": "0.00000001", + "asset_increment": "1.00000000", + "label": "SOL/BTC" + }, + { + "id": "SOLBUSD", + "asset": "SOL", + "currency": "BUSD", + "min_size": "0.01000000", + "max_size": "900000.00000000", + "min_total": "10.00000000", + "increment": "0.00010000", + "asset_increment": "0.01000000", + "label": "SOL/BUSD" } ] \ No newline at end of file diff --git a/extensions/exchanges/bittrex/products.json b/extensions/exchanges/bittrex/products.json index 7c55299618..dc9030edf8 100644 --- a/extensions/exchanges/bittrex/products.json +++ b/extensions/exchanges/bittrex/products.json @@ -3150,5 +3150,37 @@ "max_size": "1000000", "increment": "0.00000001", "label": "BTC/ICX" + }, + { + "asset": "USDC", + "currency": "BTC", + "min_size": "3.00000000", + "max_size": "1000000", + "increment": "0.00000001", + "label": "BTC/USDC" + }, + { + "asset": "USDC", + "currency": "ETH", + "min_size": "3.00000000", + "max_size": "1000000", + "increment": "0.00000001", + "label": "ETH/USDC" + }, + { + "asset": "USDC", + "currency": "USD", + "min_size": "3.00000000", + "max_size": "1000000", + "increment": "0.00000001", + "label": "USD/USDC" + }, + { + "asset": "USDC", + "currency": "USDT", + "min_size": "3.00000000", + "max_size": "1000000", + "increment": "0.00000001", + "label": "USDT/USDC" } ] \ No newline at end of file diff --git a/extensions/exchanges/cexio/products.json b/extensions/exchanges/cexio/products.json index 25649f86a6..69fae8c055 100644 --- a/extensions/exchanges/cexio/products.json +++ b/extensions/exchanges/cexio/products.json @@ -622,5 +622,13 @@ "max_size": null, "increment": "0.01", "label": "MATIC/EUR" + }, + { + "asset": "MATIC", + "currency": "GBP", + "min_size": "100", + "max_size": null, + "increment": "0.01", + "label": "MATIC/GBP" } ] \ No newline at end of file diff --git a/extensions/exchanges/poloniex/products.json b/extensions/exchanges/poloniex/products.json index feb5f3f790..ff4bb2c4eb 100644 --- a/extensions/exchanges/poloniex/products.json +++ b/extensions/exchanges/poloniex/products.json @@ -543,6 +543,30 @@ "increment": "0.00000001", "label": "Decentraland/Tether USD" }, + { + "asset": "MATIC", + "currency": "BTC", + "min_total": "0.0001", + "max_size": null, + "increment": "0.00000001", + "label": "Matic Network/Bitcoin" + }, + { + "asset": "MATIC", + "currency": "TRX", + "min_total": "0.0001", + "max_size": null, + "increment": "0.00000001", + "label": "Matic Network/Tron" + }, + { + "asset": "MATIC", + "currency": "USDT", + "min_total": "1", + "max_size": null, + "increment": "0.00000001", + "label": "Matic Network/Tether USD" + }, { "asset": "NMR", "currency": "BTC", From c3615286ecd1fa2603ba6dacdcdb2bb19ebff41d Mon Sep 17 00:00:00 2001 From: Emanuele <3024205+emabo@users.noreply.github.com> Date: Fri, 10 Apr 2020 23:22:53 +0200 Subject: [PATCH 12/12] Notifier interaction: add events to notifiers in order to receive commands also from a connected notifier. Implemented only for Telegram at the moment. - list of accepted commands is the same used in command line - check the correct origin of the message looking at chat ID - accept the flag 'c.notifiers.telegram.interactive' (default = false) to enable/disable this feature This commit provides a possible solution for feature request #1550 --- commands/trade.js | 167 +++++++++++++++++-------------- conf-sample.js | 1 + extensions/notifiers/telegram.js | 24 ++++- lib/engine.js | 8 ++ lib/notify.js | 20 +++- 5 files changed, 143 insertions(+), 77 deletions(-) diff --git a/commands/trade.js b/commands/trade.js index b2aea91532..a24731570d 100644 --- a/commands/trade.js +++ b/commands/trade.js @@ -120,47 +120,44 @@ module.exports = function (program, conf) { keyMap.set('d', 'dump statistical output to HTML file'.grey) keyMap.set('D', 'toggle automatic HTML dump to file'.grey) + var pushStr = '' + function listKeys() { - console.log('\nAvailable command keys:') + printLog('Available command keys:', true) keyMap.forEach((value, key) => { - console.log(' ' + key + ' - ' + value) + printLog(' ' + key + ' - ' + value) }) } function listOptions () { - console.log() - console.log(s.exchange.name.toUpperCase() + ' exchange active trading options:'.grey) - console.log() - process.stdout.write(z(22, 'STRATEGY'.grey, ' ') + '\t' + so.strategy + '\t' + (require(`../extensions/strategies/${so.strategy}/strategy`).description).grey) - console.log('\n') - process.stdout.write([ + printLog(s.exchange.name.toUpperCase() + ' exchange active trading options:'.grey, true) + printLog(z(22, 'STRATEGY'.grey, ' ') + '\t' + so.strategy + '\t' + (require(`../extensions/strategies/${so.strategy}/strategy`).description).grey, true) + printLog([ z(24, (so.mode === 'paper' ? so.mode.toUpperCase() : so.mode.toUpperCase()) + ' MODE'.grey, ' '), z(26, 'PERIOD'.grey, ' '), z(30, 'ORDER TYPE'.grey, ' '), z(28, 'SLIPPAGE'.grey, ' '), z(33, 'EXCHANGE FEES'.grey, ' ') - ].join('') + '\n') - process.stdout.write([ + ].join(''), true) + printLog([ z(15, (so.mode === 'paper' ? ' ' : (so.mode === 'live' && (so.manual === false || typeof so.manual === 'undefined')) ? ' ' + 'AUTO'.black.bgRed + ' ' : ' ' + 'MANUAL'.black.bgGreen + ' '), ' '), z(13, so.period_length, ' '), z(29, (so.order_type === 'maker' ? so.order_type.toUpperCase().green : so.order_type.toUpperCase().red), ' '), z(31, (so.mode === 'paper' ? 'avg. '.grey + so.avg_slippage_pct + '%' : 'max '.grey + so.max_slippage_pct + '%'), ' '), z(20, (so.order_type === 'maker' ? so.order_type + ' ' + s.exchange.makerFee : so.order_type + ' ' + s.exchange.takerFee), ' ') - ].join('') + '\n') - process.stdout.write('') - process.stdout.write([ + ].join('')) + printLog([ z(19, 'BUY %'.grey, ' '), z(20, 'SELL %'.grey, ' '), z(35, 'TRAILING STOP %'.grey, ' '), z(33, 'TRAILING DISTANCE %'.grey, ' ') - ].join('') + '\n') - process.stdout.write([ + ].join('')) + printLog([ z(9, so.buy_pct + '%', ' '), z(9, so.sell_pct + '%', ' '), z(20, so.profit_stop_enable_pct + '%', ' '), z(20, so.profit_stop_pct + '%', ' ') - ].join('') + '\n') - process.stdout.write('') + ].join('')) } /* Implementing statistical Exit */ @@ -226,7 +223,7 @@ module.exports = function (program, conf) { } if (!statsonly) { output_lines.forEach(function (line) { - console.log(line) + printLog(line) }) } if (quit || dump) { @@ -275,9 +272,9 @@ module.exports = function (program, conf) { function toggleStats(){ shouldSaveStats = !shouldSaveStats if(shouldSaveStats) - console.log('Auto stats dump enabled') + printLog('Auto stats dump enabled') else - console.log('Auto stats dump disabled') + printLog('Auto stats dump disabled') } function saveStatsLoop(){ @@ -368,6 +365,79 @@ module.exports = function (program, conf) { } + function printLog(str, cr = false) { + if (str) { + console.log((cr?'\n':'') + str) + pushStr += str + '\n' + } + } + + function executeCommand(command) { + var info = { ctrl: false } + if (conf.debug) { + console.log('\nCommand received: ' + command) + } + executeKey(command, info) + } + + function executeKey(key, info) { + if (key === 'l') { + listKeys() + } else if (key === 'b' && !info.ctrl ) { + engine.executeSignal('buy') + printLog('manual'.grey + ' limit ' + 'BUY'.green + ' command executed'.grey, true) + } else if (key === 'B' && !info.ctrl) { + engine.executeSignal('buy', null, null, false, true) + printLog('manual'.grey + ' market ' + 'BUY'.green + ' command executed'.grey, true) + } else if (key === 's' && !info.ctrl) { + engine.executeSignal('sell') + printLog('manual'.grey + ' limit ' + 'SELL'.red + ' command executed'.grey, true) + } else if (key === 'S' && !info.ctrl) { + engine.executeSignal('sell', null, null, false, true) + printLog('manual'.grey + ' market ' + 'SELL'.red + ' command executed'.grey, true) + } else if ((key === 'c' || key === 'C') && !info.ctrl) { + delete s.buy_order + delete s.sell_order + printLog('manual'.grey + ' order cancel' + ' command executed'.grey, true) + } else if (key === 'm' && !info.ctrl && so.mode === 'live') { + so.manual = !so.manual + printLog('MANUAL trade in LIVE mode: ' + (so.manual ? 'ON'.green.inverse : 'OFF'.red.inverse), true) + } else if (key === 'T' && !info.ctrl) { + so.order_type = 'taker' + printLog('Taker fees activated'.bgRed, true) + } else if (key === 'M' && !info.ctrl) { + so.order_type = 'maker' + printLog('Maker fees activated'.black.bgGreen, true) + } else if (key === 'o' && !info.ctrl) { + listOptions() + } else if (key === 'O' && !info.ctrl) { + printLog(cliff.inspect(so), true) + } else if (key === 'P' && !info.ctrl) { + printLog('Writing statistics...'.grey, true) + printTrade(false) + } else if (key === 'X' && !info.ctrl) { + printLog('Exiting... ' + '\nWriting statistics...'.grey, true) + printTrade(true) + } else if (key === 'd' && !info.ctrl) { + printLog('Dumping statistics...'.grey, true) + printTrade(false, true) + } else if (key === 'D' && !info.ctrl) { + printLog('Dumping statistics...'.grey, true) + toggleStats() + } else if (key === 'L' && !info.ctrl) { + debug.flip() + printLog('DEBUG mode: ' + (debug.on ? 'ON'.green.inverse : 'OFF'.red.inverse), true) + } else if (info.name === 'c' && info.ctrl) { + // @todo: cancel open orders before exit + process.exit() + } + + if (pushStr) { + engine.pushMessage('Reply', colors.stripColors(pushStr)) + pushStr = '' + } + } + var order_types = ['maker', 'taker'] if (!order_types.includes(so.order_type)) { so.order_type = 'maker' @@ -483,62 +553,13 @@ module.exports = function (program, conf) { forwardScan() setInterval(forwardScan, so.poll_trades) + if (!so.non_interactive) { + engine.onMessage(executeCommand) + } readline.emitKeypressEvents(process.stdin) if (!so.non_interactive && process.stdin.setRawMode) { process.stdin.setRawMode(true) - process.stdin.on('keypress', function (key, info) { - if (key === 'l') { - listKeys() - } else if (key === 'b' && !info.ctrl ) { - engine.executeSignal('buy') - console.log('\nmanual'.grey + ' limit ' + 'BUY'.green + ' command executed'.grey) - } else if (key === 'B' && !info.ctrl) { - engine.executeSignal('buy', null, null, false, true) - console.log('\nmanual'.grey + ' market ' + 'BUY'.green + ' command executed'.grey) - } else if (key === 's' && !info.ctrl) { - engine.executeSignal('sell') - console.log('\nmanual'.grey + ' limit ' + 'SELL'.red + ' command executed'.grey) - } else if (key === 'S' && !info.ctrl) { - engine.executeSignal('sell', null, null, false, true) - console.log('\nmanual'.grey + ' market ' + 'SELL'.red + ' command executed'.grey) - } else if ((key === 'c' || key === 'C') && !info.ctrl) { - delete s.buy_order - delete s.sell_order - console.log('\nmanual'.grey + ' order cancel' + ' command executed'.grey) - } else if (key === 'm' && !info.ctrl && so.mode === 'live') { - so.manual = !so.manual - console.log('\nMANUAL trade in LIVE mode: ' + (so.manual ? 'ON'.green.inverse : 'OFF'.red.inverse)) - } else if (key === 'T' && !info.ctrl) { - so.order_type = 'taker' - console.log('\n' + 'Taker fees activated'.bgRed) - } else if (key === 'M' && !info.ctrl) { - so.order_type = 'maker' - console.log('\n' + 'Maker fees activated'.black.bgGreen) - } else if (key === 'o' && !info.ctrl) { - listOptions() - } else if (key === 'O' && !info.ctrl) { - console.log('\n' + cliff.inspect(so)) - } else if (key === 'P' && !info.ctrl) { - console.log('\nWriting statistics...'.grey) - printTrade(false) - } else if (key === 'X' && !info.ctrl) { - console.log('\nExiting... ' + '\nWriting statistics...'.grey) - printTrade(true) - } else if (key === 'd' && !info.ctrl) { - console.log('\nDumping statistics...'.grey) - printTrade(false, true) - } else if (key === 'D' && !info.ctrl) { - console.log('\nDumping statistics...'.grey) - toggleStats() - } else if (key === 'L' && !info.ctrl) { - debug.flip() - console.log('\nDEBUG mode: ' + (debug.on ? 'ON'.green.inverse : 'OFF'.red.inverse)) - } else if (info.name === 'c' && info.ctrl) { - // @todo: cancel open orders before exit - console.log() - process.exit() - } - }) + process.stdin.on('keypress', executeKey) } }) }) diff --git a/conf-sample.js b/conf-sample.js index e44f4ed04b..eaf9034fa6 100644 --- a/conf-sample.js +++ b/conf-sample.js @@ -262,6 +262,7 @@ c.notifiers.pushover.priority = '0' // choose a priority to send zenbot messages // telegram configs c.notifiers.telegram = {} c.notifiers.telegram.on = false // false telegram disabled; true telegram enabled (key should be correct) +c.notifiers.telegram.interactive = false // true telegram is interactive c.notifiers.telegram.bot_token = 'YOUR-BOT-TOKEN' c.notifiers.telegram.chat_id = 'YOUR-CHAT-ID' // the id of the chat the messages should be send in // end telegram configs diff --git a/extensions/notifiers/telegram.js b/extensions/notifiers/telegram.js index a37ed834a5..068e985d56 100644 --- a/extensions/notifiers/telegram.js +++ b/extensions/notifiers/telegram.js @@ -3,14 +3,34 @@ process.env['NTBA_FIX_319'] = 1 var TelegramBot = require('node-telegram-bot-api') module.exports = function telegram (config) { + var bot = new TelegramBot(config.bot_token, { polling: true }) + var wrapper = function(cb) { + return function(message) { + if (message.chat.id != config.chat_id) { + console.log('\nChat ID error: command coming from wrong chat: ' + message.chat.id) + return + } + cb(message.text) + } + } var telegram = { pushMessage: function(title, message) { - var bot = new TelegramBot(config.bot_token) - bot.sendMessage(config.chat_id, title + ': ' + message).catch(function (error) { console.error('\nerror: telegram notification') console.log(error.response.body) // => { ok: false, error_code: 400, description: 'Bad Request: chat not found' } }) + }, + onMessage: function (callback) { + bot.on('message', wrapper(callback)) + bot.on('webhook_error', (error) => { + console.log('\nwebhook error: telegram event ' + error.code) + }) + bot.on('polling_error', (error) => { + console.log('\npolling error: telegram event ' + error.code) + }) + bot.on('error', (error) => { + console.log('\nerror: telegram event ' + error.code) + }) } } return telegram diff --git a/lib/engine.js b/lib/engine.js index 85b6d6ccd2..1fc6376575 100644 --- a/lib/engine.js +++ b/lib/engine.js @@ -119,6 +119,12 @@ module.exports = function (s, conf) { } } + function onMessage(callback) { + if (so.mode === 'live' || so.mode === 'paper') { + notifier.onMessage(callback) + } + } + function isFiat() { return !s.currency.match(/^BTC|ETH|XMR|USDT$/) } @@ -996,6 +1002,8 @@ module.exports = function (s, conf) { executeSignal: executeSignal, writeReport: writeReport, syncBalance: syncBalance, + pushMessage: pushMessage, + onMessage: onMessage, } } diff --git a/lib/notify.js b/lib/notify.js index 1e1f81eab5..e0f0ce3140 100644 --- a/lib/notify.js +++ b/lib/notify.js @@ -1,8 +1,16 @@ module.exports = function notifier (conf) { var active_notifiers = [] + var interactive_notifiers = [] + for (var notifier in conf.notifiers) { if (conf.notifiers[notifier].on) { - active_notifiers.push(require(`../extensions/notifiers/${notifier}`)(conf.notifiers[notifier])) + var notif = require(`../extensions/notifiers/${notifier}`)(conf.notifiers[notifier]) + notif.notifier_name = notifier + + active_notifiers.push(notif) + if (conf.notifiers[notifier].interactive) { + interactive_notifiers.push(notif) + } } } @@ -14,10 +22,18 @@ module.exports = function notifier (conf) { active_notifiers.forEach((notifier) => { if (conf.debug) { - console.log(`Sending push message via ${notifier}`) + console.log(`Sending push message via ${notifier.notifier_name}`) } notifier.pushMessage(title, message) }) + }, + onMessage: function (callback) { + interactive_notifiers.forEach((notifier) => { + if (conf.debug) { + console.log(`Receiving message from ${notifier.notifier_name}`) + } + notifier.onMessage(callback) + }) } } }