Skip to content
This repository has been archived by the owner on Oct 30, 2023. It is now read-only.

Update wallet endpoints #397

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

rezazadeh93
Copy link

Updated WAPI endpoints to SAPI endpoints

Added all arguments that are supported by binance to these methods:

  • withdraw
  • deposit
  • withdraw history
  • deposit history

@rezazadeh93
Copy link
Author

if this pull request helped you, I'll be pleased to give me your feedback.

@TheLeBot TheLeBot mentioned this pull request Aug 25, 2021
@OfficialVreesie
Copy link

Using the code I get an error when I don't have any deposits in the result. I get the following result from binance: [], but in my java code I get this error:

com.binance.api.client.exception.BinanceApiException: com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type com.binance.api.client.domain.account.DepositHistory from Array value (token JsonToken.START_ARRAY)
 at [Source: (okhttp3.ResponseBody$BomAwareReader); line: 1, column: 1]

What can I change to prevent casting to DepositHistory when there is no result?

@@ -265,13 +266,14 @@
*
* Enable Withdrawals option has to be active in the API settings.
*
* @param asset asset symbol to withdraw
* @param coin asset symbol to withdraw
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not all params documented

/**
* Fetch account deposit history.
*
* @return deposit history, containing a list of deposits
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Param description missing

*
* @return withdraw history, containing a list of withdrawals
*/
WithdrawHistory getWithdrawHistory(String coin, int status, Long startTime, Long endTime,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dito

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean of dito

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean comments are somehow missing (new param descriptions)

@rezazadeh93
Copy link
Author

@PanderBoy18 pushed new commits, I hope the bug is fixed

@OfficialVreesie
Copy link

Yesss!!!! This fixed the bug. Great work!

@TheLeBot
Copy link

Great! Works for me too! Thanks!


@Override
public void getDepositHistory(String coin, BinanceApiCallback<List<Deposit>> callback) {
binanceApiService.getDepositHistory(coin, 0, null, null, 0, 1000,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second parameter uses 0 (status) which will result in getting only those deposits, which status is 0 = pending. One should use null instead to get all deposits. For that you should update BinanceApiService interface and use Integer for status field in order to provide null value.
Another way of defaulting would by setting status to 1. This way you will get successful deposits defaultly.

public void getWithdrawHistory(String asset, BinanceApiCallback<WithdrawHistory> callback) {
binanceApiService.getWithdrawHistory(asset, BinanceApiConstants.DEFAULT_RECEIVING_WINDOW, System.currentTimeMillis())
public void getWithdrawHistory(String coin, BinanceApiCallback<List<Withdraw>> callback) {
binanceApiService.getWithdrawHistory(coin, 0, null, null, 0, 1000,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same thing as with deposit history. Additionally the new withdrawOrderId is missing. Would be nice to have this in the branch. https://binance-docs.github.io/apidocs/spot/en/#withdraw-history-supporting-network-user_data

@ravesteijnd
Copy link

I continued on this because I ran into the issue of having 0 as default instead of null in the requests. @rezazadeh93 see rezazadeh93#2.

…oints

Rezazadeh93 update wallet endpoints
@strazdinsg
Copy link

Is anyone maintaining this repository? It seems that old pull requests are never merged.

@ravesteijnd
Copy link

Is anyone maintaining this repository? It seems that old pull requests are never merged.

See #421

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants