Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Commit

Permalink
send push messages only if in live or paper mode (#605) (#607)
Browse files Browse the repository at this point in the history
this commit fixes #605
  • Loading branch information
emabo authored and DeviaVir committed Oct 11, 2017
1 parent b8296a7 commit d274f03
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,9 @@ module.exports = function container (get, set, clear) {
}, c.wait_for_settlement)
}
else {
notify.pushMessage('Buy', 'placing buy order at ' + fc(price) + ', ' + fc(quote.bid - Number(price)) + ' under best bid\n')
if (so.mode === 'live' || so.mode === 'paper') {
notify.pushMessage('Buy', 'placing buy order at ' + fc(price) + ', ' + fc(quote.bid - Number(price)) + ' under best bid\n')
}
doOrder()
}
}
Expand Down Expand Up @@ -476,7 +478,9 @@ module.exports = function container (get, set, clear) {
}, c.wait_for_settlement)
}
else {
notify.pushMessage('Sell', 'placing sell order at ' + fc(price) + ', ' + fc(Number(price) - quote.bid) + ' over best ask\n')
if (so.mode === 'live' || so.mode === 'paper') {
notify.pushMessage('Sell', 'placing sell order at ' + fc(price) + ', ' + fc(Number(price) - quote.bid) + ' over best ask\n')
}
doOrder()
}
}
Expand Down

0 comments on commit d274f03

Please # to comment.