作者 karlet

feat:更新资金费获取

@@ -365,7 +365,8 @@ class CmBroker @@ -365,7 +365,8 @@ class CmBroker
365 { 365 {
366 $symbol = str_replace('-USDT-SWAP', 'USDT', $symbol); 366 $symbol = str_replace('-USDT-SWAP', 'USDT', $symbol);
367 $symbol = str_replace('-USDC-SWAP', 'USDC', $symbol); 367 $symbol = str_replace('-USDC-SWAP', 'USDC', $symbol);
368 - if (preg_match('/^[A-Z0-9]+USD[CT]$/', $symbol)) { 368 + $symbol = str_replace('-USD-SWAP', 'USD', $symbol);
  369 + if (preg_match('/^[A-Z0-9]+USD[CT]*$/', $symbol)) {
369 if ($this->plat == self::PLAT_BINANCE || $this->plat == self::PLAT_BYBIT) { 370 if ($this->plat == self::PLAT_BINANCE || $this->plat == self::PLAT_BYBIT) {
370 $num = SymbolInfo::extractNumber($symbol); 371 $num = SymbolInfo::extractNumber($symbol);
371 $symbol = str_replace($num, '', $symbol); 372 $symbol = str_replace($num, '', $symbol);
@@ -767,10 +768,10 @@ class CmBroker @@ -767,10 +768,10 @@ class CmBroker
767 { 768 {
768 $data = []; 769 $data = [];
769 if ($this->plat == self::PLAT_OKX) { 770 if ($this->plat == self::PLAT_OKX) {
770 - foreach ($this->symbolInfos as $key => $value) {  
771 - $res = $this->exBroker->getPremium($value->symbolOri); 771 + $res = $this->exBroker->getPremium("ANY");
772 if (isset($res['data'])) { 772 if (isset($res['data'])) {
773 - $prem = Premium::transferOkx($res['data'][0], function ($symbol) { 773 + foreach ($res['data'] as $key => $value) {
  774 + $prem = Premium::transferOkx($value, function ($symbol) {
774 return $this->getSymbolSt($symbol); 775 return $this->getSymbolSt($symbol);
775 }); 776 });
776 $data[$prem->symbol] = $prem; 777 $data[$prem->symbol] = $prem;