cexio: include btc in orders for the balance

to do like bitstamp...
This commit is contained in:
Tanguy Pruvot 2018-01-25 00:32:38 +01:00
parent a89a0ef4cf
commit 4e5fbb4939
2 changed files with 5 additions and 1 deletions

View file

@ -100,7 +100,7 @@ function getCexIoBalances()
$balances = cexio_api_user('balance');
if (is_array($balances)) {
$b = arraySafeVal($balances, 'BTC');
$savebalance->balance = arraySafeVal($b, 'available');
$savebalance->balance = arraySafeVal($b, 'available',0.) + arraySafeVal($b, 'orders',0.);
$savebalance->save();
}
}

View file

@ -87,6 +87,10 @@ function runExchange($exchangeName=false)
updateBittrexMarkets();
break;
case 'cexio':
getCexIoBalances();
break;
case 'c-cex':
doCCexTrading(true);
updateCCexMarkets();