| | |
| | | // 保证金 |
| | | BigDecimal bondAmount = CalculateUtil.getBondAmount(holdOrderEntity.getOpeningPrice(), lotNumber, closeCnt, holdOrderEntity.getLeverRatio()); |
| | | |
| | | BigDecimal rewardRatio = profitOrLoss.divide(bondAmount, 8, BigDecimal.ROUND_DOWN); |
| | | |
| | | log.info("bondAmount:{}", bondAmount); |
| | | // 平仓手续费 TODO 可能需要修复手续费 |
| | | BigDecimal fee = BigDecimal.ZERO; |
| | |
| | | contractOrderEntity.setRewardAmount(profitOrLoss); |
| | | contractOrderEntity.setBondAmount(bondAmount); |
| | | contractOrderEntity.setClosingFeeAmount(fee); |
| | | contractOrderEntity.setRewardRatio(rewardRatio); |
| | | contractOrderDao.insert(contractOrderEntity); |
| | | |
| | | if (holdOrderEntity.getSymbolCntSale() != 0) { |