This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JSON API --- https://hexdailystats.com/fulldata | |
| // JSON API --- https://hexdailystats.com/livedata | |
| // https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
| // https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
| // NOTE: New rows of historical full data usually get added into database about 20 minutes after 00:00:00 UTC every day | |
| // NOTE: Live data updates every 1 minute | |
| // TEST: Copy and run code with online javascript compiler --- https://jsfiddle.net/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
| // https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
| // https://nomics.com/docs/#operation/getCurrenciesTicker | |
| test(); | |
| async function test(){ | |
| var price = await getPrice(); | |
| console.log("Price: $" + Number(price).toLocaleString(undefined, {minimumFractionDigits:2, maximumFractionDigits:2})); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://developer.twitter.com/en/apply-for-access | |
| const twitterAPI = require('twitter-api-client'); | |
| const imageToBase64 = require('image-to-base64'); | |
| var twitterClient = new twitterAPI.TwitterClient({ | |
| apiKey: "XXXXXXXXXXXXXXXX", | |
| apiSecret: "XXXXXXXXXXXXXXXX", | |
| accessToken: "XXXXXXXXXXXXXXXX", | |
| accessTokenSecret: "XXXXXXXXXXXXXXXX", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
| // https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
| test(); | |
| async function test(){ | |
| var numberOfHolders = await get_numberOfHolders(); | |
| console.log("Total Holders: " + Number(numberOfHolders).toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits:0})); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
| // https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
| test(); | |
| async function test(){ | |
| var day = 622; | |
| var { dailyPayoutHEX, totalTshares, success } = await get_dailyDataUpdate(day); | |
| if (success) { | |
| console.log("Total Tshares: " + Number(totalTshares).toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits:0})); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
| // https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
| test(); | |
| async function test(){ | |
| var blockNumber = await getEthereumBlock(622); | |
| console.log("Ethereum Block Number: " + Number(blockNumber).toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits:0})); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
| // https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
| // https://thegraph.com/legacy-explorer/subgraph/uniswap/uniswap-v2 | |
| // https://thegraph.com/legacy-explorer/subgraph/uniswap/uniswap-v3 | |
| test(); | |
| async function test(){ | |
| var priceUV2 = await getUniswapV2HEXDailyPrice(); | |
| var priceUV3 = await getUniswapV3HEXDailyPrice(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://codeakk.medium.com/hex-development-data-a1b1822446fa | |
| // https://togosh.medium.com/hex-developer-guide-3b018a943a55 | |
| test(); | |
| async function test(){ | |
| var { circulatingSupply, currentHolders } = await get_tokenHoldersData(); | |
| console.log("Circulating Supply: " + Number(circulatingSupply).toLocaleString(undefined, {minimumFractionDigits:0, maximumFractionDigits:0})); | |
| console.log("Current Holders: " + Number(currentHolders).toLocaleString(undefined)); | |
| } |