if (nodeDefinition.initialValues.code !== undefined) { object.code = nodeDefinition.initialValues.code }
This commit is contained in:
1 parent
a621ba1cdc
commit
50b6051436
3 files changed
+36
-30
No files matched your search
+17
-17
@@ -57,35 +57,35 @@ exports.newUserBot = function newUserBot(bot, logger, COMMONS, UTILITIES, FILE_S
|
||||
exchangeId = bot.exchange.toLowerCase()
|
||||
|
||||
/* Applying the parameters defined by the user at the Exchange Node Config */
|
||||
if (bot.exchangeNode.code.API !== undefined) {
|
||||
for (let i = 0; i < bot.exchangeNode.code.API.length; i++) {
|
||||
if (bot.exchangeNode.code.API[i].method === 'fetch_ohlcv') {
|
||||
if (bot.exchangeNode.code.API[i].class !== undefined) {
|
||||
exchangeId = bot.exchangeNode.code.API[i].class
|
||||
if (bot.exchangeNode.config.API !== undefined) {
|
||||
for (let i = 0; i < bot.exchangeNode.config.API.length; i++) {
|
||||
if (bot.exchangeNode.config.API[i].method === 'fetch_ohlcv') {
|
||||
if (bot.exchangeNode.config.API[i].class !== undefined) {
|
||||
exchangeId = bot.exchangeNode.config.API[i].class
|
||||
}
|
||||
if (bot.exchangeNode.code.API[i].fetchOHLCVsMethod !== undefined) {
|
||||
if (bot.exchangeNode.config.API[i].fetchOHLCVsMethod !== undefined) {
|
||||
options = {
|
||||
'fetchOHLCVsMethod': bot.exchangeNode.code.API[i].fetchOHLCVsMethod
|
||||
'fetchOHLCVsMethod': bot.exchangeNode.config.API[i].fetchOHLCVsMethod
|
||||
}
|
||||
}
|
||||
if (bot.exchangeNode.code.API[i].firstId !== undefined) {
|
||||
firstId = bot.exchangeNode.code.API[i].firstId
|
||||
if (bot.exchangeNode.config.API[i].firstId !== undefined) {
|
||||
firstId = bot.exchangeNode.config.API[i].firstId
|
||||
}
|
||||
if (bot.exchangeNode.code.API[i].rateLimit !== undefined) {
|
||||
rateLimit = bot.exchangeNode.code.API[i].rateLimit
|
||||
if (bot.exchangeNode.config.API[i].rateLimit !== undefined) {
|
||||
rateLimit = bot.exchangeNode.config.API[i].rateLimit
|
||||
}
|
||||
if (bot.exchangeNode.code.API[i].hostname !== undefined) {
|
||||
hostname = bot.exchangeNode.code.API[i].hostname
|
||||
if (bot.exchangeNode.config.API[i].hostname !== undefined) {
|
||||
hostname = bot.exchangeNode.config.API[i].hostname
|
||||
}
|
||||
if (bot.exchangeNode.code.API[i].fetchType !== undefined) {
|
||||
fetchType = bot.exchangeNode.code.API[i].fetchType
|
||||
if (bot.exchangeNode.config.API[i].fetchType !== undefined) {
|
||||
fetchType = bot.exchangeNode.config.API[i].fetchType
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bot.code.fetchLimit !== undefined) {
|
||||
limit = bot.code.fetchLimit
|
||||
if (bot.config.fetchLimit !== undefined) {
|
||||
limit = bot.config.fetchLimit
|
||||
}
|
||||
|
||||
let key = process.env.KEY
|
||||
|
||||
+13
-13
@@ -52,25 +52,25 @@ exports.newUserBot = function newUserBot(bot, logger, COMMONS, UTILITIES, FILE_S
|
||||
exchangeId = bot.exchange.toLowerCase()
|
||||
|
||||
/* 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 === 'fetchTrades') {
|
||||
if (bot.exchangeNode.code.API[i].class !== undefined) {
|
||||
exchangeId = bot.exchangeNode.code.API[i].class
|
||||
if (bot.exchangeNode.config.API !== undefined) {
|
||||
for (let i = 0; i < bot.exchangeNode.config.API.length; i++) {
|
||||
if (bot.exchangeNode.config.API[i].method === 'fetchTrades') {
|
||||
if (bot.exchangeNode.config.API[i].class !== undefined) {
|
||||
exchangeId = bot.exchangeNode.config.API[i].class
|
||||
}
|
||||
if (bot.exchangeNode.code.API[i].fetchType !== undefined) {
|
||||
fetchType = bot.exchangeNode.code.API[i].fetchType
|
||||
if (bot.exchangeNode.config.API[i].fetchType !== undefined) {
|
||||
fetchType = bot.exchangeNode.config.API[i].fetchType
|
||||
}
|
||||
if (bot.exchangeNode.code.API[i].fetchTradesMethod !== undefined) {
|
||||
if (bot.exchangeNode.config.API[i].fetchTradesMethod !== undefined) {
|
||||
options = {
|
||||
'fetchTradesMethod': bot.exchangeNode.code.API[i].fetchTradesMethod
|
||||
'fetchTradesMethod': bot.exchangeNode.config.API[i].fetchTradesMethod
|
||||
}
|
||||
}
|
||||
if (bot.exchangeNode.code.API[i].firstId !== undefined) {
|
||||
firstId = bot.exchangeNode.code.API[i].firstId
|
||||
if (bot.exchangeNode.config.API[i].firstId !== undefined) {
|
||||
firstId = bot.exchangeNode.config.API[i].firstId
|
||||
}
|
||||
if (bot.exchangeNode.code.API[i].rateLimit !== undefined) {
|
||||
rateLimit = bot.exchangeNode.code.API[i].rateLimit
|
||||
if (bot.exchangeNode.config.API[i].rateLimit !== undefined) {
|
||||
rateLimit = bot.exchangeNode.config.API[i].rateLimit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
Reference in new issue
Block a user