forked from binance-exchange/binance-java-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for consulting withdraw and deposit history.
- Loading branch information
1 parent
341d9cd
commit fef98d5
Showing
15 changed files
with
477 additions
and
14 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
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
60 changes: 60 additions & 0 deletions
60
src/main/java/com/binance/api/client/domain/account/Deposit.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,60 @@ | ||
package com.binance.api.client.domain.account; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
/** | ||
* A deposit that was done to a Binance account. | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class Deposit { | ||
|
||
/** | ||
* Amount deposited. | ||
*/ | ||
private String amount; | ||
|
||
/** | ||
* Symbol. | ||
*/ | ||
private String asset; | ||
|
||
/** | ||
* Deposit time. | ||
*/ | ||
private String insertTime; | ||
|
||
public String getAmount() { | ||
return amount; | ||
} | ||
|
||
public void setAmount(String amount) { | ||
this.amount = amount; | ||
} | ||
|
||
public String getAsset() { | ||
return asset; | ||
} | ||
|
||
public void setAsset(String asset) { | ||
this.asset = asset; | ||
} | ||
|
||
public String getInsertTime() { | ||
return insertTime; | ||
} | ||
|
||
public void setInsertTime(String insertTime) { | ||
this.insertTime = insertTime; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) | ||
.append("amount", amount) | ||
.append("asset", asset) | ||
.append("insertTime", insertTime) | ||
.toString(); | ||
} | ||
} |
44 changes: 44 additions & 0 deletions
44
src/main/java/com/binance/api/client/domain/account/DepositHistory.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,44 @@ | ||
package com.binance.api.client.domain.account; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* History of account deposits. | ||
* | ||
* @see Deposit | ||
*/ | ||
public class DepositHistory { | ||
|
||
@JsonProperty("withdrawList") | ||
private List<Deposit> depositList; | ||
|
||
private boolean success; | ||
|
||
public List<Deposit> getDepositList() { | ||
return depositList; | ||
} | ||
|
||
public void setDepositList(List<Deposit> depositList) { | ||
this.depositList = depositList; | ||
} | ||
|
||
public boolean isSuccess() { | ||
return success; | ||
} | ||
|
||
public void setSuccess(boolean success) { | ||
this.success = success; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) | ||
.append("depositList", depositList) | ||
.append("success", success) | ||
.toString(); | ||
} | ||
} |
110 changes: 110 additions & 0 deletions
110
src/main/java/com/binance/api/client/domain/account/Withdraw.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,110 @@ | ||
package com.binance.api.client.domain.account; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
/** | ||
* A withdraw that was done to a Binance account. | ||
*/ | ||
@JsonIgnoreProperties(ignoreUnknown = true) | ||
public class Withdraw { | ||
|
||
/** | ||
* Amount withdrawn. | ||
*/ | ||
private String amount; | ||
|
||
/** | ||
* Destination address. | ||
*/ | ||
private String address; | ||
|
||
/** | ||
* Symbol. | ||
*/ | ||
private String asset; | ||
|
||
private String applyTime; | ||
|
||
private String successTime; | ||
|
||
/** | ||
* Ethereum transaction id. | ||
*/ | ||
private String txId; | ||
|
||
/** | ||
* Id. | ||
*/ | ||
private String id; | ||
|
||
public String getAmount() { | ||
return amount; | ||
} | ||
|
||
public void setAmount(String amount) { | ||
this.amount = amount; | ||
} | ||
|
||
public String getAddress() { | ||
return address; | ||
} | ||
|
||
public void setAddress(String address) { | ||
this.address = address; | ||
} | ||
|
||
public String getAsset() { | ||
return asset; | ||
} | ||
|
||
public void setAsset(String asset) { | ||
this.asset = asset; | ||
} | ||
|
||
public String getApplyTime() { | ||
return applyTime; | ||
} | ||
|
||
public void setApplyTime(String applyTime) { | ||
this.applyTime = applyTime; | ||
} | ||
|
||
public String getSuccessTime() { | ||
return successTime; | ||
} | ||
|
||
public void setSuccessTime(String successTime) { | ||
this.successTime = successTime; | ||
} | ||
|
||
public String getTxId() { | ||
return txId; | ||
} | ||
|
||
public void setTxId(String txId) { | ||
this.txId = txId; | ||
} | ||
|
||
public String getId() { | ||
return id; | ||
} | ||
|
||
public void setId(String id) { | ||
this.id = id; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) | ||
.append("amount", amount) | ||
.append("address", address) | ||
.append("asset", asset) | ||
.append("applyTime", applyTime) | ||
.append("successTime", successTime) | ||
.append("txId", txId) | ||
.append("id", id) | ||
.toString(); | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/main/java/com/binance/api/client/domain/account/WithdrawHistory.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,42 @@ | ||
package com.binance.api.client.domain.account; | ||
|
||
import org.apache.commons.lang3.builder.ToStringBuilder; | ||
import org.apache.commons.lang3.builder.ToStringStyle; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* History of account withdrawals. | ||
* | ||
* @see Withdraw | ||
*/ | ||
public class WithdrawHistory { | ||
|
||
private List<Withdraw> withdrawList; | ||
|
||
private boolean success; | ||
|
||
public List<Withdraw> getWithdrawList() { | ||
return withdrawList; | ||
} | ||
|
||
public void setWithdrawList(List<Withdraw> withdrawList) { | ||
this.withdrawList = withdrawList; | ||
} | ||
|
||
public boolean isSuccess() { | ||
return success; | ||
} | ||
|
||
public void setSuccess(boolean success) { | ||
this.success = success; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE) | ||
.append("withdrawList", withdrawList) | ||
.append("success", success) | ||
.toString(); | ||
} | ||
} |
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.