Skip to content
Merged
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
8 changes: 7 additions & 1 deletion clients/wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 2.0.0 - 2025-06-11

### Added (1)

- `fetchAddressVerificationList()` (`GET /sapi/v1/addressVerify/list`)

## 1.1.0 - 2025-05-02

- Update `binance/common` module to version `1.1.0`.
Expand All @@ -8,4 +14,4 @@

## 1.0.0 - 2025-04-24

- Initial release
- Initial release
4 changes: 2 additions & 2 deletions clients/wallet/docs/rest-api/migration-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ With the transition to a modularized structure, the Binance Connector has been s
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-wallet</artifactId>
<version>1.1.0</version>
<version>2.0.0</version>
</dependency>
```

Expand Down Expand Up @@ -91,7 +91,7 @@ by:
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-wallet</artifactId>
<version>1.1.0</version>
<version>2.0.0</version>
</dependency>
```

Expand Down
2 changes: 2 additions & 0 deletions clients/wallet/example_rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@

[GET /sapi/v1/localentity/deposit/history](https://developers.binance.com/docs/wallet/travel-rule/Deposit-History) - depositHistoryTravelRule - [DepositHistoryTravelRuleExample.java:51](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/DepositHistoryTravelRuleExample.java#L51)

[GET /sapi/v1/addressVerify/list](https://developers.binance.com/docs/wallet/travel-rule/address-verification-list) - fetchAddressVerificationList - [FetchAddressVerificationListExample.java:46](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/FetchAddressVerificationListExample.java#L46)

[GET /sapi/v1/localentity/vasp](https://developers.binance.com/docs/wallet/travel-rule/Onboarded-VASP-list) - onboardedVaspList - [OnboardedVaspListExample.java:52](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/OnboardedVaspListExample.java#L52)

[PUT /sapi/v1/localentity/broker/deposit/provide-info](https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info) - submitDepositQuestionnaire - [SubmitDepositQuestionnaireExample.java:52](/examples/wallet/src/main/java/com/binance/connector/client/wallet/rest/travelrule/SubmitDepositQuestionnaireExample.java#L52)
Expand Down
4 changes: 2 additions & 2 deletions clients/wallet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>binance-wallet</artifactId>
<name>wallet</name>
<version>1.1.0</version>
<version>2.0.0</version>
<packaging>jar</packaging>

<parent>
Expand All @@ -31,7 +31,7 @@
<dependency>
<groupId>io.github.binance</groupId>
<artifactId>binance-common</artifactId>
<version>1.1.0</version>
<version>1.2.1</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,16 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.wallet.rest.model.EnableFastWithdrawSwitchRequest
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.wallet.rest.model
.FetchAddressVerificationListResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.wallet.rest.model
.FetchAddressVerificationListResponseInner.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.wallet.rest.model
.FetchAddressVerificationListResponseInnerAddressQuestionnaire
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.binance.connector.client.wallet.rest.model
.FetchDepositAddressListWithNetworkResponse.CustomTypeAdapterFactory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class AccountApi {

private static final String USER_AGENT =
String.format(
"binance-wallet/1.1.0 (Java/%s; %s; %s)",
"binance-wallet/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public class AssetApi {

private static final String USER_AGENT =
String.format(
"binance-wallet/1.1.0 (Java/%s; %s; %s)",
"binance-wallet/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class CapitalApi {

private static final String USER_AGENT =
String.format(
"binance-wallet/1.1.0 (Java/%s; %s; %s)",
"binance-wallet/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;

Expand Down Expand Up @@ -1404,7 +1404,8 @@ public ApiResponse<WithdrawResponse> withdraw(@Valid @NotNull WithdrawRequest wi
* Build call for withdrawHistory
*
* @param coin (optional)
* @param withdrawOrderId (optional)
* @param withdrawOrderId client side id for withdrawal, if provided in POST
* &#x60;/sapi/v1/capital/withdraw/apply&#x60;, can be used here for query. (optional)
* @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed)
* (optional)
* @param offset Default: 0 (optional)
Expand Down Expand Up @@ -1608,7 +1609,8 @@ private okhttp3.Call withdrawHistoryValidateBeforeCall(
* 10 requests per second
*
* @param coin (optional)
* @param withdrawOrderId (optional)
* @param withdrawOrderId client side id for withdrawal, if provided in POST
* &#x60;/sapi/v1/capital/withdraw/apply&#x60;, can be used here for query. (optional)
* @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed)
* (optional)
* @param offset Default: 0 (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public class OthersApi {

private static final String USER_AGENT =
String.format(
"binance-wallet/1.1.0 (Java/%s; %s; %s)",
"binance-wallet/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.binance.connector.client.wallet.rest.model.BrokerWithdrawRequest;
import com.binance.connector.client.wallet.rest.model.BrokerWithdrawResponse;
import com.binance.connector.client.wallet.rest.model.DepositHistoryTravelRuleResponse;
import com.binance.connector.client.wallet.rest.model.FetchAddressVerificationListResponse;
import com.binance.connector.client.wallet.rest.model.OnboardedVaspListResponse;
import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireRequest;
import com.binance.connector.client.wallet.rest.model.SubmitDepositQuestionnaireResponse;
Expand Down Expand Up @@ -55,7 +56,7 @@ public class TravelRuleApi {

private static final String USER_AGENT =
String.format(
"binance-wallet/1.1.0 (Java/%s; %s; %s)",
"binance-wallet/2.0.0 (Java/%s; %s; %s)",
SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch());
private static final boolean HAS_TIME_UNIT = false;

Expand Down Expand Up @@ -574,6 +575,136 @@ public ApiResponse<DepositHistoryTravelRuleResponse> depositHistoryTravelRule(
return localVarApiClient.execute(localVarCall, localVarReturnType);
}

/**
* Build call for fetchAddressVerificationList
*
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
* <table border="1">
* <caption>Response Details</caption>
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> Fetch address verification list </td><td> - </td></tr>
* </table>
*
* @see <a
* href="https://developers.binance.com/docs/wallet/travel-rule/address-verification-list">Fetch
* address verification list (USER_DATA) Documentation</a>
*/
private okhttp3.Call fetchAddressVerificationListCall() throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] {};

// Determine Base Path to Use
if (localCustomBaseUrl != null) {
basePath = localCustomBaseUrl;
} else if (localBasePaths.length > 0) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}

Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/sapi/v1/addressVerify/list";

List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

final String[] localVarAccepts = {"application/json"};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}

final String[] localVarContentTypes = {"application/x-www-form-urlencoded"};
final String localVarContentType =
localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
List<String> localVarAuthNames = new ArrayList<>();
localVarAuthNames.addAll(
Arrays.asList(
new String[] {
"binanceSignature",
}));
if (HAS_TIME_UNIT) {
localVarAuthNames.add("timeUnit");
}
return localVarApiClient.buildCall(
basePath,
localVarPath,
"GET",
localVarQueryParams,
localVarCollectionQueryParams,
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAuthNames.toArray(new String[0]));
}

@SuppressWarnings("rawtypes")
private okhttp3.Call fetchAddressVerificationListValidateBeforeCall() throws ApiException {
try {
Validator validator =
Validation.byDefaultProvider()
.configure()
.messageInterpolator(new ParameterMessageInterpolator())
.buildValidatorFactory()
.getValidator();
ExecutableValidator executableValidator = validator.forExecutables();

Object[] parameterValues = {};
Method method = this.getClass().getMethod("fetchAddressVerificationList");
Set<ConstraintViolation<TravelRuleApi>> violations =
executableValidator.validateParameters(this, method, parameterValues);

if (violations.size() == 0) {
return fetchAddressVerificationListCall();
} else {
throw new ConstraintViolationException((Set) violations);
}
} catch (NoSuchMethodException e) {
e.printStackTrace();
throw new ApiException(e.getMessage());
} catch (SecurityException e) {
e.printStackTrace();
throw new ApiException(e.getMessage());
}
}

/**
* Fetch address verification list (USER_DATA) Fetch address verification list Weight: 10
*
* @return ApiResponse&lt;FetchAddressVerificationListResponse&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
* @http.response.details
* <table border="1">
* <caption>Response Details</caption>
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> Fetch address verification list </td><td> - </td></tr>
* </table>
*
* @see <a
* href="https://developers.binance.com/docs/wallet/travel-rule/address-verification-list">Fetch
* address verification list (USER_DATA) Documentation</a>
*/
public ApiResponse<FetchAddressVerificationListResponse> fetchAddressVerificationList()
throws ApiException {
okhttp3.Call localVarCall = fetchAddressVerificationListValidateBeforeCall();
java.lang.reflect.Type localVarReturnType =
new TypeToken<FetchAddressVerificationListResponse>() {}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}

/**
* Build call for onboardedVaspList
*
Expand Down Expand Up @@ -1076,7 +1207,8 @@ private okhttp3.Call submitDepositQuestionnaireTravelRuleValidateBeforeCall(
*
* @param trId Comma(,) separated list of travel rule record Ids. (optional)
* @param txId (optional)
* @param withdrawOrderId (optional)
* @param withdrawOrderId client side id for withdrawal, if provided in POST
* &#x60;/sapi/v1/capital/withdraw/apply&#x60;, can be used here for query. (optional)
* @param network (optional)
* @param coin (optional)
* @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional)
Expand Down Expand Up @@ -1309,7 +1441,8 @@ private okhttp3.Call withdrawHistoryV1ValidateBeforeCall(
*
* @param trId Comma(,) separated list of travel rule record Ids. (optional)
* @param txId (optional)
* @param withdrawOrderId (optional)
* @param withdrawOrderId client side id for withdrawal, if provided in POST
* &#x60;/sapi/v1/capital/withdraw/apply&#x60;, can be used here for query. (optional)
* @param network (optional)
* @param coin (optional)
* @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional)
Expand Down Expand Up @@ -1369,7 +1502,8 @@ public ApiResponse<WithdrawHistoryV1Response> withdrawHistoryV1(
*
* @param trId Comma(,) separated list of travel rule record Ids. (optional)
* @param txId (optional)
* @param withdrawOrderId (optional)
* @param withdrawOrderId client side id for withdrawal, if provided in POST
* &#x60;/sapi/v1/capital/withdraw/apply&#x60;, can be used here for query. (optional)
* @param network (optional)
* @param coin (optional)
* @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional)
Expand Down Expand Up @@ -1608,7 +1742,8 @@ private okhttp3.Call withdrawHistoryV2ValidateBeforeCall(
*
* @param trId Comma(,) separated list of travel rule record Ids. (optional)
* @param txId (optional)
* @param withdrawOrderId (optional)
* @param withdrawOrderId client side id for withdrawal, if provided in POST
* &#x60;/sapi/v1/capital/withdraw/apply&#x60;, can be used here for query. (optional)
* @param network (optional)
* @param coin (optional)
* @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.binance.connector.client.wallet.rest.model.DustTransferResponse;
import com.binance.connector.client.wallet.rest.model.DustlogResponse;
import com.binance.connector.client.wallet.rest.model.EnableFastWithdrawSwitchRequest;
import com.binance.connector.client.wallet.rest.model.FetchAddressVerificationListResponse;
import com.binance.connector.client.wallet.rest.model.FetchDepositAddressListWithNetworkResponse;
import com.binance.connector.client.wallet.rest.model.FetchWithdrawAddressListResponse;
import com.binance.connector.client.wallet.rest.model.FetchWithdrawQuotaResponse;
Expand Down Expand Up @@ -924,7 +925,8 @@ public ApiResponse<WithdrawResponse> withdraw(WithdrawRequest withdrawRequest)
* 10 requests per second
*
* @param coin (optional)
* @param withdrawOrderId (optional)
* @param withdrawOrderId client side id for withdrawal, if provided in POST
* &#x60;/sapi/v1/capital/withdraw/apply&#x60;, can be used here for query. (optional)
* @param status 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed)
* (optional)
* @param offset Default: 0 (optional)
Expand Down Expand Up @@ -1103,6 +1105,28 @@ public ApiResponse<DepositHistoryTravelRuleResponse> depositHistoryTravelRule(
limit);
}

/**
* Fetch address verification list (USER_DATA) Fetch address verification list Weight: 10
*
* @return ApiResponse&lt;FetchAddressVerificationListResponse&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the
* response body
* @http.response.details
* <table border="1">
* <caption>Response Details</caption>
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> Fetch address verification list </td><td> - </td></tr>
* </table>
*
* @see <a
* href="https://developers.binance.com/docs/wallet/travel-rule/address-verification-list">Fetch
* address verification list (USER_DATA) Documentation</a>
*/
public ApiResponse<FetchAddressVerificationListResponse> fetchAddressVerificationList()
throws ApiException {
return travelRuleApi.fetchAddressVerificationList();
}

/**
* Onboarded VASP list (for local entities that require travel rule) (supporting network)
* (USER_DATA) Fetch the onboarded VASP list for local entities that required travel rule. *
Expand Down Expand Up @@ -1208,7 +1232,8 @@ public ApiResponse<SubmitDepositQuestionnaireResponse> submitDepositQuestionnair
*
* @param trId Comma(,) separated list of travel rule record Ids. (optional)
* @param txId (optional)
* @param withdrawOrderId (optional)
* @param withdrawOrderId client side id for withdrawal, if provided in POST
* &#x60;/sapi/v1/capital/withdraw/apply&#x60;, can be used here for query. (optional)
* @param network (optional)
* @param coin (optional)
* @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional)
Expand Down Expand Up @@ -1279,7 +1304,8 @@ public ApiResponse<WithdrawHistoryV1Response> withdrawHistoryV1(
*
* @param trId Comma(,) separated list of travel rule record Ids. (optional)
* @param txId (optional)
* @param withdrawOrderId (optional)
* @param withdrawOrderId client side id for withdrawal, if provided in POST
* &#x60;/sapi/v1/capital/withdraw/apply&#x60;, can be used here for query. (optional)
* @param network (optional)
* @param coin (optional)
* @param travelRuleStatus 0:Completed,1:Pending,2:Failed (optional)
Expand Down
Loading