@@ -20,7 +20,7 @@ public final class BitstampUserTransaction {
20
20
private final long id ;
21
21
private final long order_id ;
22
22
private final TransactionType type ;
23
- private final BigDecimal fee ;
23
+ private final String fee ;
24
24
private final Map <String , BigDecimal > amounts = new HashMap <>();
25
25
// possible pairs at the moment: btcusd, btceur, eurusd, xrpusd, xrpeur, xrpbtc
26
26
private String base ; // btc, eur, xrp
@@ -41,7 +41,7 @@ public BitstampUserTransaction(
41
41
@ JsonProperty ("id" ) long id ,
42
42
@ JsonProperty ("order_id" ) long order_id ,
43
43
@ JsonProperty ("type" ) TransactionType type ,
44
- @ JsonProperty ("fee" ) BigDecimal fee ) {
44
+ @ JsonProperty ("fee" ) String fee ) {
45
45
46
46
this .datetime = BitstampUtils .parseDate (datetime );
47
47
this .id = id ;
@@ -88,19 +88,19 @@ public TransactionType getType() {
88
88
}
89
89
90
90
public boolean isDeposit () {
91
- return type == TransactionType .deposit ;
91
+ return type == TransactionType .deposit || type == TransactionType . rippleDeposit ;
92
92
}
93
93
94
94
public boolean isWithdrawal () {
95
- return type == TransactionType .withdrawal ;
95
+ return type == TransactionType .withdrawal || type == TransactionType . rippleWithdrawal ;
96
96
}
97
97
98
98
public boolean isMarketTrade () {
99
99
return type == TransactionType .trade ;
100
100
}
101
101
102
102
public boolean isSubAccountTransfer () {
103
- return type == TransactionType .subAccountTransfer ;
103
+ return type == TransactionType .subAccountTransfer || type == TransactionType . settlementTransfer ;
104
104
}
105
105
106
106
public BigDecimal getCounterAmount () {
@@ -123,7 +123,7 @@ public String getBaseCurrency() {
123
123
return base ;
124
124
}
125
125
126
- public BigDecimal getFee () {
126
+ public String getFee () {
127
127
return fee ;
128
128
}
129
129
@@ -169,7 +169,9 @@ public enum TransactionType {
169
169
sentAssetsToStaking ,
170
170
stakingReward ,
171
171
referralReward ,
172
- interAccountTransfer ;
172
+ interAccountTransfer ,
173
+ settlementTransfer ,
174
+ unknown ;
173
175
174
176
@ JsonCreator
175
177
public static TransactionType fromString (int type ) {
@@ -194,10 +196,12 @@ public static TransactionType fromString(int type) {
194
196
return stakingReward ;
195
197
case 32 :
196
198
return referralReward ;
199
+ case 33 :
200
+ return settlementTransfer ;
197
201
case 35 :
198
202
return interAccountTransfer ;
199
203
default :
200
- throw new IllegalArgumentException ( type + " has no corresponding value" ) ;
204
+ return unknown ;
201
205
}
202
206
}
203
207
}
0 commit comments