作者 karlet

feat:pos bn转换修复

@@ -70,9 +70,9 @@ class Pos @@ -70,9 +70,9 @@ class Pos
70 $posSide = strtoupper($pos['positionSide']); 70 $posSide = strtoupper($pos['positionSide']);
71 $qty = abs($pos['positionAmt']); 71 $qty = abs($pos['positionAmt']);
72 $lot = round($qty / $symbolInfo->ctVal, $symbolInfo->qtyPrec); 72 $lot = round($qty / $symbolInfo->ctVal, $symbolInfo->qtyPrec);
73 - $avgPrice = $pos['entryPrice'];  
74 - $pnl = $pos['unRealizedProfit'];  
75 - $lever = 0; 73 + $avgPrice = -1;
  74 + $pnl = $pos['unrealizedProfit'];
  75 + $lever = -1;
76 $margin = $pos['initialMargin']; 76 $margin = $pos['initialMargin'];
77 return new Pos($symbol, $posSide, $qty, $lot, $avgPrice, $pnl, $lever, $margin); 77 return new Pos($symbol, $posSide, $qty, $lot, $avgPrice, $pnl, $lever, $margin);
78 } 78 }