bug fixed with hostname

This commit is contained in:
Luis Fernando Molina committed 2020-03-09 14:15:13 +01:00
1 parent b5ad2f01ba
commit 892fb452fe
1 file changed
+8 -1
+8 -1
View File
@@ -38,6 +38,7 @@ exports.newUserBot = function newUserBot(bot, logger, COMMONS, UTILITIES, fileSt
let uiStartDate = new Date(bot.uiStartDate)
let fisrtTimeThisProcessRun = false
let limit = 1000 // This is the default value
let hostname
return thisObject;
@@ -54,7 +55,7 @@ exports.newUserBot = function newUserBot(bot, logger, COMMONS, UTILITIES, fileSt
/* Applying the parameters defined by the user at the Exchange node */
if (bot.exchangeNode.code.API !== undefined) {
for (let i = 0; i < bot.exchangeNode.code.API.length; i++) {
if (bot.exchangeNode.code.API[i].method === 'fetchOHLCVs') {
if (bot.exchangeNode.code.API[i].method === 'fetch_ohlcv') {
if (bot.exchangeNode.code.API[i].class !== undefined) {
exchangeId = bot.exchangeNode.code.API[i].class
}
@@ -69,6 +70,9 @@ exports.newUserBot = function newUserBot(bot, logger, COMMONS, UTILITIES, fileSt
if (bot.exchangeNode.code.API[i].rateLimit !== undefined) {
rateLimit = bot.exchangeNode.code.API[i].rateLimit
}
if (bot.exchangeNode.code.API[i].hostname !== undefined) {
hostname = bot.exchangeNode.code.API[i].hostname
}
}
}
}
@@ -96,6 +100,9 @@ exports.newUserBot = function newUserBot(bot, logger, COMMONS, UTILITIES, fileSt
if (rateLimit !== undefined) {
exchangeConstructorParams.rateLimit = rateLimit
}
if (hostname !== undefined) {
exchangeConstructorParams.hostname = hostname
}
exchange = new exchangeClass(exchangeConstructorParams)