From 6260efcff61f4a2e27f03af278cf8c55cf56568e Mon Sep 17 00:00:00 2001 From: Brett Taylor Date: Tue, 16 Nov 2021 22:51:23 -0500 Subject: [PATCH] genericize the options hash more --- .../Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js index 0150765ec..1bba3d582 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/APIs/ExchangeAPI.js @@ -29,7 +29,6 @@ let secret let uid let password - let brokerId let sandBox = TS.projects.foundations.globals.taskConstants.TASK_NODE.parentNode.parentNode.parentNode.referenceParent.parentNode.parentNode.config.sandbox || false; if (TS.projects.foundations.globals.taskConstants.TASK_NODE.keyReference !== undefined) { @@ -38,7 +37,7 @@ secret = TS.projects.foundations.globals.taskConstants.TASK_NODE.keyReference.referenceParent.config.secret uid = TS.projects.foundations.globals.taskConstants.TASK_NODE.keyReference.referenceParent.config.uid password = TS.projects.foundations.globals.taskConstants.TASK_NODE.keyReference.referenceParent.config.password - brokerId = TS.projects.foundations.globals.taskConstants.TASK_NODE.keyReference.referenceParent.config.brokerId + options = TS.projects.foundations.globals.taskConstants.TASK_NODE.keyReference.referenceParent.config.options } } @@ -46,12 +45,11 @@ case 'okex': case 'okex3': case 'okex5': - if (brokerId === undefined) { - brokerId = 'c77ccd60ec7b4cBC' + if (options.brokerId === undefined) { + options.brokerId = 'c77ccd60ec7b4cBC' } break; } - options.brokerId = brokerId const exchangeClass = ccxt[exchangeId] const exchangeConstructorParams = {