-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds DustLog History to Binance and adds additional response to Krake…
…n. (#4370) * Adds the new response "EGeneral:Too many requests" from Kraken to the base service. See #4369 (comment) * Added new possibility to use the DustLog call (GET /sapi/v1/asset/dribblet) in Binance that gives you the history of your conversion results for small balances that are so small that they cannot be traded. See #4371. * Implemented suggestions from @walec51.
- Loading branch information
1 parent
b93568b
commit 6b23c4a
Showing
10 changed files
with
455 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
...nge-binance/src/main/java/org/knowm/xchange/binance/dto/trade/BinanceDribbletDetails.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package org.knowm.xchange.binance.dto.trade; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.math.BigDecimal; | ||
|
||
public final class BinanceDribbletDetails { | ||
private final String transId; | ||
private final BigDecimal serviceChargeAmount; | ||
private final BigDecimal amount; | ||
private final Long operateTime; | ||
private final BigDecimal transferedAmount; | ||
private final String fromAsset; | ||
|
||
public BinanceDribbletDetails( | ||
@JsonProperty("transId") String transId, | ||
@JsonProperty("serviceChargeAmount") BigDecimal serviceChargeAmount, | ||
@JsonProperty("amount") BigDecimal amount, | ||
@JsonProperty("operateTime") Long operateTime, | ||
@JsonProperty("transferedAmount") BigDecimal transferedAmount, | ||
@JsonProperty("fromAsset") String fromAsset) { | ||
this.transId = transId; | ||
this.serviceChargeAmount = serviceChargeAmount; | ||
this.amount = amount; | ||
this.operateTime = operateTime; | ||
this.transferedAmount = transferedAmount; | ||
this.fromAsset = fromAsset; | ||
} | ||
|
||
public String getTransId() { | ||
return transId; | ||
} | ||
|
||
public BigDecimal getServiceChargeAmount() { | ||
return serviceChargeAmount; | ||
} | ||
|
||
public BigDecimal getAmount() { | ||
return amount; | ||
} | ||
|
||
public Long getOperateTime() { | ||
return operateTime; | ||
} | ||
|
||
public BigDecimal getTransferedAmount() { | ||
return transferedAmount; | ||
} | ||
|
||
public String getFromAsset() { | ||
return fromAsset; | ||
} | ||
} |
47 changes: 47 additions & 0 deletions
47
xchange-binance/src/main/java/org/knowm/xchange/binance/dto/trade/BinanceDribblets.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package org.knowm.xchange.binance.dto.trade; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.math.BigDecimal; | ||
import java.util.List; | ||
|
||
public final class BinanceDribblets { | ||
private final Long operateTime; | ||
private final BigDecimal totalTransferedAmount; | ||
private final BigDecimal totalServiceChargeAmount; | ||
private final String transId; | ||
private final List<BinanceDribbletDetails> binanceDribbletDetails; | ||
|
||
public BinanceDribblets( | ||
@JsonProperty("operateTime") Long operateTime, | ||
@JsonProperty("totalTransferedAmount") BigDecimal totalTransferedAmount, | ||
@JsonProperty("totalServiceChargeAmount") BigDecimal totalServiceChargeAmount, | ||
@JsonProperty("transId") String transId, | ||
@JsonProperty("userAssetDribbletDetails") | ||
List<BinanceDribbletDetails> binanceDribbletDetails) { | ||
this.operateTime = operateTime; | ||
this.totalTransferedAmount = totalTransferedAmount; | ||
this.totalServiceChargeAmount = totalServiceChargeAmount; | ||
this.transId = transId; | ||
this.binanceDribbletDetails = binanceDribbletDetails; | ||
} | ||
|
||
public Long getOperateTime() { | ||
return operateTime; | ||
} | ||
|
||
public BigDecimal getTotalTransferedAmount() { | ||
return totalTransferedAmount; | ||
} | ||
|
||
public BigDecimal getTotalServiceChargeAmount() { | ||
return totalServiceChargeAmount; | ||
} | ||
|
||
public String getTransId() { | ||
return transId; | ||
} | ||
|
||
public List<BinanceDribbletDetails> getBinanceDribbletDetails() { | ||
return binanceDribbletDetails; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
xchange-binance/src/main/java/org/knowm/xchange/binance/dto/trade/BinanceDustLog.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package org.knowm.xchange.binance.dto.trade; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import java.util.List; | ||
|
||
public final class BinanceDustLog { | ||
private final Integer total; | ||
private final List<BinanceDribblets> dribblets; | ||
|
||
public BinanceDustLog( | ||
@JsonProperty("total") Integer total, | ||
@JsonProperty("userAssetDribblets") List<BinanceDribblets> dribblets) { | ||
this.total = total; | ||
this.dribblets = dribblets; | ||
} | ||
|
||
public Integer getTotal() { | ||
return total; | ||
} | ||
|
||
public List<BinanceDribblets> getDribblets() { | ||
return dribblets; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.