By Laysense Insight Global
BinanceAPI Status: msg.' '.round($response[1]*1000,2).'ms'); $maininfo=apiGet('https://binanceapi.mirrorsite.eu.org/bapi/lending/v1/friendly/launchpool/project/listV3?page=1')[0]; $coininfo=$maininfo->data->tracking; if(!isset($coininfo)||$coininfo==[]||$coininfo==''){ die('目前没有正在开展的新币挖矿'); }else{ $coininfo=$coininfo[0]; } if($coininfo->projects[0]->asset=='FDUSD'&&isset($coininfo->projects[1])&&$coininfo->projects[1]->asset=='BNB'){ $detail['fdusd']=$coininfo->projects[0]; $detail['bnb']=$coininfo->projects[1]; }elseif(isset($coininfo->projects[1])){ $detail['fdusd']=$coininfo->projects[1]; $detail['bnb']=$coininfo->projects[0]; }else{ $detail['bnb']=$coininfo->projects[0]; #$detail['fdusd']=$coininfo->projects[1]; } $ratelist=apiGet('https://binanceapi.mirrorsite.eu.org/bapi/margin/v1/friendly/margin/asset/all'); $bnbinfo=array(); $bnbinfo['price']=apiGet('https://binanceapi.mirrorsite.eu.org/api/v3/avgPrice?symbol=BNBUSDT')[0]->price; $bnbinfo['amount']=$detail['bnb']->totalInvestAmount; $bnbinfo['new']=$detail['bnb']->rebateTotalAmount; $bnbinfo['rad']=$detail['bnb']->shareRatio; $bnbinfo['bn_rate']=apiGet('https://binanceapi.mirrorsite.eu.org/sapi/v1/margin/crossMarginData'.sign('coin=BNB'))[0][0]->dailyInterest; $bnbinfo['venus_rate']=(apiGet('https://api.venus.io/markets/?chainId=56&underlyingSymbol=BNB')[0]->result[0]->borrowApy)/36500; $bnbinfo['rate']=max($bnbinfo['bn_rate'],$bnbinfo['venus_rate']); $bnbinfo['w_rate']=min($bnbinfo['bn_rate'],$bnbinfo['venus_rate']); $fdinfo['amount']=$detail['fdusd']->totalInvestAmount; $fdinfo['new']=$detail['fdusd']->rebateTotalAmount; $fdinfo['rad']=$detail['fdusd']->shareRatio; $fdinfo['bn_rate']=apiGet('https://binanceapi.mirrorsite.eu.org/sapi/v1/simple-earn/flexible/list'.sign('asset=FDUSD'))[0]->rows[0]->latestAnnualPercentageRate; $fdinfo['venus_rate']=(apiGet('https://api.venus.io/markets/?chainId=56&underlyingSymbol=FDUSD')[0]->result[0]->borrowApy)/100; $fdinfo['rate']=round(max($fdinfo['bn_rate'],$fdinfo['venus_rate'])/365,5); $fdinfo['w_rate']=round(min($fdinfo['bn_rate'],$fdinfo['venus_rate'])/365,5); #$best=($bnbinfo['amount']*$bnbinfo['price']*$bnbinfo['rate']*$coininfo->duration)/$bnbinfo['new']; #$worst=(($bnbinfo['amount']*$bnbinfo['price']*$bnbinfo['rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$bnbinfo['rad']+(($fdinfo['amount']*$fdinfo['rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$fdinfo['rad']; $best=(($bnbinfo['amount']*$bnbinfo['price']*$bnbinfo['rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$bnbinfo['rad']+(($fdinfo['amount']*$fdinfo['rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$fdinfo['rad']; $worst=(($bnbinfo['amount']*$bnbinfo['price']*$bnbinfo['w_rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$bnbinfo['rad']+(($fdinfo['amount']*$fdinfo['w_rate']*$coininfo->duration)/$coininfo->rebateTotalAmount)*$fdinfo['rad']; ?>