| | |
| | | package com.xcong.excoin.quartz.job; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.huobi.client.SubscriptionClient; |
| | | import com.huobi.client.SubscriptionOptions; |
| | | import com.huobi.client.model.Candlestick; |
| | |
| | | // 比较 |
| | | websocketPriceService.comparePriceAsc(symbol, price); |
| | | websocketPriceService.comparePriceDesc(symbol, price); |
| | | websocketPriceService.wholeBomb(); |
| | | //System.out.println("比较完毕:"+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); |
| | | // }); |
| | | } |
| | | } |