devyani
devyani

Reputation: 21

Reading Waves Wallet Balance from waves testnet

How do I read my testnode waves wallet balance from my PHP program ?

which URL should be used for reading from testnet nodes

Able to read the balance in live mode.

For live waves balance checking, I use the following cURL code:

$opts = [
CURLOPT_URL => 
'https://nodes.wavesplatform.com/assets/balance/<<wallet address>>',
CURLOPT_RETURNTRANSFER => true,
];


$response = curl_exec($curl);
curl_close($curl);
$balance= json_decode($response, true);

echo "This account has ".$balance[balance]/100000000;

Upvotes: 1

Views: 86

Answers (1)

KardanovIR
KardanovIR

Reputation: 492

You use nodes.wavesplatform.com, which is a nodes pool for MAINNET. URL for testnet is testnodes.wavesnodes.com

Upvotes: 1

Related Questions