Bitcoin Forum
May 02, 2024, 03:03:18 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Altcoin address widget - is their one ?  (Read 79 times)
The_Trader (OP)
Member
**
Offline Offline

Activity: 180
Merit: 52


View Profile
January 29, 2022, 12:21:57 PM
 #1

I am looking for either a widget that can take info from an altcoin address.... Example it will show balance of a specific address on my website (html/php).
I don't mind either a pre made widget or raw code.

Thanks
TT
1714662198
Hero Member
*
Offline Offline

Posts: 1714662198

View Profile Personal Message (Offline)

Ignore
1714662198
Reply with quote  #2

1714662198
Report to moderator
"With e-currency based on cryptographic proof, without the need to trust a third party middleman, money can be secure and transactions effortless." -- Satoshi
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
noorman0
Hero Member
*****
Offline Offline

Activity: 1764
Merit: 694


[Nope]No hype delivers more than hope


View Profile WWW
January 29, 2022, 01:10:38 PM
 #2

Just found this website. On their github repo it is explained that it supports multiple coins. You can find the preview of the widget on the main web page.

Hopefully meet your expectations.

This space for rent.
Available in mid January 2024 - PM me
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
January 29, 2022, 01:22:01 PM
 #3

I dunno which particular one, but the above suggestion is worth a try if it still works. Anyway, I think if you want to go the raw option, acquiring the data from Blockhair API might be good to go: https://blockchair.com/api/docs#link_300, see that link, you can configure the option to meet your needs. But do note that it is limited only to a few altcoins that are available on the API.
Stalker22
Legendary
*
Offline Offline

Activity: 1498
Merit: 1358



View Profile
January 29, 2022, 05:41:36 PM
 #4

I am looking for either a widget that can take info from an altcoin address.... Example it will show balance of a specific address on my website (html/php).
I don't mind either a pre made widget or raw code.

Thanks
TT

It would be helpful if you could specify for which altcoin need information on your website. I doubt there is a universal solution.
Also, if you have programming skills in PHP or some other language, you can access APIs from different blockchain explorers, for example, check out the Etherscan documentation here.


█████████████████████████
██
█████▀▀███████▀▀███████
█████▀░░▄███████▄░░▀█████
██▀░░██████▀░▀████░░▀██
██▀░░▀▀▀████████████░░▀██
██░░█▄████▀▀███▀█████░░██
██░░███▄▄███████▀▀███░░██
██░░█████████████████░░██
██▄░░████▄▄██████▄▄█░░▄██
██▄░░██████▄░░████░░▄██
█████▄░░▀███▌░░▐▀░░▄█████
███████▄▄███████▄▄███████
█████████████████████████
.
.ROOBET 2.0..██████.IIIIIFASTER & SLEEKER.██████.
|

█▄█
▀█▀
████▄▄██████▄▄████
█▄███▀█░░█████░░█▀███▄█
▀█▄▄░▐█████████▌▄▄█▀
██▄▄█████████▄▄████▌
██████▄▄████████
█▀▀████████████████
██████
█████████████
██
█▀▀██████████████
▀▀▀███████████▀▀▀▀
|.
    PLAY NOW    
The_Trader (OP)
Member
**
Offline Offline

Activity: 180
Merit: 52


View Profile
January 30, 2022, 07:49:18 PM
 #5

I am looking for either a widget that can take info from an altcoin address.... Example it will show balance of a specific address on my website (html/php).
I don't mind either a pre made widget or raw code.

Thanks
TT

It would be helpful if you could specify for which altcoin need information on your website. I doubt there is a universal solution.
Also, if you have programming skills in PHP or some other language, you can access APIs from different blockchain explorers, for example, check out the Etherscan documentation here.



I am trying to set up a webpage to monitor my masternodes balances but I am having trouble (usual story)

Any idea how I would display this api result on my page ?

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

And thanks for your replies Smiley

TT
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
January 30, 2022, 08:07:47 PM
 #6


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.
The_Trader (OP)
Member
**
Offline Offline

Activity: 180
Merit: 52


View Profile
January 30, 2022, 08:32:46 PM
 #7


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 bit 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
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
January 30, 2022, 09:04:21 PM
Merited by Stalker22 (1)
 #8

I don't know much about PHP.

You should just try around printing the variable of the retrieved API URL and then suits it to what/how you want to display it. The API you refer to is not a JSON file so I think you didn't have to parse it.

Try to echo the $result, given $result is the retrieved payload from https://chainz.cryptoid.info/xp/api.dws?q=getbalance&a=PCN5rFx9ZL3rDMpPAP8KKo5jB3hBbYxC7F
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!