| | |
| | | tradeRequestParam.setClOrdId(clOrdId); |
| | | String sz = InstrumentsWs.getAccountMap(accountName).get(CoinEnums.BUY_CNT_INIT.name()); |
| | | tradeRequestParam.setSz(sz); |
| | | |
| | | WsMapBuild.saveStringToMap(OrderInfoWs.getAccountMap(accountName), "orderPrice", String.valueOf(markPx)); |
| | | return tradeRequestParam; |
| | | } |
| | | |
| | |
| | | if (pingCang != null && avgPx.compareTo(pingCang.getValue()) < 0) { |
| | | log.info("开始卖出平多...卖出平多队列价格大于开仓价格{}>{}", pingCang.getValue(), avgPx); |
| | | // 手续费 |
| | | BigDecimal feeValue = PositionsWs.getAccountMap(positionAccountName).get("fee"); |
| | | BigDecimal feeValue = PositionsWs.getAccountMap(positionAccountName).get("fee").multiply(new BigDecimal(2)); |
| | | //未实现收益 |
| | | BigDecimal uplValue = PositionsWs.getAccountMap(positionAccountName).get("upl"); |
| | | //已实现收益 |
| | |
| | | log.info("开始买入平空...买入平空队列价格小于开仓价格{}<{}", kaiCang.getValue(), avgPx); |
| | | |
| | | // 手续费 |
| | | BigDecimal feeValue = PositionsWs.getAccountMap(positionAccountName).get("fee"); |
| | | BigDecimal feeValue = PositionsWs.getAccountMap(positionAccountName).get("fee").multiply(new BigDecimal("2")); |
| | | //未实现收益 |
| | | BigDecimal uplValue = PositionsWs.getAccountMap(positionAccountName).get("upl"); |
| | | //已实现收益 |