View Javadoc
1   package org.oxerr.okcoin.rest.dto;
2   
3   import java.math.BigDecimal;
4   
5   import com.fasterxml.jackson.annotation.JsonProperty;
6   
7   public class Ticker extends BaseObject {
8   
9   	private static final long serialVersionUID = 2013122001L;
10  
11  	private final BigDecimal high;
12  
13  	private final BigDecimal low;
14  
15  	private final BigDecimal buy;
16  
17  	private final BigDecimal sell;
18  
19  	private final BigDecimal last;
20  
21  	private final BigDecimal vol;
22  
23  	public Ticker(
24  			@JsonProperty("high") final BigDecimal high,
25  			@JsonProperty("low") final BigDecimal low,
26  			@JsonProperty("buy") final BigDecimal buy,
27  			@JsonProperty("sell") final BigDecimal sell,
28  			@JsonProperty("last") final BigDecimal last,
29  			@JsonProperty("vol") final BigDecimal vol) {
30  		this.high = high;
31  		this.low = low;
32  		this.buy = buy;
33  		this.sell = sell;
34  		this.last = last;
35  		this.vol = vol;
36  	}
37  
38  	/**
39  	 * Returns the highest price.
40  	 *
41  	 * @return the highest price.
42  	 */
43  	public BigDecimal getHigh() {
44  		return high;
45  	}
46  
47  	/**
48  	 * Returns the lowest price.
49  	 *
50  	 * @return the lowest price.
51  	 */
52  	public BigDecimal getLow() {
53  		return low;
54  	}
55  
56  	/**
57  	 * Returns the best bid.
58  	 *
59  	 * @return the best bid.
60  	 */
61  	public BigDecimal getBuy() {
62  		return buy;
63  	}
64  
65  	/**
66  	 * Returns the best ask.
67  	 *
68  	 * @return the best ask.
69  	 */
70  	public BigDecimal getSell() {
71  		return sell;
72  	}
73  
74  	/**
75  	 * Returns the latest price.
76  	 *
77  	 * @return the latest price.
78  	 */
79  	public BigDecimal getLast() {
80  		return last;
81  	}
82  
83  	/**
84  	 * Returns the volume.
85  	 *
86  	 * @return the volume (in the last rolling 24 hours).
87  	 */
88  	public BigDecimal getVol() {
89  		return vol;
90  	}
91  
92  }