mirror of
https://github.com/dennisreimann/stacking-sats-kraken.git
synced 2026-08-13 12:33:45 +02:00
ommit api call (#11)
This commit is contained in:
parent
0029d8ff3a
commit
f03876f875
1 changed files with 5 additions and 0 deletions
|
|
@ -38,6 +38,11 @@ module.exports = async (kraken, validate, { getEnv, getEnvOpt }) => {
|
|||
console.log('📈 Ask:', ask, fiat)
|
||||
console.log('📉 Bid:', bid, fiat, '\n')
|
||||
|
||||
if (parseFloat(fiatBalance) < parseFloat(amount)) {
|
||||
console.log('❌ Insufficient funds')
|
||||
return
|
||||
}
|
||||
|
||||
// Place order
|
||||
const details = { pair, type: 'buy', ordertype, price, volume }
|
||||
if (validate) details.validate = true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue