| | |
| | | import com.huobi.client.model.enums.CandlestickInterval; |
| | | import com.huobi.client.model.enums.MBPLevelEnums; |
| | | import com.huobi.client.model.event.PriceDepthEvent; |
| | | import com.xcong.excoin.netty.server.TcpServer; |
| | | import com.xcong.excoin.netty.server.WebSocketServer; |
| | | import com.xcong.excoin.utils.CoinTypeConvert; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | @Slf4j |
| | | @Component |
| | | public class KLineDataJob { |
| | | |
| | | @Autowired |
| | | WebSocketServer webSocketServer; |
| | | |
| | | @Autowired |
| | | private SubscriptionClient subscriptionClient; |
| | | |
| | | // @PostConstruct |
| | | public void data() throws Exception { |
| | | webSocketServer.start(); |
| | | log.info("=================="); |
| | | |
| | | subscriptionClient.subscribeCandlestickEvent("btcusdt,ethusdt,eosusdt,etcusdt,ltcusdt,bchusdt,xrpusdt", CandlestickInterval.DAY1, (candlestickEvent) -> { |
| | | Candlestick data = candlestickEvent.getData(); |
| | | }); |