ommit api call (#11)
This commit is contained in:
@@ -38,6 +38,11 @@ module.exports = async (kraken, validate, { getEnv, getEnvOpt }) => {
|
|||||||
console.log('📈 Ask:', ask, fiat)
|
console.log('📈 Ask:', ask, fiat)
|
||||||
console.log('📉 Bid:', bid, fiat, '\n')
|
console.log('📉 Bid:', bid, fiat, '\n')
|
||||||
|
|
||||||
|
if (parseFloat(fiatBalance) < parseFloat(amount)) {
|
||||||
|
console.log('❌ Insufficient funds')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Place order
|
// Place order
|
||||||
const details = { pair, type: 'buy', ordertype, price, volume }
|
const details = { pair, type: 'buy', ordertype, price, volume }
|
||||||
if (validate) details.validate = true
|
if (validate) details.validate = true
|
||||||
|
|||||||
Reference in New Issue
Block a user