From 40024d5cf2f179fe5c13c128098f2c0cb333e155 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sat, 8 Aug 2020 23:50:16 -0400 Subject: [PATCH 1/7] Capture API Wrapper Logs --- config/config.json.example | 1 + config/readme.md | 6 +++++- src/main/BinanceApi.js | 4 +++- src/main/Loggers.js | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/config/config.json.example b/config/config.json.example index cf33b3e..2a6d539 100644 --- a/config/config.json.example +++ b/config/config.json.example @@ -30,6 +30,7 @@ "LOG": { "LEVEL": "debug", + "VERBOSE": false, "PRETTY_PRINT": true }, diff --git a/config/readme.md b/config/readme.md index 21dbe8f..6f4b3b2 100644 --- a/config/readme.md +++ b/config/readme.md @@ -111,7 +111,7 @@ Upon each version update you should copy the new syntax from `config.json.exampl #### `LOG.LEVEL` (String) * Default: `"debug"` -* Description: Log level to configure how verbose logging messages are +* Description: Log level to configure how verbose logging messages are. Output can be found in the /log directory * Values: * `"fatal"` * `"error"` @@ -121,6 +121,10 @@ Upon each version update you should copy the new syntax from `config.json.exampl * `"trace"` * `"silent"` +### `LOG.VERBOSE` (Boolean) +* Default: `false` +* Description: Enables more detailed log messages from the binance api wrapper + #### `LOG.PRETTY_PRINT` (Boolean) * Default: `true` * Description: Format the logs with pino-pretty. Read the logs via a terminal for best results diff --git a/src/main/BinanceApi.js b/src/main/BinanceApi.js index e2aaf0c..901d98f 100644 --- a/src/main/BinanceApi.js +++ b/src/main/BinanceApi.js @@ -3,7 +3,9 @@ const logger = require('./Loggers'); const binance = require('node-binance-api')({ APIKEY: CONFIG.KEYS.API, APISECRET: CONFIG.KEYS.SECRET, - test: !CONFIG.TRADING.ENABLED + test: !CONFIG.TRADING.ENABLED, + log: (msg) => logger.binance.info(msg), + verbose: CONFIG.LOG.VERBOSE, }); const BinanceApi = { diff --git a/src/main/Loggers.js b/src/main/Loggers.js index c1df00e..b1fe13e 100644 --- a/src/main/Loggers.js +++ b/src/main/Loggers.js @@ -24,7 +24,8 @@ if (!fs.existsSync(LOG_DIR)){ const Loggers = { LINE: '-'.repeat(50), 'performance': pino(PINO_OPTS, pino.destination(`${LOG_DIR}/performance.log`)), - 'execution': pino(PINO_OPTS, pino.destination(`${LOG_DIR}/execution.log`)) + 'execution': pino(PINO_OPTS, pino.destination(`${LOG_DIR}/execution.log`)), + 'binance': pino(PINO_OPTS, pino.destination(`${LOG_DIR}/binance.log`)), }; module.exports = Loggers; From ad9b8e2051157c9dff65857dfd19c663f79d525c Mon Sep 17 00:00:00 2001 From: Brandon Date: Sat, 8 Aug 2020 23:50:48 -0400 Subject: [PATCH 2/7] Update Dependencies --- package-lock.json | 72 +++++++++++++++++++++++------------------------ package.json | 8 +++--- 2 files changed, 40 insertions(+), 40 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9bb5520..7b966da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,9 +23,9 @@ } }, "ajv": { - "version": "6.12.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", - "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "version": "6.12.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", + "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -98,9 +98,9 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.9.1.tgz", - "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", + "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" }, "bcrypt-pbkdf": { "version": "1.0.2", @@ -126,9 +126,9 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, "chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -269,9 +269,9 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "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==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-json-stable-stringify": { "version": "2.1.0", @@ -322,11 +322,11 @@ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", "requires": { - "ajv": "^6.5.5", + "ajv": "^6.12.3", "har-schema": "^2.0.0" } }, @@ -444,9 +444,9 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node-binance-api": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/node-binance-api/-/node-binance-api-0.11.4.tgz", - "integrity": "sha512-6WeGLGMhihcY7E1dhf/uoygnos5Ydzg4P5jVsVmA3VvtkNaTb3IJZmxVRYzLIhgsF/RF14w7HDRiSsKogHJpsA==", + "version": "0.11.11", + "resolved": "https://registry.npmjs.org/node-binance-api/-/node-binance-api-0.11.11.tgz", + "integrity": "sha512-sP8VjBe4/bKFZx1onMQzLPgYElbt4uolhp+6ld1Vj65xa3GomdqJNQCloeR0CmVEU9Sd9IxszgIfe7y189gmmw==", "requires": { "async": "^3.1.0", "https-proxy-agent": "^3.0.1", @@ -476,9 +476,9 @@ "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, "pino": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/pino/-/pino-6.2.1.tgz", - "integrity": "sha512-5F5A+G25Ex2rMOBEe3XYGyLSF4dikQZsFvPojwsqnDBX+rfg7+kw9s5i7pHuVAJImekjwb+MR9jQyHWPLENlvQ==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/pino/-/pino-6.5.0.tgz", + "integrity": "sha512-qDIFPZ2h2AMrp+JIWKFUtejiTv5F/+glbizrG9VNvegSCSK6sqnRmerNM9R98/x3RxwKkIf5kJ9q4chXdBdvJA==", "requires": { "fast-redact": "^2.0.0", "fast-safe-stringify": "^2.0.7", @@ -489,13 +489,13 @@ } }, "pino-pretty": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-4.0.0.tgz", - "integrity": "sha512-YLy/n3dMXYWOodSm530gelkSAJGmEp29L9pqiycInlIae5FEJPWAkMRO3JFMbIFtjD2Ve4SH2aBcz2aRreGpBQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/pino-pretty/-/pino-pretty-4.1.0.tgz", + "integrity": "sha512-D4rORz/7SCZ0AGeWw9QFXsJ+ky3jDOqi/ABFzxxCk5BtEelEgJ6AABFew7TosHGw7I1t8VuMaGdTVNoYMZc+jg==", "requires": { "@hapi/bourne": "^2.0.0", "args": "^5.0.1", - "chalk": "^3.0.0", + "chalk": "^4.0.0", "dateformat": "^3.0.3", "fast-safe-stringify": "^2.0.7", "jmespath": "^0.15.0", @@ -503,7 +503,7 @@ "pump": "^3.0.0", "readable-stream": "^3.6.0", "split2": "^3.1.1", - "strip-json-comments": "^3.0.1" + "strip-json-comments": "^3.1.1" } }, "pino-std-serializers": { @@ -626,9 +626,9 @@ } }, "sonic-boom": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-1.0.1.tgz", - "integrity": "sha512-o9tx+bonVEXSaPtptyXQXpP8l6UV9Bi3im2geZskvWw2a/o/hrbWI7EBbbv+rOx6Hubnzun9GgH4WfbgEA3MFQ==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-1.0.2.tgz", + "integrity": "sha512-sRMmXu7uFDXoniGvtLHuQk5KWovLWoi6WKASn7rw0ro41mPf0fOolkGp4NE6680CbxvNh26zWNyFQYYWXe33EA==", "requires": { "atomic-sleep": "^1.0.0", "flatstr": "^1.0.12" @@ -672,9 +672,9 @@ } }, "strip-json-comments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", - "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" }, "supports-color": { "version": "5.5.0", @@ -756,9 +756,9 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "ws": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.0.tgz", - "integrity": "sha512-iFtXzngZVXPGgpTlP1rBqsUK82p9tKqsWRPg5L56egiljujJT3vGAYnHANvFxBieXrTFavhzhxW52jnaWV+w2w==" + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.3.1.tgz", + "integrity": "sha512-D3RuNkynyHmEJIpD2qrgVkc9DQ23OrN/moAwZX4L8DfvszsJxpjQuUq3LMx6HoYji9fbIOBY18XWBsAux1ZZUA==" } } } diff --git a/package.json b/package.json index 0a186ff..91304ad 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "name": "Brandon Mino" }, "engines": { - "node": "12.16.3", + "node": "12.18.3", "npm": "6.14.5" }, "scripts": { @@ -17,9 +17,9 @@ }, "dependencies": { "blessed": "^0.1.81", - "node-binance-api": "^0.11.4", - "pino": "^6.2.1", - "pino-pretty": "^4.0.0" + "node-binance-api": "^0.11.11", + "pino": "^6.5.0", + "pino-pretty": "^4.1.0" }, "license": "MIT" } From 28f4fe1bf8346abae17cead52f40128569056dd7 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 9 Aug 2020 00:06:35 -0400 Subject: [PATCH 3/7] Change Config Defaults --- config/config.json.example | 10 +++++----- config/readme.md | 20 ++++++++++---------- src/resources/docs/depths.md | 4 ++-- src/resources/docs/strategies.md | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/config/config.json.example b/config/config.json.example index 2a6d539..107c0d6 100644 --- a/config/config.json.example +++ b/config/config.json.example @@ -8,7 +8,7 @@ "INVESTMENT": { "BASE": "BTC", "MIN": 0.015, - "MAX": 0.035, + "MAX": 0.030, "STEP": 0.005 }, @@ -17,9 +17,9 @@ "EXECUTION_STRATEGY": "linear", "EXECUTION_TEMPLATE": ["BUY", "SELL", "SELL"], "EXECUTION_CAP": 1, - "TAKER_FEE": 0.00, - "PROFIT_THRESHOLD": 0.30, - "AGE_THRESHOLD": 300, + "TAKER_FEE": 0.10, + "PROFIT_THRESHOLD": 0.00, + "AGE_THRESHOLD": 100, "WHITELIST": [] }, @@ -36,7 +36,7 @@ "DEPTH": { "SIZE": 50, - "PRUNE": false, + "PRUNE": true, "INITIALIZATION_INTERVAL": 75 }, diff --git a/config/readme.md b/config/readme.md index 6f4b3b2..381da71 100644 --- a/config/readme.md +++ b/config/readme.md @@ -34,7 +34,7 @@ Upon each version update you should copy the new syntax from `config.json.exampl * Description: Minimum investment amount of the base currency to consider #### `INVESTMENT.MAX` (Number) -* Default: `0.035` +* Default: `0.030` * Description: Maximum investment amount of the base currency to consider #### `INVESTMENT.STEP` (Number) @@ -72,18 +72,18 @@ Upon each version update you should copy the new syntax from `config.json.exampl * `0` - No limit on executions #### `TRADING.TAKER_FEE` (Number) -* Default: `0.00` +* Default: `0.10` * Description: Market taker fee (percent) * Example: 0.015% would be entered as 0.015 #### `TRADING.PROFIT_THRESHOLD` (Number) -* Default: `0.30` +* Default: `0.00` * Description: Minimum profit (percent) required to consider executing a position -* Example: 0.30% would be entered as 0.30 +* Example: 0.50% would be entered as 0.50 #### `TRADING.AGE_THRESHOLD` (Number) -* Default: `300` -* Description: Maximum time (ms) since the oldest depth tick involved in the position +* Default: `100` +* Description: Maximum time (ms) since the oldest depth tick involved in the position required to consider executing a position #### `TRADING.WHITELIST` (Array | String) * Default: `[]` @@ -101,7 +101,7 @@ Upon each version update you should copy the new syntax from `config.json.exampl #### `HUD.ARB_COUNT` (Number) * Default: `10` -* Description: Number of arbs shown on the HUD +* Description: Number of triangular arbitrage positions shown on the HUD --- @@ -123,7 +123,7 @@ Upon each version update you should copy the new syntax from `config.json.exampl ### `LOG.VERBOSE` (Boolean) * Default: `false` -* Description: Enables more detailed log messages from the binance api wrapper +* Description: Enables more detailed log messages from the Binance api wrapper #### `LOG.PRETTY_PRINT` (Boolean) * Default: `true` @@ -148,7 +148,7 @@ Upon each version update you should copy the new syntax from `config.json.exampl * `500` #### `DEPTH.PRUNE` (Boolean) -* Default: `false` +* Default: `true` * Description: Remove depth cache entries with a depth greater than `DEPTH.SIZE` before each calculation cycle #### `DEPTH.INITIALIZATION_INTERVAL` (Number) @@ -161,4 +161,4 @@ Upon each version update you should copy the new syntax from `config.json.exampl #### `CALCULATION_COOLDOWN` (Number) * Default: `250` -* Description: Delay (ms) after calculations are performed before starting another cycle +* Description: Delay (ms) between completing calculations and starting another cycle diff --git a/src/resources/docs/depths.md b/src/resources/docs/depths.md index a8cf5c1..7fae214 100644 --- a/src/resources/docs/depths.md +++ b/src/resources/docs/depths.md @@ -1,6 +1,6 @@ # Depth Sizes -Internally the app maintains a copy of the order book. The depth of this order book's bid and ask spread is configured via `DEPTH.SIZE`. +Internally the app maintains a copy of the order book. This order book's bid and ask depth is configured via `DEPTH.SIZE`. ### How Local Order Book is Maintained @@ -26,6 +26,6 @@ This is because higher depth values have a higher weight assigned by Binance. **Q**. How high should I increase `DEPTH.SIZE`? -**A**. Values higher than `100` will lead to an IP ban on startup without using `TRADING.WHITELIST` +**A**. Values higher than `100` could lead to an IP ban on startup without using `TRADING.WHITELIST` --- diff --git a/src/resources/docs/strategies.md b/src/resources/docs/strategies.md index 93c70e2..7b4b039 100644 --- a/src/resources/docs/strategies.md +++ b/src/resources/docs/strategies.md @@ -23,7 +23,7 @@ Recommended BTC >= 0.4 ## Parallel Execution -Each of the three trades are initiated at the same time. This reduces total execution time from identification to completion. +Each of the three trades is initiated at the same time. This reduces total execution time from identification to completion. #### Balance Requirements From af2fc2c8eb580db0297df00b1817f49120015180 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 9 Aug 2020 00:08:45 -0400 Subject: [PATCH 4/7] Local Sandbox Testing --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d9cf96f..a2927af 100644 --- a/.gitignore +++ b/.gitignore @@ -101,3 +101,4 @@ $RECYCLE.BIN/ !*.example src/sandbox/ +**/Sandbox*.js From 047ecdf40145f6a62cf42293589e0486d47b9225 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 9 Aug 2020 01:29:26 -0400 Subject: [PATCH 5/7] Avoid Unnecessary Balance Query --- src/main/ArbitrageExecution.js | 7 ------- src/main/Main.js | 24 +++++++++++++----------- 2 files changed, 13 insertions(+), 18 deletions(-) diff --git a/src/main/ArbitrageExecution.js b/src/main/ArbitrageExecution.js index 2f2bfe2..ac02983 100644 --- a/src/main/ArbitrageExecution.js +++ b/src/main/ArbitrageExecution.js @@ -8,7 +8,6 @@ const ArbitrageExecution = { inProgressIds: new Set(), inProgressSymbols: new Set(), attemptedPositions: {}, - balances: {}, executeCalculatedPosition(calculated) { const startTime = new Date().getTime(); @@ -82,7 +81,6 @@ const ArbitrageExecution = { logger.execution.info(); }) .catch((err) => logger.execution.error(err.message)) - .then(ArbitrageExecution.refreshBalances) .then(() => { ArbitrageExecution.inProgressIds.delete(calculated.id); ArbitrageExecution.inProgressSymbols.delete(symbol.a); @@ -135,11 +133,6 @@ const ArbitrageExecution = { return true; }, - refreshBalances() { - return BinanceApi.getBalances() - .then(balances => ArbitrageExecution.balances = balances); - }, - getAttemptedPositionsCount() { return Object.keys(ArbitrageExecution.attemptedPositions).length; }, diff --git a/src/main/Main.js b/src/main/Main.js index 8396596..4244a50 100644 --- a/src/main/Main.js +++ b/src/main/Main.js @@ -20,7 +20,6 @@ SpeedTest.multiPing() console.log(msg); logger.performance.info(msg); }) - .then(ArbitrageExecution.refreshBalances) .then(BinanceApi.exchangeInfo) .then(exchangeInfo => MarketCache.initialize(exchangeInfo, CONFIG.TRADING.WHITELIST, CONFIG.INVESTMENT.BASE)) .then(checkConfig) @@ -161,16 +160,19 @@ function checkBalances() { console.log(`Checking balances ...`); - if (ArbitrageExecution.balances[CONFIG.INVESTMENT.BASE].available < CONFIG.INVESTMENT.MIN) { - const msg = `Only detected ${ArbitrageExecution.balances[CONFIG.INVESTMENT.BASE].available} ${CONFIG.INVESTMENT.BASE}, but ${CONFIG.INVESTMENT.MIN} ${CONFIG.INVESTMENT.BASE} is required to satisfy your INVESTMENT.MIN configuration`; - logger.execution.error(msg); - throw new Error(msg); - } - if (ArbitrageExecution.balances[CONFIG.INVESTMENT.BASE].available < CONFIG.INVESTMENT.MAX) { - const msg = `Only detected ${ArbitrageExecution.balances[CONFIG.INVESTMENT.BASE].available} ${CONFIG.INVESTMENT.BASE}, but ${CONFIG.INVESTMENT.MAX} ${CONFIG.INVESTMENT.BASE} is required to satisfy your INVESTMENT.MAX configuration`; - logger.execution.error(msg); - throw new Error(msg); - } + return BinanceApi.getBalances() + .then(balances => { + if (balances[CONFIG.INVESTMENT.BASE].available < CONFIG.INVESTMENT.MIN) { + const msg = `Only detected ${balances[CONFIG.INVESTMENT.BASE].available} ${CONFIG.INVESTMENT.BASE}, but ${CONFIG.INVESTMENT.MIN} ${CONFIG.INVESTMENT.BASE} is required to satisfy your INVESTMENT.MIN configuration`; + logger.execution.error(msg); + throw new Error(msg); + } + if (balances[CONFIG.INVESTMENT.BASE].available < CONFIG.INVESTMENT.MAX) { + const msg = `Only detected ${balances[CONFIG.INVESTMENT.BASE].available} ${CONFIG.INVESTMENT.BASE}, but ${CONFIG.INVESTMENT.MAX} ${CONFIG.INVESTMENT.BASE} is required to satisfy your INVESTMENT.MAX configuration`; + logger.execution.error(msg); + throw new Error(msg); + } + }); } function refreshHUD(arbs) { From 800a951ad4f2a310178393f6cb3f7cafe4613e93 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 9 Aug 2020 01:34:45 -0400 Subject: [PATCH 6/7] Default API Logging --- config/config.json.example | 2 +- config/readme.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.json.example b/config/config.json.example index 107c0d6..75cf075 100644 --- a/config/config.json.example +++ b/config/config.json.example @@ -30,7 +30,7 @@ "LOG": { "LEVEL": "debug", - "VERBOSE": false, + "VERBOSE": true, "PRETTY_PRINT": true }, diff --git a/config/readme.md b/config/readme.md index 381da71..1649247 100644 --- a/config/readme.md +++ b/config/readme.md @@ -122,7 +122,7 @@ Upon each version update you should copy the new syntax from `config.json.exampl * `"silent"` ### `LOG.VERBOSE` (Boolean) -* Default: `false` +* Default: `true` * Description: Enables more detailed log messages from the Binance api wrapper #### `LOG.PRETTY_PRINT` (Boolean) From 75b6cf068d3786a981ffb2a5116147ca1b38c9f8 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 9 Aug 2020 01:35:56 -0400 Subject: [PATCH 7/7] Update version --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7b966da..c3ac0af 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "binance-triangle-arbitrage", - "version": "5.3.0", + "version": "5.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 91304ad..756bca0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "binance-triangle-arbitrage", - "version": "5.3.0", + "version": "5.4.0", "repository": { "type": "git", "url": "https://github.com/bmino/binance-triangle-arbitrage.git"