作者 karlet

feat:杠杆获取分开处理

... ... @@ -307,9 +307,20 @@ class CmBroker
public function getLevers()
{
$levers = $this->exBroker->getAllLevers();
if ($this->plat == self::PLAT_OKX || $this->plat == self::PLAT_BINANCE) {
if ($this->plat == self::PLAT_OKX) {
$resNew = [];
foreach ($levers as $key => $value) {
$symbol = $this->getSymbolSt($key); //转换为标准交易对
$resNew[$symbol] = $value;
}
$levers = $resNew;
}
if ($this->plat == self::PLAT_BINANCE) {
$resNew = [];
foreach ($levers as $key => $value) {
if (!str_ends_with($key, 'USDT')) {
continue;
}
$symbol = $this->getSymbolSt($key); //转换为标准交易对
$resNew[$symbol] = $value;
}
... ...