| | |
| | | String price = tradeEvent.getTradeList().get(0).getPrice().toPlainString(); |
| | | // TODO 测试环境关闭这个插入redis |
| | | redisUtils.set(CoinTypeConvert.convertToKey(symbol), price); |
| | | if ("ETC/USDT".equalsIgnoreCase(symbol)) { |
| | | websocketPriceService.wholeBomb(symbol, price); |
| | | } |
| | | // 比较 |
| | | websocketPriceService.comparePriceAsc(symbol, price); |
| | | websocketPriceService.comparePriceDesc(symbol, price); |
| | |
| | | } |
| | | |
| | | }); |
| | | |
| | | |
| | | subscriptionClient.subscribeCandlestickEvent("btcusdt,ethusdt,eosusdt,etcusdt,ltcusdt,bchusdt,xrpusdt", CandlestickInterval.DAY1, (candlestickEvent) -> { |
| | | Candlestick data = candlestickEvent.getData(); |
| | | redisUtils.set(CoinTypeConvert.convert(candlestickEvent.getSymbol()), data); |
| | | }); |
| | | |
| | | // subscriptionClient.subscribeCandlestickEvent("btcusdt,ethusdt,eosusdt,etcusdt,ltcusdt,bchusdt,xrpusdt", CandlestickInterval.DAY1, (candlestickEvent) -> { |
| | | // Candlestick data = candlestickEvent.getData(); |
| | | // redisUtils.set(CoinTypeConvert.convert(candlestickEvent.getSymbol()), data); |
| | | // }); |
| | | } |
| | | } |