作者 karlet

feat:杠杆获取分开处理

@@ -307,9 +307,20 @@ class CmBroker @@ -307,9 +307,20 @@ class CmBroker
307 public function getLevers() 307 public function getLevers()
308 { 308 {
309 $levers = $this->exBroker->getAllLevers(); 309 $levers = $this->exBroker->getAllLevers();
310 - if ($this->plat == self::PLAT_OKX || $this->plat == self::PLAT_BINANCE) { 310 + if ($this->plat == self::PLAT_OKX) {
  311 + $resNew = [];
  312 + foreach ($levers as $key => $value) {
  313 + $symbol = $this->getSymbolSt($key); //转换为标准交易对
  314 + $resNew[$symbol] = $value;
  315 + }
  316 + $levers = $resNew;
  317 + }
  318 + if ($this->plat == self::PLAT_BINANCE) {
311 $resNew = []; 319 $resNew = [];
312 foreach ($levers as $key => $value) { 320 foreach ($levers as $key => $value) {
  321 + if (!str_ends_with($key, 'USDT')) {
  322 + continue;
  323 + }
313 $symbol = $this->getSymbolSt($key); //转换为标准交易对 324 $symbol = $this->getSymbolSt($key); //转换为标准交易对
314 $resNew[$symbol] = $value; 325 $resNew[$symbol] = $value;
315 } 326 }