Where is the BTC (or USDT) estimated value in balance() ?
tahola opened this issue · comments
Hello,
I am using this code https://github.com/jaggedsoft/php-binance-api/blob/master/examples/balances.php to get the total estimated value of the account but I dont see it, I just see the token's list and their value :
array:458 [▼
"BTC" => array:4 [▶]
"LTC" => array:4 [▶]
"ETH" => array:4 [▶]
"NEO" => array:4 [▶]
"BNB" => array:4 [▶]
"QTUM" => array:4 [▶]
Its the same when I am using ->account(), I missed something or I have to do a sum of all the entries ?
Thank you
same issue here
Hello,
If I understood correctly, your issue is that every currency btcValue / btcTotal
fields were equals to 0 ?
If yes, it's totally normal, to populate these fields, you have to pass prices references to the balances
function.
You could try like this and tell me if you still get an unwanted result
$api = new \Binance\API('./config.json'); // Config.json is where testnet credentials are stored
$prices = $api->prices();
$balances = $api->balances($prices);
print_r($balances);