This commit is contained in:
Bitcarrot
2021-10-07 06:16:52 +08:00
parent f23176fd80
commit b4cb943a91
8 changed files with 2 additions and 242 deletions

View File

@@ -1,7 +1,6 @@
const axios = require('axios')
const fs = require('fs');
module.exports = {
bfx: async function() {
const btcDataURL = "https://api-pub.bitfinex.com/v2/ticker/tBTCUSD"
@@ -10,7 +9,7 @@ module.exports = {
//console.log(data[6])
const satDenominator = 100000000
const hkdrate = 0.1287
const hkdrate = 0.1287 // approximate rate
btcLastPrice = data[6]
const sathkd = Math.round((1 / btcLastPrice) * satDenominator * hkdrate)
//console.log("bitfinex last price: ", btcLastPrice, "current satHKD: ", sathkd)