1 package org.oxerr.huobi.rest.domain;
2
3 import java.math.BigDecimal;
4
5 import org.oxerr.huobi.rest.domain.Depth.Marketdepth.Data;
6
7
8
9
10 @Deprecated
11 public class Depth extends AbstractObject {
12
13 private static final long serialVersionUID = 2014010201L;
14
15 private Marketdepth[] marketdepth;
16
17 public Data[] getBids() {
18 return marketdepth[0].getData();
19 }
20
21 public Data[] getAsks() {
22 return marketdepth[1].getData();
23 }
24
25 public void setMarketdepth(Marketdepth[] marketdepth) {
26 this.marketdepth = marketdepth;
27 }
28
29 public static class Marketdepth extends AbstractObject {
30
31 private static final long serialVersionUID = 2014010201L;
32
33 private String name;
34
35 private Data[] data;
36
37 public String getName() {
38 return name;
39 }
40
41 public void setName(String name) {
42 this.name = name;
43 }
44
45 public Data[] getData() {
46 return data;
47 }
48
49 public void setData(BigDecimal[][] data) {
50 this.data = new Data[data.length];
51 for (int i = 0; i < data.length; i++) {
52 this.data[i] = new Data(data[i]);
53 }
54 }
55
56 public static class Data extends AbstractObject {
57
58 private static final long serialVersionUID = 2014010201L;
59
60 private BigDecimal[] points;
61
62 public Data(BigDecimal[] points) {
63 this.points = points;
64 }
65
66 public BigDecimal getPrice() {
67 return points[0];
68 }
69
70 public BigDecimal getTotal() {
71 return points[1];
72 }
73
74 public BigDecimal getAmount() {
75 return points[2];
76 }
77
78 }
79 }
80 }
81