View Javadoc
1   package org.oxerr.huobi.websocket.dto.response.payload;
2   
3   import java.math.BigDecimal;
4   
5   import org.oxerr.huobi.websocket.dto.Period;
6   import org.oxerr.huobi.websocket.dto.response.historydata.ReqKLineResponse;
7   
8   /**
9    * Payload of {@link ReqKLineResponse}.
10   */
11  public class ReqKLinePayload extends AbstractPayload {
12  
13  	private final String symbolId;
14  	private final Period period;
15  	private final long[] time;
16  	private final BigDecimal[] priceOpen;
17  	private final BigDecimal[] priceHigh;
18  	private final BigDecimal[] priceLow;
19  	private final BigDecimal[] priceLast;
20  	private final BigDecimal[] amount;
21  	private final BigDecimal[] volume;
22  	private final int[] count;
23  
24  	/**
25  	 * 历史k线
26  	 *
27  	 * @param symbolId 交易代码
28  	 * @param period k线周期
29  	 * @param time 时间
30  	 * @param priceOpen 开盘
31  	 * @param priceHigh 最高
32  	 * @param priceLow 最低
33  	 * @param priceLast 收盘
34  	 * @param amount 成交量
35  	 * @param volume 成交额
36  	 * @param count 成交笔数
37  	 */
38  	public ReqKLinePayload(String symbolId, Period period, long[] time,
39  			BigDecimal[] priceOpen, BigDecimal[] priceHigh,
40  			BigDecimal[] priceLow, BigDecimal[] priceLast, BigDecimal[] amount,
41  			BigDecimal[] volume, int[] count) {
42  		this.symbolId = symbolId;
43  		this.period = period;
44  		this.time = time;
45  		this.priceOpen = priceOpen;
46  		this.priceHigh = priceHigh;
47  		this.priceLow = priceLow;
48  		this.priceLast = priceLast;
49  		this.amount = amount;
50  		this.volume = volume;
51  		this.count = count;
52  	}
53  
54  	public String getSymbolId() {
55  		return symbolId;
56  	}
57  
58  	public Period getPeriod() {
59  		return period;
60  	}
61  
62  	public long[] getTime() {
63  		return time;
64  	}
65  
66  	public BigDecimal[] getPriceOpen() {
67  		return priceOpen;
68  	}
69  
70  	public BigDecimal[] getPriceHigh() {
71  		return priceHigh;
72  	}
73  
74  	public BigDecimal[] getPriceLow() {
75  		return priceLow;
76  	}
77  
78  	public BigDecimal[] getPriceLast() {
79  		return priceLast;
80  	}
81  
82  	public BigDecimal[] getAmount() {
83  		return amount;
84  	}
85  
86  	public BigDecimal[] getVolume() {
87  		return volume;
88  	}
89  
90  	public int[] getCount() {
91  		return count;
92  	}
93  
94  }