Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksei Lebedev committed Mar 13, 2020
1 parent 6d54540 commit 4b5f5c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Supported exchanges (more in progress):

* [IDCM](https://idcm.io/invitation/receive?code=LM5510&lang=en)

Available commands: ask a bot with `/help` command. Read more: [M]().
Available commands: ask a bot with `/help` command. Read more: [Crypto trading & Market making bot in ADAMANT](https://medium.com/adamant-im/crypto-trading-market-making-bot-in-adamant-82fa48b78f51).

# Installation

Expand Down
4 changes: 2 additions & 2 deletions modules/commandTxs.js
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ Ask: ${exchangeRates.ask.toFixed(8)}, bid: ${exchangeRates.bid.toFixed(8)}, spre
let orderStats = await getStats(true, true, false, "mm", pair);

if (orderStats) {
if (orderStats.coin1AmountTotalAllCount === 0) {
if (orderStats === 'Empty' || orderStats.coin1AmountTotalAllCount === 0) {
output += "\n\n" + `There were no Market making orders for ${pair} all time.`
} else {
output += "\n\n" + `Market making stats for ${pair} pair:` + "\n";
Expand All @@ -649,7 +649,7 @@ Ask: ${exchangeRates.ask.toFixed(8)}, bid: ${exchangeRates.bid.toFixed(8)}, spre
output += '.';
}
} else {
output += `Unable to get Market making stats for ${pair}.`;
output += "\n\n" + `Unable to get Market making stats for ${pair}.`;
}

return {
Expand Down
8 changes: 6 additions & 2 deletions trade/orderStats.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ const db = require('../modules/DB');
const $u = require('../helpers/utils');

module.exports = async (isExecuted, isProcessed, isCancelled, purpose, pair) => {
const {ordersDb} = db;


const {ordersDb} = db;

const day = $u.unix() - 24 * 3600 * 1000;
const month = $u.unix() - 30 * 24 * 3600 * 1000;

Expand Down Expand Up @@ -104,6 +105,9 @@ module.exports = async (isExecuted, isProcessed, isCancelled, purpose, pair) =>
}}
]));

if (!stats[0])
stats[0] = 'Empty';

return stats[0];

};
Expand Down

0 comments on commit 4b5f5c4

Please sign in to comment.