zyy
2025-11-11 df42e224ff59c45d88ad15913d27d2b66a33e6c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.yami.trading.huobi.websocket.client;
 
import java.util.List;
 
import com.yami.trading.huobi.websocket.client.req.generic.ChainRequest;
import com.yami.trading.huobi.websocket.client.req.generic.CurrencyChainsRequest;
import com.yami.trading.huobi.websocket.constant.Options;
import com.yami.trading.huobi.websocket.constant.enums.ExchangeEnum;
import com.yami.trading.huobi.websocket.exception.SDKException;
import com.yami.trading.huobi.websocket.model.generic.*;
import com.yami.trading.huobi.websocket.service.huobi.HuobiGenericService;
 
public interface GenericClient {
 
  String getSystemStatus();
 
  MarketStatus getMarketStatus();
 
  List<CurrencyChain> getCurrencyChains(CurrencyChainsRequest request);
 
  Long getTimestamp();
 
  List<SymbolV2> getSymbolsV2(Long ts);
 
  List<Currency> getCurrencyV1(Long ts);
 
  List<CurrencyV2> getCurrencyV2(Long ts);
 
  List<SymbolV1> getSymbolsV1(Long ts);
 
  List<MarketSymbol> getMarketSymbol(String symbols, Long ts);
 
  List<ChainV1> getChain(ChainRequest request);
 
  static GenericClient create(Options options) {
 
    if (options.getExchange().equals(ExchangeEnum.HUOBI)) {
      return new HuobiGenericService(options);
    }
    throw new SDKException(SDKException.INPUT_ERROR, "Unsupport Exchange.");
  }
}