| | |
| | | } |
| | | |
| | | String uplStr = (String) redisUtils.get(positionsUplKey); |
| | | if (StrUtil.isBlank(uplStr)){ |
| | | return OrderParamEnums.INIT.getValue(); |
| | | } |
| | | //可使用的总保证金 |
| | | String cashBalStrKey = AccountWs.ACCOUNTWS_CHANNEL + ":" + CoinEnums.USDT.getCode() + ":cashBalStr"; |
| | | String cashBalStr = (String) redisUtils.get(cashBalStrKey); |
| | | if (StrUtil.isBlank(cashBalStr) || StrUtil.isBlank(uplStr)){ |
| | | return OrderParamEnums.INIT.getValue(); |
| | | } |
| | | BigDecimal upl = new BigDecimal(uplStr); |
| | | if (BigDecimal.ZERO.compareTo(upl) >= 0){ |
| | | upl = upl.multiply(new BigDecimal("-1")); |