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

send push messages only if in live or paper mode (#605) #607

Merged
merged 1 commit into from
Oct 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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