php-binance-api.php
public function balances($priceData = false)
    {
        if (is_array($priceData) === false) {
            $priceData = false;
        }

        $account = $this->httpRequest("v3/account", "GET", [], true);

        if (is_array($account) === false) {
            echo "Error: unable to fetch your account details" . PHP_EOL;
        }

        if (isset($account['balances']) === false) {
            echo "Error: your balances were empty or unset" . PHP_EOL;
        }

        return $this->balanceData($account, $priceData);
    }
public function balances($priceData = false)
    {
        if (is_array($priceData) === false) {
            $priceData = false;
        }

        $account = $this->httpRequest("v3/account", "GET", [], true);

        if (is_array($account) === false) {
            echo "Error: unable to fetch your account details" . PHP_EOL;
        }

        if (isset($account['balances']) === false) {
            echo "Error: your balances were empty or unset" . PHP_EOL;
        }

        return $this->balanceData($account, $priceData);
    }
public function balances ( $ priceData = false ) { if ( is_array ( $ priceData ) === false ) { $ priceData = false ; } $ account = $ this -> httpRequest ( "v3/account" , "GET" , [ ] , true ) ; if ( is_array ( $ account ) === false ) { echo "Error: unable to fetch your account details" . PHP_EOL ; } if ( isset ( $ account [ 'balances' ] ) === false ) { echo "Error: your balances were empty or unset" . PHP_EOL ; } return $ this -> balanceData ( $ account , $ priceData ) ; }
balances get balances for the account assets

$balances = $api->balances($ticker);

@param bool $priceData array of the symbols balances are required for
@return array with error message or array of balances
@throws \Exception
balances get balances for the account assets