change current price from bid to ask

This commit is contained in:
william
2020-11-20 10:14:29 +01:00
parent 57435f0de6
commit fb1e5b96c9

View File

@@ -13,7 +13,7 @@ module.exports = async (kraken, validate, getEnv) => {
const [{ a: [a], b: [b] }] = Object.values(ticker) const [{ a: [a], b: [b] }] = Object.values(ticker)
const ask = parseFloat(a) const ask = parseFloat(a)
const bid = parseFloat(b) const bid = parseFloat(b)
const price = bid const price = ask
// Calculate volume and adjust precision // Calculate volume and adjust precision
const volume = (amount / price).toFixed(8) const volume = (amount / price).toFixed(8)