mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
bittrex cleanup + c11 sample conf
This commit is contained in:
parent
4cce4a3739
commit
13d56d462d
2 changed files with 21 additions and 18 deletions
16
stratum/config.sample/c11.conf
Normal file
16
stratum/config.sample/c11.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
[TCP]
|
||||
server = yaamp.com
|
||||
port = 3573
|
||||
password = tu8tu5
|
||||
|
||||
[SQL]
|
||||
host = yaampdb
|
||||
database = yaamp
|
||||
username = root
|
||||
password = patofpaq
|
||||
|
||||
[STRATUM]
|
||||
algo = c11
|
||||
difficulty = 0.016
|
||||
max_ttf = 40000
|
||||
|
|
@ -202,7 +202,7 @@ function updateBleutradeMarkets()
|
|||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
function updateBittrexMarkets()
|
||||
function updateBittrexMarkets($force = false)
|
||||
{
|
||||
$exchange = 'bittrex';
|
||||
$list = bittrex_api_query('public/getcurrencies');
|
||||
|
@ -215,25 +215,12 @@ function updateBittrexMarkets()
|
|||
$coin = getdbosql('db_coins', "symbol='$currency->Currency'");
|
||||
if(!$coin || !$coin->installed) continue;
|
||||
|
||||
$market = getdbosql('db_markets', "coinid=$coin->id and name='bittrex'");
|
||||
if(!$market)
|
||||
{
|
||||
$market = new db_markets;
|
||||
$market->coinid = $coin->id;
|
||||
$market->name = 'bittrex';
|
||||
}
|
||||
$market = getdbosql('db_markets', "coinid=$coin->id and name='$exchange'");
|
||||
if(!$market) continue;
|
||||
|
||||
$market->txfee = $currency->TxFee;
|
||||
$market->message = $currency->Notice;
|
||||
|
||||
if($coin->symbol == 'EGMA')
|
||||
{
|
||||
$market->price = 0.00000001;
|
||||
$market->save();
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!$currency->IsActive)
|
||||
{
|
||||
$market->price = 0;
|
||||
|
@ -252,7 +239,7 @@ function updateBittrexMarkets()
|
|||
if(!empty(EXCH_BITTREX_KEY))
|
||||
{
|
||||
$last_checked = cache()->get($exchange.'-deposit_address-check-'.$coin->symbol);
|
||||
if(empty($market->deposit_address) && !$last_checked)
|
||||
if($force || (empty($market->deposit_address) && !$last_checked))
|
||||
{
|
||||
$address = bittrex_api_query('account/getdepositaddress', "¤cy={$coin->symbol}");
|
||||
if(is_object($address) && isset($address->result)) {
|
||||
|
@ -263,7 +250,7 @@ function updateBittrexMarkets()
|
|||
}
|
||||
}
|
||||
}
|
||||
cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 24*3600);
|
||||
cache()->set($exchange.'-deposit_address-check-'.$coin->symbol, time(), 12*3600);
|
||||
}
|
||||
|
||||
$price2 = ($ticker->result->Bid+$ticker->result->Ask)/2;
|
||||
|
|
Loading…
Add table
Reference in a new issue