Post
Topic
Board Altcoin Discussion
Re: Altcoin address widget - is their one ?
by
The_Trader
on 30/01/2022, 20:32:46 UTC

It should be fairly easy if you know basic HTML and javascript:

Code:
let api_url = "https://chainz.cryptoid.info/xp/api.dws?q=getbalance&a=PCN5rFx9ZL3rDMpPAP8KKo5jB3hBbYxC7F"

async function getapi(url) {
    const response = await fetch(url);
    
    var data = await response.json();
    document.getElementById("data").innerHTML = data; // or some code to put up the data on the html
}
getapi(api_url);

If you still got trouble getting it displayed on your page, simply searching for "displaying API data on HTML" should be good to go.

I know a bot which is prob dangerous Smiley

I understand about pulling specific info from arrays like this :
https://bittrex.com/api/v1.1/public/getticker/?market=btc-eth

Using something like this :

Code:
$obj = json_decode($result);

/*
echo"<pre>";
print_r($obj);
echo"</pre>";
*/

echo $obj->result->Bid;

But I have no obj to display/print as it is just the balance i am after

Thanks
TT