| | |
| | | // 市价 |
| | | if (coinsCoinsOrder.getEntrustType() == 1) { |
| | | // 开多 |
| | | OrderModel model = new OrderModel(contractHoldOrderEntity.getId(), 6, contractHoldOrderEntity.getForceClosingPrice().toPlainString(), coinsCoinsOrder.getSymbol(), 1); |
| | | OrderModel model = new OrderModel(contractHoldOrderEntity.getId(), 6, contractHoldOrderEntity.getForceClosingPrice().setScale(8, RoundingMode.HALF_UP).toPlainString(), coinsCoinsOrder.getSymbol(), 1); |
| | | producer.sendPriceOperate(JSONObject.toJSONString(model)); |
| | | } else { |
| | | // 开空 |
| | | OrderModel model = new OrderModel(contractHoldOrderEntity.getId(), 7, contractHoldOrderEntity.getForceClosingPrice().toPlainString(), coinsCoinsOrder.getSymbol(), 1); |
| | | OrderModel model = new OrderModel(contractHoldOrderEntity.getId(), 7, contractHoldOrderEntity.getForceClosingPrice().setScale(8, RoundingMode.HALF_UP).toPlainString(), coinsCoinsOrder.getSymbol(), 1); |
| | | producer.sendPriceOperate(JSONObject.toJSONString(model)); |
| | | } |
| | | // 扣除手续费 |