change current price from bid to ask
This commit is contained in:
@@ -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