Helius
2020-05-31 d8419ef8d67e6ee186a899c41d77a036b14bc49d
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package com.xcong.excoin.utils.api.response;
 
 
import com.xcong.excoin.utils.api.ApiException;
 
public class MergedResponse<T> {
 
    /**
     * status : ok
     * ch : market.ethusdt.detail.merged
     * ts : 1499225276950
     * tick : {"id":1499225271,"ts":1499225271000,"close":1885,"open":1960,"high":1985,"low":1856,"amount":81486.2926,"count":42122,"vol":1.57052744857082E8,"ask":[1885,21.8804],"bid":[1884,1.6702]}
     */
 
    private String status;
    private String ch;
    private long ts;
    public String errCode;
    public String errMsg;
    public Object tick;
 
    public Object checkAndReturn() {
        if ("ok".equals(status)) {
            return tick;
        }
        throw new ApiException(errCode, errMsg);
    }
 
    public String getStatus() {
        return status;
    }
 
    public void setStatus(String status) {
        this.status = status;
    }
 
    public String getCh() {
        return ch;
    }
 
    public void setCh(String ch) {
        this.ch = ch;
    }
 
    public long getTs() {
        return ts;
    }
 
    public void setTs(long ts) {
        this.ts = ts;
    }
 
    public String getErrCode() {
        return errCode;
    }
 
    public void setErrCode(String errCode) {
        this.errCode = errCode;
    }
 
    public String getErrMsg() {
        return errMsg;
    }
 
    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }
 
    public Object getTick() {
        return tick;
    }
 
    public void setTick(Object tick) {
        this.tick = tick;
    }
 
}