From fb1e5b96c9a2e891ffd8a0edb0fb39dd717c5045 Mon Sep 17 00:00:00 2001 From: william Date: Fri, 20 Nov 2020 10:14:29 +0100 Subject: [PATCH] change current price from bid to ask --- commands/stack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/stack.js b/commands/stack.js index 8dca565..8a4c4ec 100644 --- a/commands/stack.js +++ b/commands/stack.js @@ -13,7 +13,7 @@ module.exports = async (kraken, validate, getEnv) => { const [{ a: [a], b: [b] }] = Object.values(ticker) const ask = parseFloat(a) const bid = parseFloat(b) - const price = bid + const price = ask // Calculate volume and adjust precision const volume = (amount / price).toFixed(8)