Created
February 17, 2021 16:39
-
-
Save metaspartan/32b11ebd4b54d18f5778dc33b59ae872 to your computer and use it in GitHub Desktop.
denarius.io prices
This file contains 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
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> | |
<script> | |
fetch('https://api.coingecko.com/api/v3/coins/denarius?tickers=true&market_data=true&community_data=true&developer_data=true&sparkline=false') | |
.then((response) => { | |
return response.text(); | |
}) | |
.then((myContent) => { | |
var market = JSON.parse(myContent); | |
var info = market["market_data"]["current_price"]["usd"]; | |
document.getElementById('dprice').innerHTML = info.toFixed(2); | |
}); | |
</script> | |
<script> | |
fetch('https://api.coingecko.com/api/v3/coins/denarius?tickers=true&market_data=true&community_data=true&developer_data=true&sparkline=false') | |
.then((response) => { | |
return response.text(); | |
}) | |
.then((myContent) => { | |
var market = JSON.parse(myContent); | |
var info = market["market_data"]["market_cap"]["usd"]; | |
document.getElementById('dmc').innerHTML = "$"+info; | |
}); | |
</script> | |
<script> | |
fetch('https://api.coingecko.com/api/v3/coins/denarius?tickers=true&market_data=true&community_data=true&developer_data=true&sparkline=false') | |
.then((response) => { | |
return response.text(); | |
}) | |
.then((myContent) => { | |
var market = JSON.parse(myContent); | |
var info = market["market_data"]["circulating_supply"]; | |
document.getElementById('dcount').innerHTML = info; | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment