| | |
| | | if (data.has("ch")) |
| | | tickerData.setChange(data.get("ch").asDouble()); |
| | | else |
| | | tickerData.setChange(cache.getIfPresent(proName).getChange()); |
| | | tickerData.setChange(cache.getIfPresent(proName).getChange() == null ? 0 : cache.getIfPresent(proName).getChange()); |
| | | |
| | | if (data.has("chp")) |
| | | tickerData.setChangePercent(data.get("chp").asDouble()); |
| | | else |
| | | tickerData.setChangePercent(cache.getIfPresent(proName).getChangePercent()); |
| | | tickerData.setChangePercent(cache.getIfPresent(proName).getChangePercent() == null ? 0 : cache.getIfPresent(proName).getChangePercent()); |
| | | |
| | | if (data.has("volume")) |
| | | tickerData.setVolume(data.get("volume").asLong()); |