Post
Topic
Board Announcements (Altcoins)
Re: NXT :: descendant of Bitcoin - Updated Information
by
gimre
on 27/01/2014, 00:15:24 UTC
Does anyone know how I can call an account balance in PHP?

I need something like...

Code:

$TokenResponse = json_decode(file_get_contents("http://localhost:7874/nxt?requestType=decodeToken&website=" . $rand . "&token=" . $token"));

$balance = json_decode(file_get_contents("http://localhost:7874/nxt?requestType=getBalance&account=". $TokenResponse[account]"));


pass account ID not token.
Code:
http://localhost:7874/nxt?requestType=getBalance&account=6669070404060812420

remember results are "multiplied by 100"

also, you'll probably be interested more in guaranted balance:
Code:
http://localhost:7874/nxt?requestType=getGuaranteedBalance&account=6669070404060812420&numberOfConfirmations=10