View Javadoc
1   package org.oxerr.huobi.rest.domain;
2   
3   import java.math.BigDecimal;
4   import java.math.RoundingMode;
5   
6   import com.fasterxml.jackson.annotation.JsonProperty;
7   
8   public class MyTradeInfo extends AbstractObject {
9   
10  	private static final long serialVersionUID = 2014010501L;
11  
12  	@JsonProperty("code")
13  	private int code;
14  
15  	@JsonProperty("msg")
16  	private String msg;
17  
18  	@JsonProperty("extra")
19  	private Extra extra;
20  
21  	public int getCode() {
22  		return code;
23  	}
24  
25  	public String getMsg() {
26  		return msg;
27  	}
28  
29  	public Extra getExtra() {
30  		return extra;
31  	}
32  
33  	public static class Extra extends AbstractObject {
34  
35  		private static final long serialVersionUID = 2014010501L;
36  
37  		@JsonProperty("sell")
38  		private Sell sell;
39  
40  		@JsonProperty("buy")
41  		private Buy buy;
42  
43  		@JsonProperty("balance")
44  		private Balance balance;
45  
46  		public Sell getSell() {
47  			return sell;
48  		}
49  
50  		public Buy getBuy() {
51  			return buy;
52  		}
53  
54  		public Balance getBalance() {
55  			return balance;
56  		}
57  		public static class Sell extends AbstractObject {
58  
59  			private static final long serialVersionUID = 2014010501L;
60  
61  			@JsonProperty("price")
62  			private BigDecimal price;
63  
64  			@JsonProperty("amount")
65  			private BigDecimal amount;
66  
67  			@JsonProperty("available_btc")
68  			private BigDecimal availableBtc;
69  
70  			@JsonProperty("price_ltc")
71  			private BigDecimal priceLtc;
72  
73  			@JsonProperty("amount_ltc")
74  			private BigDecimal amountLtc;
75  
76  			@JsonProperty("available_ltc")
77  			private BigDecimal availableLtc;
78  
79  			public BigDecimal getPrice() {
80  				return price;
81  			}
82  
83  			public BigDecimal getAmount() {
84  				return amount;
85  			}
86  
87  			public BigDecimal getAvailableBtc() {
88  				return availableBtc;
89  			}
90  
91  		}
92  
93  		public static class Buy extends AbstractObject {
94  
95  			private static final long serialVersionUID = 2014010501L;
96  
97  			@JsonProperty("price")
98  			private BigDecimal price;
99  
100 			@JsonProperty("amount")
101 			private BigDecimal amount;
102 
103 			@JsonProperty("available_cny")
104 			private BigDecimal availableCny;
105 
106 			@JsonProperty("price_ltc")
107 			private BigDecimal priceLtc;
108 
109 			@JsonProperty("amount_ltc")
110 			private BigDecimal amountLtc;
111 
112 			public BigDecimal getPrice() {
113 				return price;
114 			}
115 
116 			public BigDecimal getAmount() {
117 				return amount;
118 			}
119 
120 			public BigDecimal getAvailableCny() {
121 				return availableCny;
122 			}
123 
124 		}
125 
126 		public static class Balance extends AbstractObject {
127 
128 			private static final long serialVersionUID = 2014010501L;
129 
130 			@JsonProperty("id")
131 			private long id;
132 
133 			@JsonProperty("initialized_cny")
134 			private BigDecimal initializedCny;
135 
136 			@JsonProperty("initialized_btc")
137 			private BigDecimal initializedBtc;
138 
139 			@JsonProperty("user_id")
140 			private long userId;
141 
142 			@JsonProperty("available_cny")
143 			private BigDecimal availableCny;
144 
145 			@JsonProperty("available_btc")
146 			private BigDecimal availableBtc;
147 
148 			@JsonProperty("available_usd")
149 			private BigDecimal availableUsd;
150 
151 			@JsonProperty("frozen_cny")
152 			private BigDecimal frozenCny;
153 
154 			@JsonProperty("frozen_btc")
155 			private BigDecimal frozenBtc;
156 
157 			@JsonProperty("frozen_usd")
158 			private BigDecimal frozenUsd;
159 
160 			@JsonProperty("debt_bitcoin")
161 			private BigDecimal debtBitcoin;
162 
163 			@JsonProperty("debt_rmb")
164 			private BigDecimal debtRmb;
165 
166 			@JsonProperty("initialized_ltc")
167 			private BigDecimal initializedLtc;
168 
169 			@JsonProperty("available_cny_ltc")
170 			private BigDecimal availableCnyLtc;
171 
172 			@JsonProperty("available_ltc")
173 			private BigDecimal availableLtc;
174 
175 			@JsonProperty("frozen_cny_ltc")
176 			private BigDecimal frozenCnyLtc;
177 
178 			@JsonProperty("frozen_ltc")
179 			private BigDecimal frozenLtc;
180 
181 			@JsonProperty("debt_ltc")
182 			private BigDecimal debtLtc;
183 
184 			@JsonProperty("total")
185 			private BigDecimal total;
186 
187 			@JsonProperty("btc_total")
188 			private BigDecimal btcTotal;
189 
190 			@JsonProperty("ltc_total")
191 			private BigDecimal ltcTotal;
192 
193 			@JsonProperty("loan_total")
194 			private BigDecimal loanTotal;
195 
196 			@JsonProperty("net_asset")
197 			private BigDecimal netAsset;
198 
199 			@JsonProperty("loan_net_asset")
200 			private BigDecimal loanNetAsset;
201 
202 			@JsonProperty("loan_cny_display")
203 			private BigDecimal loanCnyDisplay;
204 
205 			@JsonProperty("loan_btc_display")
206 			private BigDecimal loanBtcDisplay;
207 
208 			@JsonProperty("loan_ltc_display")
209 			private BigDecimal loanLtcDisplay;
210 
211 			@JsonProperty("available_btc_display")
212 			private BigDecimal availableBtcDisplay;
213 
214 			@JsonProperty("available_ltc_display")
215 			private BigDecimal availableLtcDisplay;
216 
217 			@JsonProperty("available_cny_display")
218 			private BigDecimal availableCnyDisplay;
219 
220 			@JsonProperty("frozen_btc_display")
221 			private BigDecimal frozenBtcDisplay;
222 
223 			@JsonProperty("frozen_ltc_display")
224 			private BigDecimal frozenLtcDisplay;
225 
226 			@JsonProperty("frozen_cny_display")
227 			private BigDecimal frozenCnyDisplay;
228 
229 			public long getId() {
230 				return id;
231 			}
232 
233 			public BigDecimal getInitializedCny() {
234 				return initializedCny;
235 			}
236 
237 			public BigDecimal getInitializedBtc() {
238 				return initializedBtc;
239 			}
240 
241 			public long getUserId() {
242 				return userId;
243 			}
244 
245 			public BigDecimal getAvailableCny() {
246 				return availableCny;
247 			}
248 
249 			public BigDecimal getAvailableBtc() {
250 				return availableBtc.divide(BigDecimal.TEN.pow(10),
251 						10,
252 						RoundingMode.FLOOR);
253 			}
254 
255 			public BigDecimal getAvailableUsd() {
256 				return availableUsd;
257 			}
258 
259 			public BigDecimal getFrozenCny() {
260 				return frozenCny;
261 			}
262 
263 			public BigDecimal getFrozenBtc() {
264 				return frozenBtc;
265 			}
266 
267 			public BigDecimal getFrozenUsd() {
268 				return frozenUsd;
269 			}
270 
271 			public BigDecimal getDebtBitcoin() {
272 				return debtBitcoin;
273 			}
274 
275 			public BigDecimal getDebtRmb() {
276 				return debtRmb;
277 			}
278 
279 			public BigDecimal getTotal() {
280 				return total;
281 			}
282 
283 			public BigDecimal getLoanTotal() {
284 				return loanTotal;
285 			}
286 
287 			public BigDecimal getNetAsset() {
288 				return netAsset;
289 			}
290 
291 			public BigDecimal getLoanCnyDisplay() {
292 				return loanCnyDisplay;
293 			}
294 
295 			public BigDecimal getLoanBtcDisplay() {
296 				return loanBtcDisplay;
297 			}
298 
299 			public BigDecimal getAvailableBtcDisplay() {
300 				return availableBtcDisplay;
301 			}
302 
303 			public BigDecimal getAvailableCnyDisplay() {
304 				return availableCnyDisplay;
305 			}
306 
307 			public BigDecimal getFrozenBtcDisplay() {
308 				return frozenBtcDisplay;
309 			}
310 
311 			public BigDecimal getFrozenCnyDisplay() {
312 				return frozenCnyDisplay;
313 			}
314 
315 		}
316 	}
317 
318 }