作者 karlet

feat:仓位维护bug

... ... @@ -129,12 +129,12 @@ class CmBroker
$wsDataPos = WsDataPos::TransferBinancePos($value, $this->symbolInfos, function ($symbol) {
return $this->getSymbolSt($symbol);
});
$this->positions[$wsDataPos->symbol . "_" . $wsDataPos->posSide] = $pos;
$this->positions[$wsDataPos->symbol . "_" . $wsDataPos->posSide] = $wsDataPos;
$wsData = new WsData($this->plat, 'pos', $trade = null, $pos = $wsDataPos);
$onData($wsData);
}
foreach ($this->positions as $key => $value) {
if ($value['qty'] == 0) {
if ($value->qty == 0) {
unset($this->positions[$key]);
}
}
... ...