Finished getBalance method for the API