Aggregate DEX Swap
| Time | Status | User Agent |
|---|---|---|
| Make a request to see history. |
URL Expired
The URL for this request expired after 30 days.
The request body for a /defi/v1/dex/swaps
chainId
string
enum
The unique ID to direct queries or transactions to the correct blockchain. Find more here.
1143114561374216110845332450009001400120010117001500110016008217
Show 18 enum values
path
array of strings
required
Comma-separated values of token pair.
path*
ADD string
amountIn
string
required
Amount of token.
chainSymbol
string
The abbreviated chain name for queries or transactions.
from
string
required
Address of the sender of the token.
gas
string
Maximum gas to be approved for the transaction.
to
string
required
Address of the recipient of the token.
poolFees
string
Different pool based on the fees. By default, it will take the pool with maximum amountOut.
excludedDexes
string
Comma-separated values of dexes to exclude.
bestNetPrice
boolean
If true, sorts prepared transactions by net value (amountsOut minus gas) in descending order. If multiple sort parameters are true, bestNetPrice takes precedence.
falsetruefalse
bestQuote
boolean
If true, sorts prepared transactions by amountsOut in descending order. If multiple sort parameters are true, bestNetPrice takes precedence.
falsetruefalse
lowestGas
boolean
If true, sorts prepared transactions by gas cost in ascending order. If multiple sort parameters are true, bestNetPrice takes precedence.
falsetruefalse
gasPriority
string
Specifies the priority level for gas fees (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost.
amountOutMin
string
Minimum amount to be received.
slippage
string
Percentage of total swap value allowed for slippage. Default is 1 (0 <= slippage <= 100).
enableFee
boolean
Flag to include a basis points fee transaction alongside the main transaction when set to true.
falsetruefalse
batchOption
string
enum
The batch option to be used for the transaction.
EIP-5792EIP-5792EIP-7702
Allowed:
EIP-5792``EIP-7702
batcherContract
string
The EOA address of the batcher that will be used to execute the transaction when using EIP-7702 batching. If not provided, the default batcher contract for the chain will be used.
`` 200 Successful response
ShellNodeRubyPHPPython
``
xxxxxxxxxx
curl --request POST \
--url https://svc.blockdaemon.com/defi/v1/dex/swaps \
--header 'accept: application/json' \
--header 'content-type: application/json'