-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathCoin.java
More file actions
214 lines (170 loc) · 5.17 KB
/
Coin.java
File metadata and controls
214 lines (170 loc) · 5.17 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
package my.awesome.project.cryptarbitrage30;
import android.support.annotation.NonNull;
/**
* Created by Alexander on 1/9/2018.
*/
public class Coin implements Comparable<Coin>{
//all converted to usd figures
/*private Double bidQtyUSD;
private Double askQtyUSD;
private Double bidQtyBTC;
private Double askQtyBTC;
private Double bidQtyETH;
private Double askQtyETH;*/
private Double volumeUSD;
private Double volumeBTC;
private Double volumeETH;
private String name;
private String abbreviation;
private Exchange exchange;
private Double askPriceUSD;
private Double bidPriceUSD;
private Double askPriceBTC;
private Double bidPriceBTC;
private Double askPriceETH;
private Double bidPriceETH;
private String USDPairBitcoinPairEthPair;
double withdrawalFee;
/**
* Constructor
* @param name is the name of the coin
*/
public Coin(String name, String abbreviation, Exchange exchange, String USDPairBitcoinPairEthPair){
this.name = name;
this.abbreviation = abbreviation;
this.exchange = exchange;
this.USDPairBitcoinPairEthPair = USDPairBitcoinPairEthPair;
}
protected Coin(String name, String abbreviation, Exchange exchange){
this.name = name;
this.abbreviation = abbreviation;
this.exchange = exchange;
}
public Coin(String name, String abbreviation, Exchange exchange, String USDPairBitcoinPairEthPair, double withdrawalFree){
this.name = name;
this.abbreviation = abbreviation;
this.exchange = exchange;
this.USDPairBitcoinPairEthPair = USDPairBitcoinPairEthPair;
this.withdrawalFee = withdrawalFree;
}
protected String getName() {
return name;
}
protected void setName(String name) {
this.name = name;
}
protected Exchange getExchange() {
return exchange;
}
protected void setExchange(Exchange exchange) {
this.exchange = exchange;
}
protected Double getAskPriceUSD() {
return askPriceUSD;
}
protected void setAskPriceUSD(Double askPriceUSD) {
this.askPriceUSD = askPriceUSD;
}
protected Double getBidPriceUSD() {
return bidPriceUSD;
}
protected void setBidPriceUSD(Double bidPriceUSD) {
this.bidPriceUSD = bidPriceUSD;
}
protected Double getAskPriceBTC() {
return askPriceBTC;
}
protected void setAskPriceBTC(Double askPriceBTC) {
this.askPriceBTC = askPriceBTC;
}
protected Double getBidPriceBTC() {
return bidPriceBTC;
}
protected void setBidPriceBTC(Double bidPriceBTC) {
this.bidPriceBTC = bidPriceBTC;
}
protected Double getAskPriceETH() {
return askPriceETH;
}
protected void setAskPriceETH(Double askPriceETH) {
this.askPriceETH = askPriceETH;
}
protected Double getBidPriceETH() {
return bidPriceETH;
}
protected void setBidPriceETH(Double bidPriceETH) {
this.bidPriceETH = bidPriceETH;
}
protected String getAbbreviation() {
return abbreviation;
}
protected String getUSDBTCETHPairs(){
return this.USDPairBitcoinPairEthPair;
}
protected void setAbbreviation(String abbreviation) {
this.abbreviation = abbreviation;
}
protected Double getVolumeUSD(){
return this.volumeUSD;
}
protected void setVolumeUSD(Double volume){
this.volumeUSD = volume;
}
protected Double getVolumeBTC(){
return this.volumeBTC;
}
protected void setVolumeBTC(Double volume){
this.volumeBTC = volume;
}
protected Double getVolumeETH(){
return this.volumeETH;
}
protected void setVolumeETH(Double volume){
this.volumeETH = volume;
}
/*public Double getBidQtyUSD() {
return bidQtyUSD;
}
public void setBidQtyUSD(Double bidQtyUSD) {
this.bidQtyUSD = bidQtyUSD;
}
public Double getAskQtyUSD() {
return askQtyUSD;
}
public void setAskQtyUSD(Double askQtyUSD) {
this.askQtyUSD = askQtyUSD;
}
public Double getBidQtyBTC() {
return bidQtyBTC;
}
public void setBidQtyBTC(Double bidQtyBTC) {
this.bidQtyBTC = bidQtyBTC;
}
public Double getAskQtyBTC() {
return askQtyBTC;
}
public void setAskQtyBTC(Double askQtyBTC) {
this.askQtyBTC = askQtyBTC;
}
public Double getBidQtyETH() {
return bidQtyETH;
}
public void setBidQtyETH(Double bidQtyETH) {
this.bidQtyETH = bidQtyETH;
}
public Double getAskQtyETH() {
return askQtyETH;
}
public void setAskQtyETH(Double askQtyETH) {
this.askQtyETH = askQtyETH;
}
*/
public double getWithdrawalFee(){
return this.withdrawalFee;
}
@Override
//sorts coins alphabetically
public int compareTo(@NonNull Coin coin) {
return this.getName().compareTo(coin.getName());
}
}