Request quotes for complex DeFi operations using the DZap SDK
getZapQuote
.
buildZapTxn
.
getZapQuote
function expects a ZapQuoteRequest
object, which specifies a desired zap operation and includes all the information needed to calculate the most efficient route.
Parameter | Type | Required | Description |
---|---|---|---|
srcChainId | number | yes | Source chain ID where the operation begins |
destChainId | number | yes | Destination chain ID where the operation completes |
account | string | yes | User’s wallet address |
srcToken | string | yes | Source token contract address |
destToken | string | yes | Destination token or protocol address |
amount | string | no | Amount to zap in smallest token unit (not needed for NFTs) |
recipient | string | yes | Address to receive the final tokens/positions |
slippage | number | yes | Slippage tolerance as percentage |
amountOut
- The expected final output amount from the zapapprovalData
- Token approval information (if approval is required)path
- Array of steps that will be executed in the zap operationpath[].action
- The type of operation (swap, deposit, withdraw, etc.)path[].protocol
- Information about the protocol used for this steppath[].input/output
- Detailed asset information including amounts and USD valuespath[].fee
- Fee breakdown for each steppath[].estimatedDuration
- Expected time for this step to complete