While checking the Coinbase address balance, the expected outcome might not work due to the shuffling of the bitcoins in the Coinbase which shuffles the bitcoin to different addresses internally. Using the account is the only realistic way to get the precise balance. Please use:-
<?php
$accountId = '<Account Id>'; $account =
$client->getAccount($accountId);
$balance = $account->getBalance();
$btc = $balance->getAmount();