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
46 changes: 46 additions & 0 deletions clients/web3-wallet/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# Changelog

## 4.0.0 - 2026-07-29

### Changed (8)

- Added parameter `feePercent`
- affected methods:
- `getAggregatedQuote()` (`GET /api/v1/dex/aggregator/quote`)
- `quoteAndBuildSwapTransaction()` (`GET /api/v1/dex/aggregator/quote-and-swap`)
- `buildSwapTransaction()` (`GET /api/v1/dex/aggregator/swap`)
- `buildSolanaSwapInstructions()` (`GET /api/v1/dex/aggregator/swap-instruction`)
- Added parameter `feeSource`
- affected methods:
- `getAggregatedQuote()` (`GET /api/v1/dex/aggregator/quote`)
- Added parameter `fromTokenReferrerWalletAddress`
- affected methods:
- `quoteAndBuildSwapTransaction()` (`GET /api/v1/dex/aggregator/quote-and-swap`)
- `buildSwapTransaction()` (`GET /api/v1/dex/aggregator/swap`)
- `buildSolanaSwapInstructions()` (`GET /api/v1/dex/aggregator/swap-instruction`)
- Added parameter `toTokenReferrerWalletAddress`
- affected methods:
- `quoteAndBuildSwapTransaction()` (`GET /api/v1/dex/aggregator/quote-and-swap`)
- `buildSwapTransaction()` (`GET /api/v1/dex/aggregator/swap`)
- `buildSolanaSwapInstructions()` (`GET /api/v1/dex/aggregator/swap-instruction`)
- Modified response for `getAggregatedQuote()` (`GET /api/v1/dex/aggregator/quote`):
- `data`.items: property `feeAmount` added
- `data`.items: property `feeToken` added
- `data`.items: property `actualSwapAmount` added
- `data`.items: item property `feeAmount` added
- `data`.items: item property `feeToken` added
- `data`.items: item property `actualSwapAmount` added

- Modified response for `quoteAndBuildSwapTransaction()` (`GET /api/v1/dex/aggregator/quote-and-swap`):
- `data`.`routerResult`: property `actualSwapAmount` added
- `data`.`routerResult`: property `feeAmount` added
- `data`.`routerResult`: property `feeToken` added

- Modified response for `buildSwapTransaction()` (`GET /api/v1/dex/aggregator/swap`):
- `data`.`routerResult`: property `feeAmount` added
- `data`.`routerResult`: property `feeToken` added
- `data`.`routerResult`: property `actualSwapAmount` added

- Modified response for `buildSolanaSwapInstructions()` (`GET /api/v1/dex/aggregator/swap-instruction`):
- `data`.`routerResult`: property `feeToken` added
- `data`.`routerResult`: property `feeAmount` added
- `data`.`routerResult`: property `actualSwapAmount` added

## 1.0.0 - 2026-07-24

### Changed (1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Routing result (same shape and semantics as `/swap`'s `routerResult`).
|**dexRouterList** | [**List<BuildSolanaSwapInstructionsResponseDataRouterResultDexRouterListInner>**](BuildSolanaSwapInstructionsResponseDataRouterResultDexRouterListInner.md) | Routing path segments (same shape as `/quote`'s `dexRouterList`). | [optional] |
|**fromToken** | [**BuildSolanaSwapInstructionsResponseDataRouterResultFromToken**](BuildSolanaSwapInstructionsResponseDataRouterResultFromToken.md) | | [optional] |
|**toToken** | [**BuildSolanaSwapInstructionsResponseDataRouterResultToToken**](BuildSolanaSwapInstructionsResponseDataRouterResultToToken.md) | | [optional] |
|**feeAmount** | **String** | Fee amount deducted for this swap (smallest unit, integer string). Only populated when the request enabled the custom fee; `null` otherwise. `FROM_TOKEN` direction = `originalFromCoinAmount × feePercent/100` (HALF_UP); `TO_TOKEN` direction = `originalToCoinAmount × feePercent/100` (HALF_DOWN). | [optional] |
|**feeToken** | **String** | Contract address of the token in which the fee is denominated. `FROM_TOKEN` direction = sell-token address; `TO_TOKEN` direction = buy-token address. `null` when the custom fee is not enabled. | [optional] |
|**actualSwapAmount** | **String** | Actual amount participating in the DEX swap (smallest unit, integer string). `FROM_TOKEN` direction = net amount after fee deduction (`fromTokenAmount − feeAmount`); `TO_TOKEN` direction = original input amount (fee is taken from the output side). `null` when the custom fee is not enabled. | [optional] |



Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Routing result for the chosen vendor.
|**dexRouterList** | [**List<BuildSwapTransactionResponseDataRouterResultDexRouterListInner>**](BuildSwapTransactionResponseDataRouterResultDexRouterListInner.md) | Routing path segments. Same shape as the `dexRouterList` returned by `/quote`. | [optional] |
|**fromToken** | [**BuildSwapTransactionResponseDataRouterResultFromToken**](BuildSwapTransactionResponseDataRouterResultFromToken.md) | | [optional] |
|**toToken** | [**BuildSwapTransactionResponseDataRouterResultToToken**](BuildSwapTransactionResponseDataRouterResultToToken.md) | | [optional] |
|**feeAmount** | **String** | Fee amount deducted for this swap (smallest unit, integer string). Only populated when the request enabled the custom fee; `null` otherwise. `FROM_TOKEN` direction = `originalFromCoinAmount × feePercent/100` (HALF_UP); `TO_TOKEN` direction = `originalToCoinAmount × feePercent/100` (HALF_DOWN). | [optional] |
|**feeToken** | **String** | Contract address of the token in which the fee is denominated. `FROM_TOKEN` direction = sell-token address; `TO_TOKEN` direction = buy-token address. `null` when the custom fee is not enabled. | [optional] |
|**actualSwapAmount** | **String** | Actual amount participating in the DEX swap (smallest unit, integer string). `FROM_TOKEN` direction = net amount after fee deduction (`fromTokenAmount − feeAmount`); `TO_TOKEN` direction = original input amount (fee is taken from the output side). `null` when the custom fee is not enabled. | [optional] |



13 changes: 13 additions & 0 deletions clients/web3-wallet/docs/FeeSource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@


# FeeSource

## Enum


* `FROM_TOKEN` (value: `"FROM_TOKEN"`)

* `TO_TOKEN` (value: `"TO_TOKEN"`)



Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
|**executionMode** | **String** | Execution mode for this route. `SWAP` = standard on-chain swap (sign the `tx` object from `/swap` and broadcast). `RFQ` = signed order flow (sign `rfq.typedDataToSign` from `/swap` with EIP-712, submit via `POST /order/submit`, poll `GET /order/{orderId}`). Equity / RWA tokens always return `RFQ`. | [optional] |
|**approveTarget** | **String** | The spender contract address the backend will encode into the approve calldata for this route. To obtain that calldata, call `/approve-transaction` with `vendor=<vendorName>` (the string name, e.g. `\"PcsXRfq\"`) — the backend resolves the spender address internally from the vendor name. This field is provided for informational purposes only (e.g. to call ERC-20 `approve()` directly without going through `/approve-transaction`). Null when no approval is needed (e.g. native-token swap or already approved). | [optional] |
|**isBest** | **Boolean** | Whether this route has the highest `toTokenAmount` among all routes returned in this response. At most one route per response has `isBest=true`. | [optional] |
|**feeAmount** | **String** | Fee amount deducted for this route (smallest unit, integer string). Only populated when the request enabled the custom fee (`feePercent` + `feeSource` both present); `null` otherwise. `FROM_TOKEN` direction = `originalFromCoinAmount × feePercent/100` (HALF_UP); `TO_TOKEN` direction = `originalToCoinAmount × feePercent/100` (HALF_DOWN). | [optional] |
|**feeToken** | **String** | Contract address of the token in which the fee is denominated. `FROM_TOKEN` direction = sell-token address; `TO_TOKEN` direction = buy-token address. `null` when the custom fee is not enabled. | [optional] |
|**actualSwapAmount** | **String** | Actual amount participating in the DEX swap (smallest unit, integer string). `FROM_TOKEN` direction = net amount after fee deduction (`fromTokenAmount − feeAmount`, i.e. the amountIn sent to the DEX); `TO_TOKEN` direction = original input amount (fee is taken from the output side, so the full input participates in the swap). `null` when the custom fee is not enabled. | [optional] |



Loading
Loading