1
This commit is contained in:
@ -497,12 +497,10 @@ func handleFutMainOrderFilled(db *gorm.DB, preOrder *models.LinePreOrder, extOrd
|
||||
orderExt := models.LinePreOrderExt{}
|
||||
db.Model(&orderExt).Where("order_id =?", extOrderId).First(&orderExt)
|
||||
totalNum := getFuturesPositionAvailableQuantity(db, apiInfo, preOrder, tradeSet).Truncate(int32(tradeSet.AmountDigit))
|
||||
price := utility.StrToDecimal(preOrder.Price).Truncate(int32(tradeSet.PriceDigit))
|
||||
|
||||
// 更新订单数量并处理止盈、止损、减仓
|
||||
for _, order := range orders {
|
||||
price := utility.StrToDecimal(order.Price).Truncate(int32(tradeSet.PriceDigit))
|
||||
order.Price = price.String()
|
||||
|
||||
// 更新止盈止损订单数量
|
||||
num := updateOrderQuantity(db, order, preOrder, &orderExt, totalNum, first, tradeSet)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user