| | |
| | | ){ |
| | | Map<String, String> accountMap = getAccountMap(accountName); |
| | | //记录成交均价 |
| | | if (accountMap.get("orderPrice") == null){ |
| | | WsMapBuild.saveStringToMap(accountMap, "orderPrice",avgPx); |
| | | } |
| | | log.info("成交均价: {}", avgPx); |
| | | WsMapBuild.saveStringToMap(accountMap, "orderPrice",avgPx); |
| | | |
| | | WsMapBuild.saveStringToMap(TradeOrderWs.getAccountMap(accountName), "state", CoinEnums.ORDER_LIVE.getCode()); |
| | | |
| | | //保存上一个网格信息 |
| | | WangGeListEnum gridByPrice = WangGeListEnum.getGridByPrice(new BigDecimal(avgPx)); |
| | | Map<String, String> instrumentsMap = InstrumentsWs.getAccountMap(accountName); |
| | | WsMapBuild.saveStringToMap(instrumentsMap, CoinEnums.WANG_GE_OLD.name(), gridByPrice.name()); |
| | | if (gridByPrice != null){ |
| | | log.info("保存上一个网格: {}", gridByPrice.name()); |
| | | Map<String, String> instrumentsMap = InstrumentsWs.getAccountMap(accountName); |
| | | WsMapBuild.saveStringToMap(instrumentsMap, CoinEnums.WANG_GE_OLD.name(), gridByPrice.name()); |
| | | } |
| | | |
| | | // 使用账号特定的Map |
| | | String positionAccountName = PositionsWs.initAccountName(accountName, side); |