ipo
zyy
2026-01-07 f5f4c3a813b283d6a3bfdfcfae4498b1b3bb60f9
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
package com.yami.trading.huobi.websocket.service.huobi.parser.market;
 
import java.util.List;
 
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
 
import com.yami.trading.huobi.websocket.model.market.MarketDepth;
import com.yami.trading.huobi.websocket.service.huobi.parser.HuobiModelParser;
 
public class MarketDepthParser implements HuobiModelParser<MarketDepth> {
 
  @Override
  public MarketDepth parse(JSONObject json) {
    return MarketDepth.builder()
        .version(json.getLong("version"))
        .ts(json.getLong("ts"))
        .bids(new PriceLevelParser().parseArray(json.getJSONArray("bids")))
        .asks(new PriceLevelParser().parseArray(json.getJSONArray("asks")))
        .build();
  }
 
  @Override
  public MarketDepth parse(JSONArray json) {
    return null;
  }
 
  @Override
  public List<MarketDepth> parseArray(JSONArray jsonArray) {
    return null;
  }
}