diff --git a/Assistant.js b/Assistant.js
index 00d3176bb..f7661e768 100644
--- a/Assistant.js
+++ b/Assistant.js
@@ -68,11 +68,6 @@
break;
}
- case 'Competition': {
- getMarketRateFromExchange();
- break;
- }
-
default: {
logger.write(MODULE_NAME, "[ERROR] initialize -> Unexpected bot.startMode.");
logger.write(MODULE_NAME, "[ERROR] initialize -> bot.startMode = " + bot.startMode);
@@ -357,13 +352,6 @@
break;
}
- case "Competition": {
-
- if (global.LOG_CONTROL[MODULE_NAME].logInfo === true) { logger.write(MODULE_NAME, "[INFO] getPositionsAtExchange -> Competition Mode Detected."); }
- exchangeAPI.getOpenPositions(bot.market, onResponse);
- break;
- }
-
default: {
logger.write(MODULE_NAME, "[ERROR] getPositionsAtExchange -> Unexpected bot.startMode.");
logger.write(MODULE_NAME, "[ERROR] getPositionsAtExchange -> bot.startMode = " + bot.startMode);
@@ -587,13 +575,6 @@
return;
}
- case "Competition": {
-
- if (global.LOG_CONTROL[MODULE_NAME].logInfo === true) { logger.write(MODULE_NAME, "[INFO] ordersExecutionCheck -> loopBody -> getPositionTradesAtExchange -> Competition Mode Detected."); }
- exchangeAPI.getExecutedTrades(pPositionId, onResponse);
- return;
- }
-
default: {
logger.write(MODULE_NAME, "[ERROR] ordersExecutionCheck -> loopBody -> getPositionTradesAtExchange -> Unexpected bot.startMode.");
logger.write(MODULE_NAME, "[ERROR] ordersExecutionCheck -> loopBody -> getPositionTradesAtExchange -> bot.startMode = " + bot.startMode);
@@ -995,12 +976,6 @@
return;
}
- case "Competition": {
-
- exchangeAPI.putPosition(bot.market, pType, pRate, pAmountA, pAmountB, onResponse);
- return;
- }
-
default: {
logger.write(MODULE_NAME, "[ERROR] putPosition -> Unexpected bot.startMode.");
logger.write(MODULE_NAME, "[ERROR] putPosition -> bot.startMode = " + bot.startMode);
@@ -1121,12 +1096,6 @@
return;
}
- case "Competition": {
-
- exchangeAPI.movePosition(pPosition, pNewRate, newAmountB, onResponse);
- return;
- }
-
default: {
logger.write(MODULE_NAME, "[ERROR] movePosition -> Unexpected bot.startMode.");
logger.write(MODULE_NAME, "[ERROR] movePosition -> bot.startMode = " + bot.startMode);
diff --git a/ExchangeAPI.js b/ExchangeAPI.js
index 64413f7f7..23996337c 100644
--- a/ExchangeAPI.js
+++ b/ExchangeAPI.js
@@ -11,59 +11,18 @@
getExecutedTrades: getExecutedTrades,
putPosition: putPosition,
movePosition: movePosition,
- getPublicTradeHistory: getPublicTradeHistory,
- getExchangeProperties: getExchangeProperties,
getMaxDecimalPositions: getMaxDecimalPositions
};
return thisObject;
function initialize(callBackFunction) {
- try {
- logInfo("Initialize -> Entering function.");
-
-
- callBackFunction(global.DEFAULT_OK_RESPONSE);
- } catch (err) {
- logError("Initialize -> err = " + err.stack);
- callBackFunction(global.DEFAULT_FAIL_RESPONSE);
- }
+ callBackFunction(global.DEFAULT_OK_RESPONSE);
}
- /*
- * Fixing decimal positions to exchange configuration.
- */
- function truncDecimals(pFloatValue) {
- let decimals = getMaxDecimalPositions();
- return parseFloat(parseFloat(pFloatValue).toFixed(decimals));
- }
-
- /*
- * Return number of decimals for the current market
- */
function getMaxDecimalPositions() {
- return getMarketConfig().maxDecimals;
- }
- /*
- * Return number of decimals for the current market
- */
- function getMarketConfig() {
- let markets = getExchangeProperties().markets
- for (let i = 0; i < markets.length; i++) {
- const market = markets[i];
- if (market.pair[0] === global.MARKET.assetA.toUpperCase() && market.pair[1] === global.MARKET.assetB.toUpperCase()) {
- return market;
- }
- }
- }
-
- /*
- * Return number of decimals for the current market
- */
- function getExchangeProperties() {
- return apiClient.getExchangeProperties();
}
/*
@@ -163,29 +122,6 @@
}
}
- /*
- * Returns all the trade history from the Exchange since startTime to endTime orderd by tradeId.
- * It's possible that the exchange doesn't support this method.
- * The object returned is an array of trades:
- * trade = {
- * tradeID, String
- * globalTradeID, String
- * type, String
- * rate, Number
- * amountA, Number
- * amountB, Number
- * date Date
- * };
- */
- function getPublicTradeHistory(assetA, assetB, startTime, endTime, callBack) {
- try {
- logInfo("getTradeHistory -> Entering function.");
- apiClient.getPublicTradeHistory(assetA, assetB, startTime, endTime, callBack);
- } catch (err) {
- logError("getTradeHistory -> err = " + err.message);
- callBack(global.DEFAULT_FAIL_RESPONSE);
- }
- }
function logInfo(message) {
if (LOG_INFO === true) { logger.write(MODULE_NAME, '[INFO] ' + message) }
diff --git a/Project.njsproj b/Project.njsproj
index 265decdd9..826e92943 100644
--- a/Project.njsproj
+++ b/Project.njsproj
@@ -32,7 +32,6 @@
Code
-
Code
@@ -93,9 +92,6 @@
-
-
-