pool/web/yaamp/core/trading/banx_trading.php
Tanguy Pruvot bc3ae3b44f Restore banx exchange, reopening..
site will also be renamed later... cryptomic.com

This reverts commit e669e1cc05.
2016-03-19 07:40:57 +01:00

26 lines
570 B
PHP

<?php
function doBanxTrading($quick=false)
{
$flushall = rand(0, 4) == 0;
if($quick) $flushall = false;
$balances = banx_api_user('account/getbalances');
if(!$balances || !isset($balances->result) || !$balances->success) return;
$savebalance = getdbosql('db_balances', "name='banx'");
if (!is_object($savebalance)) return;
$savebalance->balance = 0;
foreach($balances->result as $balance)
{
if($balance->currency == 'BTC') {
$savebalance->balance = $balance->available;
$savebalance->save();
break;
}
}
if (!YAAMP_ALLOW_EXCHANGE) return;
}