From ed5f58ec1102a4410525d47635ee3302f4d3e642 Mon Sep 17 00:00:00 2001 From: theo-s68 <194042188+theo-s68@users.noreply.github.com> Date: Mon, 21 Sep 2026 12:19:58 +0700 Subject: [PATCH] Release web3-wallet v4.3.0 --- clients/web3-wallet/CHANGELOG.md | 13 +++- clients/web3-wallet/docs/EnableRFQ.md | 13 ++++ clients/web3-wallet/docs/TradingApi.md | 8 +- clients/web3-wallet/docs/WebSocketApi.md | 2 +- clients/web3-wallet/example_rest.md | 4 +- clients/web3-wallet/pom.xml | 2 +- .../rest/api/AddressPortfolioApi.java | 2 +- .../web3_wallet/rest/api/B402PaymentsApi.java | 2 +- .../web3_wallet/rest/api/DefiDataApi.java | 2 +- .../rest/api/DefiTransactionApi.java | 2 +- .../web3_wallet/rest/api/GeneralDataApi.java | 2 +- .../web3_wallet/rest/api/RwaDataApi.java | 2 +- .../web3_wallet/rest/api/TradingApi.java | 70 +++++++++++++++++- .../web3_wallet/rest/api/TransactionApi.java | 2 +- .../web3_wallet/rest/api/WalletApi.java | 2 +- .../rest/api/Web3WalletRestApi.java | 20 ++++- .../web3_wallet/rest/api/WebSocketApi.java | 2 +- .../web3_wallet/rest/model/EnableRFQ.java | 73 +++++++++++++++++++ examples/web3-wallet/pom.xml | 2 +- .../QuoteAndBuildSwapTransactionExample.java | 3 + .../GetWebSocketAuthTokenExample.java | 4 +- 21 files changed, 213 insertions(+), 19 deletions(-) create mode 100644 clients/web3-wallet/docs/EnableRFQ.md create mode 100644 clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/model/EnableRFQ.java diff --git a/clients/web3-wallet/CHANGELOG.md b/clients/web3-wallet/CHANGELOG.md index fb3007b..5efa8f8 100644 --- a/clients/web3-wallet/CHANGELOG.md +++ b/clients/web3-wallet/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## 4.3.0 - 2026-09-21 + +### Changed (2) + +- Added parameter `enableRFQ` + - affected methods: + - `quoteAndBuildSwapTransaction()` (`GET /api/v1/dex/aggregator/quote-and-swap`) +- Added parameter `excludeDexes` + - affected methods: + - `quoteAndBuildSwapTransaction()` (`GET /api/v1/dex/aggregator/quote-and-swap`) + ## 4.2.0 - 2026-09-02 ### Added (1) @@ -68,7 +79,7 @@ - `data`.`routerResult`: property `feeAmount` added - `data`.`routerResult`: property `actualSwapAmount` added -## 1.0.0 - 2026-07-24 +## 1.0.0 - 2026-07-24 ### Changed (1) diff --git a/clients/web3-wallet/docs/EnableRFQ.md b/clients/web3-wallet/docs/EnableRFQ.md new file mode 100644 index 0000000..1f97038 --- /dev/null +++ b/clients/web3-wallet/docs/EnableRFQ.md @@ -0,0 +1,13 @@ + + +# EnableRFQ + +## Enum + + +* `TRUE` (value: `"true"`) + +* `FALSE` (value: `"false"`) + + + diff --git a/clients/web3-wallet/docs/TradingApi.md b/clients/web3-wallet/docs/TradingApi.md index ccf3afa..ab14ffa 100644 --- a/clients/web3-wallet/docs/TradingApi.md +++ b/clients/web3-wallet/docs/TradingApi.md @@ -643,7 +643,7 @@ No authorization required # **quoteAndBuildSwapTransaction** -> QuoteAndBuildSwapTransactionResponse quoteAndBuildSwapTransaction(binanceChainId, amount, fromTokenAddress, toTokenAddress, userWalletAddress, vendor).recvWindow(recvWindow).nonce(nonce).slippagePercent(slippagePercent).approveTransaction(approveTransaction).approveAmount(approveAmount).gasLimit(gasLimit).gasLevel(gasLevel).priceImpactProtectionPercent(priceImpactProtectionPercent).autoSlippage(autoSlippage).maxAutoSlippagePercent(maxAutoSlippagePercent).computeUnitLimit(computeUnitLimit).computeUnitPrice(computeUnitPrice).tips(tips).feePercent(feePercent).fromTokenReferrerWalletAddress(fromTokenReferrerWalletAddress).toTokenReferrerWalletAddress(toTokenReferrerWalletAddress).execute(); +> QuoteAndBuildSwapTransactionResponse quoteAndBuildSwapTransaction(binanceChainId, amount, fromTokenAddress, toTokenAddress, userWalletAddress, vendor).recvWindow(recvWindow).nonce(nonce).slippagePercent(slippagePercent).excludeDexes(excludeDexes).enableRFQ(enableRFQ).approveTransaction(approveTransaction).approveAmount(approveAmount).gasLimit(gasLimit).gasLevel(gasLevel).priceImpactProtectionPercent(priceImpactProtectionPercent).autoSlippage(autoSlippage).maxAutoSlippagePercent(maxAutoSlippagePercent).computeUnitLimit(computeUnitLimit).computeUnitPrice(computeUnitPrice).tips(tips).feePercent(feePercent).fromTokenReferrerWalletAddress(fromTokenReferrerWalletAddress).toTokenReferrerWalletAddress(toTokenReferrerWalletAddress).execute(); Quote and Build Swap Transaction (Flash API) @@ -673,6 +673,8 @@ public class Example { Long recvWindow = 5000L; // Long | Allowed time deviation in milliseconds (default: 5000, max: 60000). String nonce = "unique-nonce-string"; // String | Unique request identifier for anti-replay; falls back to X-OC-SIGN if omitted. String slippagePercent = "0.5"; // String | Maximum slippage tolerance as a percentage string. Required unless `autoSlippage=true`. **Range by chain:** - EVM chains (BSC, Ethereum, Base, etc.): `0` to `100` (inclusive) - Solana (`CT_501`): `0` to less than `100` (i.e. `< 100`) `\"0.5\"` means 0.5% maximum slippage. When `autoSlippage=true` this field is overridden by the auto-computed value. + String excludeDexes = "Pancakeswap V4,Pancakeswap V3"; // String | Comma-separated list of DEXes to exclude from routing. Pass the `dexName` values returned in the response `routerResult.dexRouterList` as-is (e.g. `\"Pancakeswap V4,Pancakeswap V3\"`). On EVM/Sui/Tron chains they are normalized automatically; on Solana the value is case-sensitive and must match the response exactly. Omit or leave empty to exclude nothing. + EnableRFQ enableRFQ = EnableRFQ.fromValue("true"); // EnableRFQ | Whether to enable RFQ liquidity sources for routing. Default depends on the token pair: **BStock pairs default to `\"true\"` (RFQ enabled)**; all other tokens default to `\"false\"` (RFQ disabled, AMM-only routing). An explicit value always overrides the default. `\"true\"` may return better pricing, but the returned calldata may embed RFQ settlements with a short (~30s) deadline. ApproveTransaction approveTransaction = ApproveTransaction.fromValue("true"); // ApproveTransaction | When \"true\", `signatureData` includes the spender address and approve calldata so the client can submit it before the swap. Defaults to false. String approveAmount = "1000000"; // String | Override approve amount (smallest unit, positive integer string). Defaults to the swap amount. String gasLimit = "200000"; // String | Gas limit override (positive integer string). EVM only. @@ -691,6 +693,8 @@ public class Example { .recvWindow(recvWindow) .nonce(nonce) .slippagePercent(slippagePercent) + .excludeDexes(excludeDexes) + .enableRFQ(enableRFQ) .approveTransaction(approveTransaction) .approveAmount(approveAmount) .gasLimit(gasLimit) @@ -730,6 +734,8 @@ public class Example { | **recvWindow** | **Long**| Allowed time deviation in milliseconds (default: 5000, max: 60000). | [optional] | | **nonce** | **String**| Unique request identifier for anti-replay; falls back to X-OC-SIGN if omitted. | [optional] | | **slippagePercent** | **String**| Maximum slippage tolerance as a percentage string. Required unless `autoSlippage=true`. **Range by chain:** - EVM chains (BSC, Ethereum, Base, etc.): `0` to `100` (inclusive) - Solana (`CT_501`): `0` to less than `100` (i.e. `< 100`) `\"0.5\"` means 0.5% maximum slippage. When `autoSlippage=true` this field is overridden by the auto-computed value. | [optional] | +| **excludeDexes** | **String**| Comma-separated list of DEXes to exclude from routing. Pass the `dexName` values returned in the response `routerResult.dexRouterList` as-is (e.g. `\"Pancakeswap V4,Pancakeswap V3\"`). On EVM/Sui/Tron chains they are normalized automatically; on Solana the value is case-sensitive and must match the response exactly. Omit or leave empty to exclude nothing. | [optional] | +| **enableRFQ** | [**EnableRFQ**](.md)| Whether to enable RFQ liquidity sources for routing. Default depends on the token pair: **BStock pairs default to `\"true\"` (RFQ enabled)**; all other tokens default to `\"false\"` (RFQ disabled, AMM-only routing). An explicit value always overrides the default. `\"true\"` may return better pricing, but the returned calldata may embed RFQ settlements with a short (~30s) deadline. | [optional] [enum: true, false] | | **approveTransaction** | [**ApproveTransaction**](.md)| When \"true\", `signatureData` includes the spender address and approve calldata so the client can submit it before the swap. Defaults to false. | [optional] [enum: true, false] | | **approveAmount** | **String**| Override approve amount (smallest unit, positive integer string). Defaults to the swap amount. | [optional] | | **gasLimit** | **String**| Gas limit override (positive integer string). EVM only. | [optional] | diff --git a/clients/web3-wallet/docs/WebSocketApi.md b/clients/web3-wallet/docs/WebSocketApi.md index 79349e5..d70d1b8 100644 --- a/clients/web3-wallet/docs/WebSocketApi.md +++ b/clients/web3-wallet/docs/WebSocketApi.md @@ -13,7 +13,7 @@ All URIs are relative to *https://web3.binance.com/build* Get WebSocket Auth Token -Get a WebSocket auth token before connecting to the WebSocket stream service. +Get a WebSocket auth token before connecting to the WebSocket stream service. For details on WebSocket usage, please refer to the [WebSocket documentation](/products/websocket-api/introduction). ### Example ```java diff --git a/clients/web3-wallet/example_rest.md b/clients/web3-wallet/example_rest.md index d15727c..350563e 100644 --- a/clients/web3-wallet/example_rest.md +++ b/clients/web3-wallet/example_rest.md @@ -112,7 +112,7 @@ [GET /api/v1/dex/aggregator/history](https://web3.binance.com/en/dev-docs/catalog/web3-wallet/api/rest-api/trading-api#get-transaction-status) - getTransactionStatus - [GetTransactionStatusExample.java:42](/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/trading/GetTransactionStatusExample.java#L42) -[GET /api/v1/dex/aggregator/quote-and-swap](https://web3.binance.com/en/dev-docs/catalog/web3-wallet/api/rest-api/trading-api#quote-and-build-swap-transaction) - quoteAndBuildSwapTransaction - [QuoteAndBuildSwapTransactionExample.java:46](/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/trading/QuoteAndBuildSwapTransactionExample.java#L46) +[GET /api/v1/dex/aggregator/quote-and-swap](https://web3.binance.com/en/dev-docs/catalog/web3-wallet/api/rest-api/trading-api#quote-and-build-swap-transaction) - quoteAndBuildSwapTransaction - [QuoteAndBuildSwapTransactionExample.java:47](/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/trading/QuoteAndBuildSwapTransactionExample.java#L47) [POST /api/v1/dex/aggregator/order/submit](https://web3.binance.com/en/dev-docs/catalog/web3-wallet/api/rest-api/trading-api#submit-rfq-order) - submitRfqOrder - [SubmitRfqOrderExample.java:44](/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/trading/SubmitRfqOrderExample.java#L44) @@ -146,5 +146,5 @@ ## WebSocket -[GET /api/v1/dex/market/wss/auth/token](https://web3.binance.com/en/dev-docs/catalog/web3-wallet/api/rest-api/web-socket-api#get-web-socket-auth-token) - getWebSocketAuthToken - [GetWebSocketAuthTokenExample.java:36](/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/websocket/GetWebSocketAuthTokenExample.java#L36) +[GET /api/v1/dex/market/wss/auth/token](https://web3.binance.com/en/dev-docs/catalog/web3-wallet/api/rest-api/web-socket-api#get-web-socket-auth-token) - getWebSocketAuthToken - [GetWebSocketAuthTokenExample.java:38](/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/websocket/GetWebSocketAuthTokenExample.java#L38) diff --git a/clients/web3-wallet/pom.xml b/clients/web3-wallet/pom.xml index 1e2383e..9bf21a4 100644 --- a/clients/web3-wallet/pom.xml +++ b/clients/web3-wallet/pom.xml @@ -5,7 +5,7 @@ 4.0.0 binance-web3-wallet web3-wallet - 4.2.0 + 4.3.0 jar diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/AddressPortfolioApi.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/AddressPortfolioApi.java index 0ba346d..18e5266 100644 --- a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/AddressPortfolioApi.java +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/AddressPortfolioApi.java @@ -53,7 +53,7 @@ public class AddressPortfolioApi { private static final String USER_AGENT = String.format( - "binance-web3-wallet/4.2.0 (Java/%s; %s; %s)", + "binance-web3-wallet/4.3.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/B402PaymentsApi.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/B402PaymentsApi.java index 8633886..24859d4 100644 --- a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/B402PaymentsApi.java +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/B402PaymentsApi.java @@ -55,7 +55,7 @@ public class B402PaymentsApi { private static final String USER_AGENT = String.format( - "binance-web3-wallet/4.2.0 (Java/%s; %s; %s)", + "binance-web3-wallet/4.3.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/DefiDataApi.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/DefiDataApi.java index 7859348..e53a37c 100644 --- a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/DefiDataApi.java +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/DefiDataApi.java @@ -52,7 +52,7 @@ public class DefiDataApi { private static final String USER_AGENT = String.format( - "binance-web3-wallet/4.2.0 (Java/%s; %s; %s)", + "binance-web3-wallet/4.3.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/DefiTransactionApi.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/DefiTransactionApi.java index 7d0e960..955417c 100644 --- a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/DefiTransactionApi.java +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/DefiTransactionApi.java @@ -55,7 +55,7 @@ public class DefiTransactionApi { private static final String USER_AGENT = String.format( - "binance-web3-wallet/4.2.0 (Java/%s; %s; %s)", + "binance-web3-wallet/4.3.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/GeneralDataApi.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/GeneralDataApi.java index a51833e..e6507d2 100644 --- a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/GeneralDataApi.java +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/GeneralDataApi.java @@ -58,7 +58,7 @@ public class GeneralDataApi { private static final String USER_AGENT = String.format( - "binance-web3-wallet/4.2.0 (Java/%s; %s; %s)", + "binance-web3-wallet/4.3.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/RwaDataApi.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/RwaDataApi.java index 82c54d8..5c54605 100644 --- a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/RwaDataApi.java +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/RwaDataApi.java @@ -48,7 +48,7 @@ public class RwaDataApi { private static final String USER_AGENT = String.format( - "binance-web3-wallet/4.2.0 (Java/%s; %s; %s)", + "binance-web3-wallet/4.3.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/TradingApi.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/TradingApi.java index 3d1565c..f435623 100644 --- a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/TradingApi.java +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/TradingApi.java @@ -24,6 +24,7 @@ import com.binance.connector.client.web3_wallet.rest.model.BinanceChainId; import com.binance.connector.client.web3_wallet.rest.model.BuildSolanaSwapInstructionsResponse; import com.binance.connector.client.web3_wallet.rest.model.BuildSwapTransactionResponse; +import com.binance.connector.client.web3_wallet.rest.model.EnableRFQ; import com.binance.connector.client.web3_wallet.rest.model.FeeSource; import com.binance.connector.client.web3_wallet.rest.model.GasLevel; import com.binance.connector.client.web3_wallet.rest.model.GetAggregatedQuoteResponse; @@ -58,7 +59,7 @@ public class TradingApi { private static final String USER_AGENT = String.format( - "binance-web3-wallet/4.2.0 (Java/%s; %s; %s)", + "binance-web3-wallet/4.3.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; @@ -2656,6 +2657,8 @@ private okhttp3.Call quoteAndBuildSwapTransactionCall( Long recvWindow, String nonce, String slippagePercent, + String excludeDexes, + EnableRFQ enableRFQ, ApproveTransaction approveTransaction, String approveAmount, String gasLimit, @@ -2727,6 +2730,15 @@ private okhttp3.Call quoteAndBuildSwapTransactionCall( localVarQueryParams.addAll(localVarApiClient.parameterToPair("vendor", vendor)); } + if (excludeDexes != null) { + localVarQueryParams.addAll( + localVarApiClient.parameterToPair("excludeDexes", excludeDexes)); + } + + if (enableRFQ != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("enableRFQ", enableRFQ)); + } + if (approveTransaction != null) { localVarQueryParams.addAll( localVarApiClient.parameterToPair("approveTransaction", approveTransaction)); @@ -2842,6 +2854,8 @@ private okhttp3.Call quoteAndBuildSwapTransactionValidateBeforeCall( Long recvWindow, String nonce, String slippagePercent, + String excludeDexes, + EnableRFQ enableRFQ, ApproveTransaction approveTransaction, String approveAmount, String gasLimit, @@ -2875,6 +2889,8 @@ private okhttp3.Call quoteAndBuildSwapTransactionValidateBeforeCall( recvWindow, nonce, slippagePercent, + excludeDexes, + enableRFQ, approveTransaction, approveAmount, gasLimit, @@ -2902,6 +2918,8 @@ private okhttp3.Call quoteAndBuildSwapTransactionValidateBeforeCall( Long.class, String.class, String.class, + String.class, + EnableRFQ.class, ApproveTransaction.class, String.class, String.class, @@ -2929,6 +2947,8 @@ private okhttp3.Call quoteAndBuildSwapTransactionValidateBeforeCall( recvWindow, nonce, slippagePercent, + excludeDexes, + enableRFQ, approveTransaction, approveAmount, gasLimit, @@ -2964,6 +2984,8 @@ public ApiResponse quoteAndBuildSwapTransa Long recvWindow, String nonce, String slippagePercent, + String excludeDexes, + EnableRFQ enableRFQ, ApproveTransaction approveTransaction, String approveAmount, String gasLimit, @@ -2989,6 +3011,8 @@ public ApiResponse quoteAndBuildSwapTransa recvWindow, nonce, slippagePercent, + excludeDexes, + enableRFQ, approveTransaction, approveAmount, gasLimit, @@ -3019,6 +3043,8 @@ public ApiResponse quoteAndBuildSwapTransa request.getRecvWindow(), request.getNonce(), request.getSlippagePercent(), + request.getExcludeDexes(), + request.getEnableRFQ(), request.getApproveTransaction(), request.getApproveAmount(), request.getGasLimit(), @@ -3044,6 +3070,8 @@ public static class QuoteAndBuildSwapTransactionRequest { private Long recvWindow; private String nonce; private String slippagePercent; + private String excludeDexes; + private EnableRFQ enableRFQ; private ApproveTransaction approveTransaction; private String approveAmount; private String gasLimit; @@ -3094,6 +3122,14 @@ public String getSlippagePercent() { return slippagePercent; } + public String getExcludeDexes() { + return excludeDexes; + } + + public EnableRFQ getEnableRFQ() { + return enableRFQ; + } + public ApproveTransaction getApproveTransaction() { return approveTransaction; } @@ -3202,6 +3238,38 @@ public QuoteAndBuildSwapTransactionRequest slippagePercent(String slippagePercen return this; } + /** + * Set excludeDexes + * + * @param excludeDexes Comma-separated list of DEXes to exclude from routing. Pass the + * `dexName` values returned in the response + * `routerResult.dexRouterList` as-is (e.g. `\"Pancakeswap + * V4,Pancakeswap V3\"`). On EVM/Sui/Tron chains they are normalized + * automatically; on Solana the value is case-sensitive and must match the response + * exactly. Omit or leave empty to exclude nothing. (optional) + * @return QuoteAndBuildSwapTransactionRequest + */ + public QuoteAndBuildSwapTransactionRequest excludeDexes(String excludeDexes) { + this.excludeDexes = excludeDexes; + return this; + } + + /** + * Set enableRFQ + * + * @param enableRFQ Whether to enable RFQ liquidity sources for routing. Default depends on + * the token pair: **BStock pairs default to `\"true\"` (RFQ + * enabled)**; all other tokens default to `\"false\"` (RFQ + * disabled, AMM-only routing). An explicit value always overrides the default. + * `\"true\"` may return better pricing, but the returned calldata + * may embed RFQ settlements with a short (~30s) deadline. (optional) + * @return QuoteAndBuildSwapTransactionRequest + */ + public QuoteAndBuildSwapTransactionRequest enableRFQ(EnableRFQ enableRFQ) { + this.enableRFQ = enableRFQ; + return this; + } + /** * Set approveTransaction * diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/TransactionApi.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/TransactionApi.java index 27e2d99..4cc0450 100644 --- a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/TransactionApi.java +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/TransactionApi.java @@ -53,7 +53,7 @@ public class TransactionApi { private static final String USER_AGENT = String.format( - "binance-web3-wallet/4.2.0 (Java/%s; %s; %s)", + "binance-web3-wallet/4.3.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/WalletApi.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/WalletApi.java index b67c9c7..cc9960d 100644 --- a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/WalletApi.java +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/WalletApi.java @@ -49,7 +49,7 @@ public class WalletApi { private static final String USER_AGENT = String.format( - "binance-web3-wallet/4.2.0 (Java/%s; %s; %s)", + "binance-web3-wallet/4.3.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/Web3WalletRestApi.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/Web3WalletRestApi.java index 3969f42..eaa3d35 100644 --- a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/Web3WalletRestApi.java +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/Web3WalletRestApi.java @@ -25,6 +25,7 @@ import com.binance.connector.client.web3_wallet.rest.model.BuildSwapTransactionResponse; import com.binance.connector.client.web3_wallet.rest.model.CalculateLpAddPairedAmountsRequest; import com.binance.connector.client.web3_wallet.rest.model.CalculateLpAddPairedAmountsResponse; +import com.binance.connector.client.web3_wallet.rest.model.EnableRFQ; import com.binance.connector.client.web3_wallet.rest.model.FeeSource; import com.binance.connector.client.web3_wallet.rest.model.GasLevel; import com.binance.connector.client.web3_wallet.rest.model.GetAddressPnLForSpecificTokenResponse; @@ -2785,6 +2786,18 @@ public ApiResponse quoteAndBuildSwapTransa * `\"0.5\"` means 0.5% maximum slippage. When * `autoSlippage=true` this field is overridden by the auto-computed value. * (optional) + * @param excludeDexes Comma-separated list of DEXes to exclude from routing. Pass the + * `dexName` values returned in the response + * `routerResult.dexRouterList` as-is (e.g. `\"Pancakeswap + * V4,Pancakeswap V3\"`). On EVM/Sui/Tron chains they are normalized + * automatically; on Solana the value is case-sensitive and must match the response exactly. + * Omit or leave empty to exclude nothing. (optional) + * @param enableRFQ Whether to enable RFQ liquidity sources for routing. Default depends on the + * token pair: **BStock pairs default to `\"true\"` (RFQ enabled)**; all + * other tokens default to `\"false\"` (RFQ disabled, AMM-only routing). + * An explicit value always overrides the default. `\"true\"` may return + * better pricing, but the returned calldata may embed RFQ settlements with a short (~30s) + * deadline. (optional) * @param approveTransaction When \"true\", `signatureData` includes the * spender address and approve calldata so the client can submit it before the swap. * Defaults to false. (optional) @@ -2863,6 +2876,8 @@ public ApiResponse quoteAndBuildSwapTransa Long recvWindow, String nonce, String slippagePercent, + String excludeDexes, + EnableRFQ enableRFQ, ApproveTransaction approveTransaction, String approveAmount, String gasLimit, @@ -2887,6 +2902,8 @@ public ApiResponse quoteAndBuildSwapTransa recvWindow, nonce, slippagePercent, + excludeDexes, + enableRFQ, approveTransaction, approveAmount, gasLimit, @@ -3462,7 +3479,8 @@ public ApiResponse getWebSocketAuthToken( /** * Get WebSocket Auth Token Get a WebSocket auth token before connecting to the WebSocket stream - * service. + * service. For details on WebSocket usage, please refer to the [WebSocket + * documentation](/products/websocket-api/introduction). * * @param recvWindow Allowed time deviation in milliseconds (default: 5000, max: 60000). * (optional) diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/WebSocketApi.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/WebSocketApi.java index bb5faf7..f286f89 100644 --- a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/WebSocketApi.java +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/api/WebSocketApi.java @@ -42,7 +42,7 @@ public class WebSocketApi { private static final String USER_AGENT = String.format( - "binance-web3-wallet/4.2.0 (Java/%s; %s; %s)", + "binance-web3-wallet/4.3.0 (Java/%s; %s; %s)", SystemUtil.getJavaVersion(), SystemUtil.getOs(), SystemUtil.getArch()); private static final boolean HAS_TIME_UNIT = false; diff --git a/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/model/EnableRFQ.java b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/model/EnableRFQ.java new file mode 100644 index 0000000..9755f93 --- /dev/null +++ b/clients/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/model/EnableRFQ.java @@ -0,0 +1,73 @@ +/* + * Binance Web3 API + * Cross-chain wallet, market, trading, transaction, and B402 payment APIs for the Binance Web3 API platform. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +package com.binance.connector.client.web3_wallet.rest.model; + +import com.google.gson.JsonElement; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import jakarta.validation.constraints.*; +import java.io.IOException; +import org.hibernate.validator.constraints.*; + +/** Gets or Sets enableRFQ */ +@JsonAdapter(EnableRFQ.Adapter.class) +public enum EnableRFQ { + TRUE("true"), + + FALSE("false"); + + private String value; + + EnableRFQ(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static EnableRFQ fromValue(String value) { + for (EnableRFQ b : EnableRFQ.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final EnableRFQ enumeration) + throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public EnableRFQ read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return EnableRFQ.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + EnableRFQ.fromValue(value); + } +} diff --git a/examples/web3-wallet/pom.xml b/examples/web3-wallet/pom.xml index b011891..d80d786 100644 --- a/examples/web3-wallet/pom.xml +++ b/examples/web3-wallet/pom.xml @@ -31,7 +31,7 @@ io.github.binance binance-web3-wallet - 4.2.0 + 4.3.0 \ No newline at end of file diff --git a/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/trading/QuoteAndBuildSwapTransactionExample.java b/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/trading/QuoteAndBuildSwapTransactionExample.java index 28bff9e..f8add58 100644 --- a/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/trading/QuoteAndBuildSwapTransactionExample.java +++ b/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/trading/QuoteAndBuildSwapTransactionExample.java @@ -9,6 +9,7 @@ import com.binance.connector.client.web3_wallet.rest.api.Web3WalletRestApi; import com.binance.connector.client.web3_wallet.rest.model.ApproveTransaction; import com.binance.connector.client.web3_wallet.rest.model.AutoSlippage; +import com.binance.connector.client.web3_wallet.rest.model.EnableRFQ; import com.binance.connector.client.web3_wallet.rest.model.GasLevel; import com.binance.connector.client.web3_wallet.rest.model.QuoteAndBuildSwapTransactionResponse; import com.binance.connector.client.web3_wallet.rest.model.Vendor; @@ -53,6 +54,8 @@ public void quoteAndBuildSwapTransactionExample() throws ApiException { Long recvWindow = 5000L; String nonce = "unique-nonce-string"; String slippagePercent = "0.5"; + String excludeDexes = "Pancakeswap V4,Pancakeswap V3"; + EnableRFQ enableRFQ = EnableRFQ.TRUE; ApproveTransaction approveTransaction = ApproveTransaction.TRUE; String approveAmount = "1000000"; String gasLimit = "200000"; diff --git a/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/websocket/GetWebSocketAuthTokenExample.java b/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/websocket/GetWebSocketAuthTokenExample.java index 6a36675..58f0589 100644 --- a/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/websocket/GetWebSocketAuthTokenExample.java +++ b/examples/web3-wallet/src/main/java/com/binance/connector/client/web3_wallet/rest/websocket/GetWebSocketAuthTokenExample.java @@ -29,7 +29,9 @@ public Web3WalletRestApi getApi() { /** * Get WebSocket Auth Token * - *

Get a WebSocket auth token before connecting to the WebSocket stream service. + *

Get a WebSocket auth token before connecting to the WebSocket stream service. For details + * on WebSocket usage, please refer to the [WebSocket + * documentation](/products/websocket-api/introduction). * * @throws ApiException if the Api call fails */