change current price from bid to ask
This commit is contained in:
1 parent
57435f0de6
commit
fb1e5b96c9
1 file changed
+1
-1
+1
-1
@@ -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)
|
||||||
|
|||||||
Reference in new issue
Block a user