|
...
|
...
|
@@ -256,4 +256,17 @@ class CmBroker |
|
|
|
$symbol = $this->getSymbolOri($symbol, $this->plat);
|
|
|
|
$this->exBroker->setLever($symbol, $lever);
|
|
|
|
}
|
|
|
|
//查询获取全部持仓
|
|
|
|
public function getAllPos(): array
|
|
|
|
{
|
|
|
|
$positions = $this->exBroker->getAllPos();
|
|
|
|
$newPositions = [];
|
|
|
|
foreach ($positions as $key => $value) {
|
|
|
|
$item = Pos::transferOkxPos($value, $this->symbolInfos, function ($symbol) {
|
|
|
|
return $this->getSymbolSt($symbol);
|
|
|
|
});
|
|
|
|
$newPositions[$item->symbol . "_" . $item->posSide] = $item;
|
|
|
|
}
|
|
|
|
return $newPositions;
|
|
|
|
}
|
|
|
|
} |
...
|
...
|
|