xiaoyong931011
2021-04-09 0f7c4c9e8e84ccb7786b63d3e2a29095a533e42d
src/main/java/com/xcong/excoin/quartz/job/NewestPriceUpdateJob.java
@@ -1,5 +1,6 @@
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;
@@ -54,17 +55,15 @@
                // 比较
                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);
//        });
    }
}