getZapQuote.
How to Request Zap Quotes
To get started, here is a simple example of how to request a quote for zapping 1 USDC into a yield-bearing position on Arbitrum.buildZapTxn.
Zap Quote Request Parameters
ThegetZapQuote function expects a ZapQuoteRequest object, which specifies a desired zap operation and includes all the information needed to calculate the most efficient route.
Request Parameters
| 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 |
allowedBridges | string[] | no | Array of allowed bridge protocols for cross-chain operations |
allowedDexes | string[] | no | Array of allowed DEX protocols for swapping operations |
Understanding the Response
The response contains detailed information about the zap route:Key Response Fields
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
Working with Zap Quote Results
Advanced Examples
Cross-Chain Liquidity Provision
Next Steps
Once you have received a zap quote, you can proceed to:- Execute the zap transaction on the blockchain
- Track the status of your zap
Before executing zaps, tokens typically require approval to allow the DZap
contracts to spend them on your behalf. Learn more about gas-optimized
approval mechanisms in the Approval Mechanisms
section.