mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
trading: auto set bittrex and bleutrade withdraw tx fee
This commit is contained in:
parent
31441a6c98
commit
2f6d74d90a
2 changed files with 15 additions and 5 deletions
|
@ -22,23 +22,33 @@ function updateRawcoins()
|
|||
|
||||
if (!exchange_get('bittrex', 'disabled')) {
|
||||
$list = bittrex_api_query('public/getcurrencies');
|
||||
if(isset($list->result))
|
||||
if(isset($list->result) && !empty($list->result))
|
||||
{
|
||||
dborun("UPDATE markets SET deleted=true WHERE name='bittrex'");
|
||||
foreach($list->result as $currency)
|
||||
foreach($list->result as $currency) {
|
||||
if ($currency->Currency == 'BTC') {
|
||||
exchange_set('bittrex', 'withdraw_fee_btc', $currency->TxFee);
|
||||
continue;
|
||||
}
|
||||
updateRawCoin('bittrex', $currency->Currency, $currency->CurrencyLong);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!exchange_get('bleutrade', 'disabled')) {
|
||||
$list = bleutrade_api_query('public/getcurrencies');
|
||||
if(isset($list->result))
|
||||
if(isset($list->result) && !empty($list->result))
|
||||
{
|
||||
dborun("UPDATE markets SET deleted=true WHERE name='bleutrade'");
|
||||
foreach($list->result as $currency)
|
||||
foreach($list->result as $currency) {
|
||||
if ($currency->Currency == 'BTC') {
|
||||
exchange_set('bleutrade', 'withdraw_fee_btc', $currency->TxFee);
|
||||
continue;
|
||||
}
|
||||
updateRawCoin('bleutrade', $currency->Currency, $currency->CurrencyLong);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!exchange_get('poloniex', 'disabled')) {
|
||||
$poloniex = new poloniex;
|
||||
|
|
|
@ -236,7 +236,7 @@ function doBittrexTrading($quick=false)
|
|||
}
|
||||
|
||||
$withdraw_min = exchange_get($exchange, 'withdraw_min_btc', EXCH_AUTO_WITHDRAW);
|
||||
$withdraw_fee = exchange_get($exchange, 'withdraw_fee_btc', 0.001);
|
||||
$withdraw_fee = exchange_get($exchange, 'withdraw_fee_btc', 0.0005);
|
||||
if($withdraw_min > 0 && $savebalance->balance >= ($withdraw_min + $withdraw_fee))
|
||||
{
|
||||
// $btcaddr = exchange_get($exchange, 'withdraw_btc_address', YAAMP_BTCADDRESS);
|
||||
|
|
Loading…
Add table
Reference in a new issue