| | |
| | | */ |
| | | @Override |
| | | public String caoZuo() { |
| | | log.info("开始执行操作CaoZuoServiceImpl......"); |
| | | String state = (String) redisUtils.get(instrumentsStateKey); |
| | | log.info("开始执行操作CaoZuoServiceImpl......{}",state); |
| | | |
| | | // 获取合约执行操作状态 |
| | | String state = (String) redisUtils.get(instrumentsStateKey); |
| | | String outStr = (String) redisUtils.get(instrumentsOutKey); |
| | | if (OrderParamEnums.OUT_YES.getValue().equals(outStr) && OrderParamEnums.STATE_3.getValue().equals(state)){ |
| | | log.error("止损过了......冷静一下,等待下次入场......"); |
| | |
| | | |
| | | String uplStr = (String) redisUtils.get(positionsUplKey); |
| | | //可使用的总保证金 |
| | | String cashBalStrKey = AccountWs.ACCOUNTWS_CHANNEL + ":" + CoinEnums.USDT.getCode() + ":cashBalStr"; |
| | | String cashBalStrKey = AccountWs.ACCOUNTWS_CHANNEL + ":" + CoinEnums.USDT.getCode() + ":cashBal"; |
| | | String cashBalStr = (String) redisUtils.get(cashBalStrKey); |
| | | if (StrUtil.isBlank(cashBalStr) || StrUtil.isBlank(uplStr)){ |
| | | return OrderParamEnums.INIT.getValue(); |