作者 karlet

feat:更新资金费获取

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