| | |
| | | import com.yami.trading.common.util.MarketOpenChecker; |
| | | import com.yami.trading.common.util.ThreadUtils; |
| | | import com.yami.trading.common.web.ResultObject; |
| | | import com.yami.trading.huobi.data.AdjustmentValueCache; |
| | | import com.yami.trading.huobi.data.DataCache; |
| | | import com.yami.trading.service.item.ItemService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | map.put("close", realtime.getClose()); |
| | | map.put("high", realtime.getHigh()); |
| | | map.put("low", realtime.getLow()); |
| | | |
| | | BigDecimal currentValue = AdjustmentValueCache.getCurrentValue().get(symbol); |
| | | if (currentValue != null) { |
| | | map.put("low", realtime.getLow().add(currentValue)); |
| | | } |
| | | |
| | | if( realtime.getVolume() != null){ |
| | | map.put("volume", realtime.getVolume().setScale(2, RoundingMode.HALF_UP)); |
| | | }else{ |
| | |
| | | map.put("high", high != null ? high.setScale(decimal, RoundingMode.HALF_UP) : null); |
| | | BigDecimal low = realtime.getLow(); |
| | | map.put("low", low != null ? low.setScale(decimal, RoundingMode.HALF_UP) : null); |
| | | if (currentValue != null) { |
| | | map.put("low", low != null ? low.add(currentValue).setScale(decimal, RoundingMode.HALF_UP) : null); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |