From 6f6673a1020909e3479fb1a7853fd2a2c989bfff Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Wed, 10 Apr 2024 10:28:04 +0300 Subject: [PATCH 1/4] Increase inner limit for bfx api trades/symbol/hist endpoint --- workers/loc.api/helpers/limit-param.helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workers/loc.api/helpers/limit-param.helpers.js b/workers/loc.api/helpers/limit-param.helpers.js index 2f1a917e..642cf1bd 100644 --- a/workers/loc.api/helpers/limit-param.helpers.js +++ b/workers/loc.api/helpers/limit-param.helpers.js @@ -9,7 +9,7 @@ const getMethodLimit = (sendLimit, method, methodsLimits = {}) => { trades: { default: 500, max: 1000, innerMax: 2500 }, orderTrades: { default: 500, max: 1000, innerMax: 1000 }, fundingTrades: { default: 500, max: 1000, innerMax: 1000 }, - publicTrades: { default: 500, max: 5000, innerMax: 5000 }, + publicTrades: { default: 500, max: 5000, innerMax: 10000 }, orders: { default: 250, max: 500, innerMax: 2500 }, movements: { default: 25, max: 25, innerMax: 1000 }, fundingOfferHistory: { default: 100, max: 500, innerMax: 500 }, From ee41a1197dabd0e9cfe6a19f046163430cffcb3b Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Wed, 10 Apr 2024 14:36:34 +0300 Subject: [PATCH 2/4] Speed up auth in case token expiration --- workers/loc.api/helpers/get-data-from-api.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/workers/loc.api/helpers/get-data-from-api.js b/workers/loc.api/helpers/get-data-from-api.js index 2db98412..86e83b7f 100644 --- a/workers/loc.api/helpers/get-data-from-api.js +++ b/workers/loc.api/helpers/get-data-from-api.js @@ -8,7 +8,8 @@ const { isRateLimitError, isNonceSmallError, isUserIsNotMerchantError, - isENetError + isENetError, + isAuthError } = require('./api-errors-testers') const _delay = (mc = 80000, interrupter) => { @@ -161,7 +162,10 @@ module.exports = ( // Handle unexpected BFX API errors countUnexpectedError += 1 - if (countUnexpectedError > 3) { + if ( + countUnexpectedError > 3 || + isAuthError(err) + ) { throw err } if (_isInterrupted(_interrupter)) { From 4c0f97247d3c9b190ac3dba644bb739427d3725c Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Thu, 11 Apr 2024 08:45:28 +0300 Subject: [PATCH 3/4] Update gh action setup-node to v4 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 687b6de2..98b3bb26 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v4 with: submodules: recursive - - uses: actions/setup-node@v3 + - uses: actions/setup-node@v4 with: node-version: 18.17.1 - name: Setup configs From 2be219837b5a02fcd6119178a233c86589b2c267 Mon Sep 17 00:00:00 2001 From: Vladimir Voronkov Date: Tue, 16 Apr 2024 12:52:59 +0300 Subject: [PATCH 4/4] Bump version up to 4.10.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9d392565..bc495cb1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bfx-report", - "version": "4.10.1", + "version": "4.10.2", "description": "Reporting tool", "main": "worker.js", "license": "Apache-2.0",