Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions src/main/java/com/binance/api/client/BinanceApiAsyncRestClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -244,19 +244,19 @@ public interface BinanceApiAsyncRestClient {
*/
void getMyTrades(String symbol, BinanceApiCallback<List<Trade>> callback);

/**
* Submit a withdraw request.
*
* Enable Withdrawals option has to be active in the API settings.
*
* @param asset asset symbol to withdraw
* @param address address to withdraw to
* @param amount amount to withdraw
* @param name description/alias of the address
* @param addressTag Secondary address identifier for coins like XRP,XMR etc.
*/
void withdraw(String coin, String clientOrderId, String network, String address, String addressTag,
String amount, Boolean feeFlag, String name, BinanceApiCallback<WithdrawResult> callback);
/**
* Submit a withdraw request.
* <p>
* Enable Withdrawals option has to be active in the API settings.
*
* @param coin coin symbol to withdraw
* @param address address to withdraw to
* @param amount amount to withdraw
* @param name description/alias of the address
* @param addressTag Secondary address identifier for coins like XRP,XMR etc.
*/
void withdraw(String coin, String withdrawOrderId, String network, String address, String addressTag,
String amount, Boolean feeFlag, String name, BinanceApiCallback<WithdrawResult> callback);

/**
* Fetch account deposit history.
Expand All @@ -266,13 +266,13 @@ void withdraw(String coin, String clientOrderId, String network, String address,
void getDepositHistory(String coin, BinanceApiCallback<List<Deposit>> callback);


/**
* Fetch account deposit history.
*
* @param callback the callback that handles the response and returns the deposit history
*/
void getDepositHistory(String coin, int status, Long startTime, Long endTime,
int offset, int limit, BinanceApiCallback<List<Deposit>> callback);
/**
* Fetch account deposit history.
*
* @param callback the callback that handles the response and returns the deposit history
*/
void getDepositHistory(String coin, Integer status, Long startTime, Long endTime,
int offset, int limit, BinanceApiCallback<List<Deposit>> callback);

/**
* Fetch account withdraw history.
Expand All @@ -281,13 +281,13 @@ void getDepositHistory(String coin, int status, Long startTime, Long endTime,
*/
void getWithdrawHistory(String coin, BinanceApiCallback<List<Withdraw>> callback);

/**
* Fetch account withdraw history.
*
* @param callback the callback that handles the response and returns the withdraw history
*/
void getWithdrawHistory(String coin, int status, Long startTime, Long endTime,
int offset, int limit, BinanceApiCallback<List<Withdraw>> callback);
/**
* Fetch account withdraw history.
*
* @param callback the callback that handles the response and returns the withdraw history
*/
void getWithdrawHistory(String coin, Integer status, Long startTime, Long endTime, String withdrawOrderId,
int offset, int limit, BinanceApiCallback<List<Withdraw>> callback);

/**
* Fetch deposit address.
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/binance/api/client/BinanceApiRestClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,13 @@ List<Deposit> getDepositHistory(String coin, int status, Long startTime, Long en
*/
List<Withdraw> getWithdrawHistory(String coin);

/**
* Fetch account withdraw history.
*
* @return withdraw history, containing a list of withdrawals
*/
List<Withdraw> getWithdrawHistory(String coin, int status, Long startTime, Long endTime,
int offset, int limit);
/**
* Fetch account withdraw history.
*
* @return withdraw history, containing a list of withdrawals
*/
List<Withdraw> getWithdrawHistory(String coin, Integer status, Long startTime, Long endTime, String withdrawOrderId,
int offset, int limit);

/**
* Fetch sub-account transfer history.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,44 +199,45 @@ public void getMyTrades(String symbol, BinanceApiCallback<List<Trade>> callback)
getMyTrades(symbol, null, null, BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis(), callback);
}

@Override
public void withdraw(String coin, String clientOrderId, String network, String address, String addressTag,
String amount, Boolean feeFlag, String name, BinanceApiCallback<WithdrawResult> callback) {
binanceApiService.withdraw(coin, clientOrderId, network, address, addressTag, amount, feeFlag, name,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis())
.enqueue(new BinanceApiCallbackAdapter<>(callback));
}
@Override
public void withdraw(String coin, String withdrawOrderId, String network, String address, String addressTag,
String amount, Boolean feeFlag, String name, BinanceApiCallback<WithdrawResult> callback) {
binanceApiService.withdraw(coin, withdrawOrderId, network, address, addressTag, amount, feeFlag, name,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis())
.enqueue(new BinanceApiCallbackAdapter<>(callback));
}


@Override
public void getDepositHistory(String coin, BinanceApiCallback<List<Deposit>> callback) {
binanceApiService.getDepositHistory(coin, 0, null, null, 0, 1000,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis())
.enqueue(new BinanceApiCallbackAdapter<>(callback));
}
@Override
public void getDepositHistory(String coin, BinanceApiCallback<List<Deposit>> callback) {
binanceApiService.getDepositHistory(coin, null, null, null, 0, 1000,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis())
.enqueue(new BinanceApiCallbackAdapter<>(callback));
}

@Override
public void getDepositHistory(String coin, int status, Long startTime, Long endTime,
int offset, int limit, BinanceApiCallback<List<Deposit>> callback) {
binanceApiService.getDepositHistory(coin, status, startTime, endTime, offset, limit,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis())
.enqueue(new BinanceApiCallbackAdapter<>(callback));
}
@Override
public void getDepositHistory(String coin, Integer status, Long startTime, Long endTime,
int offset, int limit, BinanceApiCallback<List<Deposit>> callback) {
binanceApiService.getDepositHistory(coin, status, startTime, endTime, offset, limit,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis())
.enqueue(new BinanceApiCallbackAdapter<>(callback));
}

@Override
public void getWithdrawHistory(String coin, BinanceApiCallback<List<Withdraw>> callback) {
binanceApiService.getWithdrawHistory(coin, 0, null, null, 0, 1000,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis())
.enqueue(new BinanceApiCallbackAdapter<>(callback));
}
@Override
public void getWithdrawHistory(String coin, BinanceApiCallback<List<Withdraw>> callback) {
binanceApiService.getWithdrawHistory(coin, null, null, null, null, 0, 1000,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis())
.enqueue(new BinanceApiCallbackAdapter<>(callback));
}

@Override
public void getWithdrawHistory(String coin, int status, Long startTime, Long endTime,
int offset, int limit, BinanceApiCallback<List<Withdraw>> callback) {
binanceApiService.getWithdrawHistory(coin, status, startTime, endTime, offset, limit,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis())
.enqueue(new BinanceApiCallbackAdapter<>(callback));
}

@Override
public void getWithdrawHistory(String coin, Integer status, Long startTime, Long endTime, String withdrawOrderId,
int offset, int limit, BinanceApiCallback<List<Withdraw>> callback) {
binanceApiService.getWithdrawHistory(coin, status, startTime, endTime, withdrawOrderId, offset, limit,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis())
.enqueue(new BinanceApiCallbackAdapter<>(callback));
}

@Override
public void getDepositAddress(String asset, String network, BinanceApiCallback<DepositAddress> callback) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ public List<Trade> getMyTrades(String symbol, Long fromId) {
System.currentTimeMillis());
}

@Override
public WithdrawResult withdraw(String coin, String clientOrderId, String network, String address, String amount,
String name, String addressTag, Boolean feeFlag) {
return executeSync(binanceApiService.withdraw(coin, clientOrderId, network, address,
addressTag, amount, feeFlag, name,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis()));
}
@Override
public WithdrawResult withdraw(String coin, String withdrawOrderId, String network, String address, String amount,
String name, String addressTag, Boolean feeFlag) {
return executeSync(binanceApiService.withdraw(coin, withdrawOrderId, network, address,
addressTag, amount, feeFlag, name,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis()));
}

@Override
public DustTransferResponse dustTranfer(List<String> asset) {
Expand All @@ -254,18 +254,18 @@ public List<Deposit> getDepositHistory(String coin, int status, Long startTime,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis()));
}

@Override
public List<Withdraw> getWithdrawHistory(String coin) {
return executeSync(binanceApiService.getWithdrawHistory(coin, 0, null, null, 0, 1000,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis()));
}
@Override
public List<Withdraw> getWithdrawHistory(String coin) {
return executeSync(binanceApiService.getWithdrawHistory(coin, 0, null, null, null, 0, 1000,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis()));
}

@Override
public List<Withdraw> getWithdrawHistory(String coin, int status, Long startTime, Long endTime,
int offset, int limit) {
return executeSync(binanceApiService.getWithdrawHistory(coin, status, startTime, endTime, offset, limit,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis()));
}
@Override
public List<Withdraw> getWithdrawHistory(String coin, Integer status, Long startTime, Long endTime, String withdrawOrderId,
int offset, int limit) {
return executeSync(binanceApiService.getWithdrawHistory(coin, status, startTime, endTime, withdrawOrderId, offset, limit,
BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis()));
}

@Override
public List<SubAccountTransfer> getSubAccountTransfers() {
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/com/binance/api/client/impl/BinanceApiService.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Call<List<Trade>> getMyTrades(@Query("symbol") String symbol, @Query("limit") In

@Headers(BinanceApiConstants.ENDPOINT_SECURITY_TYPE_SIGNED_HEADER)
@POST("/sapi/v1/capital/withdraw/apply")
Call<WithdrawResult> withdraw(@Query("coin") String coin,@Query("withdrawOrderId") String clientOrderId,
Call<WithdrawResult> withdraw(@Query("coin") String coin, @Query("withdrawOrderId") String withdrawOrderId,
@Query("network") String network, @Query("address") String address,
@Query("addressTag") String addressTag, @Query("amount") String amount,
@Query("transactionFeeFlag") Boolean feeFlag, @Query("name") String name,
Expand All @@ -162,17 +162,17 @@ Call<WithdrawResult> withdraw(@Query("coin") String coin,@Query("withdrawOrderId

@Headers(BinanceApiConstants.ENDPOINT_SECURITY_TYPE_SIGNED_HEADER)
@GET("/sapi/v1/capital/deposit/hisrec")
Call<List<Deposit>> getDepositHistory(@Query("coin") String coin, @Query("status") int status,
@Query("startTime") Long startTime, @Query("endTime") Long endTime,
@Query("offset") int offset, @Query("limit") int limit,
@Query("recvWindow") Long recvWindow, @Query("timestamp") Long timestamp);
Call<List<Deposit>> getDepositHistory(@Query("coin") String coin, @Query("status") Integer status,
@Query("startTime") Long startTime, @Query("endTime") Long endTime,
@Query("offset") int offset, @Query("limit") int limit,
@Query("recvWindow") Long recvWindow, @Query("timestamp") Long timestamp);

@Headers(BinanceApiConstants.ENDPOINT_SECURITY_TYPE_SIGNED_HEADER)
@GET("/sapi/v1/capital/withdraw/history")
Call<List<Withdraw>> getWithdrawHistory(@Query("coin") String coin, @Query("status") int status,
@Query("startTime") Long startTime, @Query("endTime") Long endTime,
@Query("offset") int offset, @Query("limit") int limit,
@Query("recvWindow") Long recvWindow, @Query("timestamp") Long timestamp);
Call<List<Withdraw>> getWithdrawHistory(@Query("coin") String coin, @Query("status") Integer status,
@Query("startTime") Long startTime, @Query("endTime") Long endTime, @Query("withdrawOrderId") String withdrawOrderId,
@Query("offset") int offset, @Query("limit") int limit,
@Query("recvWindow") Long recvWindow, @Query("timestamp") Long timestamp);

@Headers(BinanceApiConstants.ENDPOINT_SECURITY_TYPE_SIGNED_HEADER)
@GET("/sapi/v1/capital/deposit/address")
Expand Down