curl -X POST https://zap.dzap.io/v1/bundle/quote \
-H "Content-Type: application/json" \
-d '{
"account": "0xUser",
"recipient": "0xUser",
"refundee": "0xUser",
"slippage": 0.5,
"actions": [
{
"action": "swap",
"srcChainId": 42161,
"srcToken": { "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "amount": "1000000" },
"destToken": "0x724dc807b04555b71ed48a6896b6F41593b8C637"
}
]
}'
import type { ZapBundleRequest } from "@dzapio/sdk";
const bundleRequest: ZapBundleRequest = {
account: "0xUser",
recipient: "0xUser",
refundee: "0xUser",
slippage: 0.5,
actions: [
{
action: "swap",
srcChainId: 42161,
srcToken: { address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", amount: "1000000" },
destToken: "0x724dc807b04555b71ed48a6896b6F41593b8C637",
},
],
};
// Quote only
const bundleQuote = await dzap.getZapBundleQuote(bundleRequest);
// Or get executable transaction steps directly
const bundleTx = await dzap.buildZapBundleTx(bundleRequest);
{
"status": "success",
"data": {
"approvalData": [
{
"callTo": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"approveTo": "0x1d46863e3592745008b5CbbAC12014F67329A9b8",
"amount": "1000000"
}
],
"dust": [],
"output": [
{
"amount": "918943376897193",
"amountUSD": "1.68",
"minAmount": "918024433520296",
"asset": { "symbol": "aUSDC", "chainId": 42161 }
}
],
"path": [
{
"action": "swap",
"protocol": { "id": "dzap", "name": "Dzap Aggregator" },
"input": [{ "amount": "1000000", "amountUSD": "1.00", "asset": { "symbol": "USDC", "chainId": 42161 } }],
"output": [{ "amount": "918943376897193", "amountUSD": "1.68", "minAmount": "918024433520296", "asset": { "symbol": "aUSDC", "chainId": 42161 } }],
"fee": [],
"estimatedDuration": 10
}
]
}
}
Fuse API
Bundle Actions
Quote and build multiple on-chain actions - bridge, deposit, stake, and more - into a single Fuse intent, settled with one signature.
POST
/
v1
/
bundle
/
quote
curl -X POST https://zap.dzap.io/v1/bundle/quote \
-H "Content-Type: application/json" \
-d '{
"account": "0xUser",
"recipient": "0xUser",
"refundee": "0xUser",
"slippage": 0.5,
"actions": [
{
"action": "swap",
"srcChainId": 42161,
"srcToken": { "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "amount": "1000000" },
"destToken": "0x724dc807b04555b71ed48a6896b6F41593b8C637"
}
]
}'
import type { ZapBundleRequest } from "@dzapio/sdk";
const bundleRequest: ZapBundleRequest = {
account: "0xUser",
recipient: "0xUser",
refundee: "0xUser",
slippage: 0.5,
actions: [
{
action: "swap",
srcChainId: 42161,
srcToken: { address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", amount: "1000000" },
destToken: "0x724dc807b04555b71ed48a6896b6F41593b8C637",
},
],
};
// Quote only
const bundleQuote = await dzap.getZapBundleQuote(bundleRequest);
// Or get executable transaction steps directly
const bundleTx = await dzap.buildZapBundleTx(bundleRequest);
{
"status": "success",
"data": {
"approvalData": [
{
"callTo": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"approveTo": "0x1d46863e3592745008b5CbbAC12014F67329A9b8",
"amount": "1000000"
}
],
"dust": [],
"output": [
{
"amount": "918943376897193",
"amountUSD": "1.68",
"minAmount": "918024433520296",
"asset": { "symbol": "aUSDC", "chainId": 42161 }
}
],
"path": [
{
"action": "swap",
"protocol": { "id": "dzap", "name": "Dzap Aggregator" },
"input": [{ "amount": "1000000", "amountUSD": "1.00", "asset": { "symbol": "USDC", "chainId": 42161 } }],
"output": [{ "amount": "918943376897193", "amountUSD": "1.68", "minAmount": "918024433520296", "asset": { "symbol": "aUSDC", "chainId": 42161 } }],
"fee": [],
"estimatedDuration": 10
}
]
}
}
Bundle several zap actions (e.g. multiple deposits, or a swap plus a deposit) into a single request. There are two endpoints:
/v1/bundle/quote to price the bundle, and /v1/bundle/buildTx to get executable transaction data for it. Both accept the same request body and return the same overall response shape as /v1/quote and /v1/buildTx respectively - the difference is the actions array replaces the single srcToken/destToken pair.
Body
object[]
required
Ordered list of zap actions to bundle. See “Action shape” below.
string
required
User account initiating the bundle.
string
required
Address to receive the final tokens/positions.
string
required
Address to receive refunds if an action fails partway.
number
required
Slippage tolerance, in percent.
0.5 = 0.5%.boolean
If
true, skip building executable transaction steps (only meaningful on /v1/bundle/buildTx).boolean
Whether to include a gas estimate in the response.
string[]
Whitelist of swap protocols to consider.
string[]
Whitelist of bridges to consider.
object
Action shape
Each entry inactions[]:
string
required
Action type:
swap, bridge, deposit, withdraw, stake, unstake, increase, or harvest.integer
required
object | object[]
required
A single
{ address: string; amount?: string } or an array of them (for multi-token deposits).string
Destination token (or LP/NFT) address. Optional depending on the action.
integer
Required for cross-chain actions.
object
NFT-related operation details (e.g. Uniswap V3 LP NFT).
Show positionDetails
Show positionDetails
string
NFT ID associated with the action.
object
string
Force a specific protocol for this action instead of auto-selecting the best one.
Response
Both endpoints return the same top-levelstatus field. The data shape depends on which endpoint you call:
string
object[]
object[]
Final output amount(s) of the whole bundle.
Show output item
Show output item
object
string
Output amount in token units.
string
USD value of the output.
string
Minimum guaranteed return amount.
object[]
Any leftover/unswept amounts produced by the route. Same shape as
data.output items above.object[]
Ordered list of route steps.
Show path item
Show path item
string
Step type, e.g.
swap, bridge, deposit, withdraw, stake, unstake, increase, harvest.object
{ id, name, icon } - the protocol used for this step.object[]
Same shape as
data.output items above, minus minAmount.object[]
Same shape as
data.output items above.object[]
{ asset, amount, amountUSD, included } - included indicates whether the fee is already netted into the shown amounts.integer
Estimated seconds for this step.
object[]
Only present from
/v1/bundle/buildTx. Ordered list of executable transaction steps - sign and submit these in order.Show step item
Show step item
string
Step action type (e.g.
swap, deposit, bridge).object
Chain-specific transaction payload - EVM:
{ type: "evm", txnId, callTo, callData, value, estimatedGas }; similar shapes exist for Bitcoin-like (bvm) and Solana (svm) chains - see Build Transaction for the full breakdown.Examples
curl -X POST https://zap.dzap.io/v1/bundle/quote \
-H "Content-Type: application/json" \
-d '{
"account": "0xUser",
"recipient": "0xUser",
"refundee": "0xUser",
"slippage": 0.5,
"actions": [
{
"action": "swap",
"srcChainId": 42161,
"srcToken": { "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "amount": "1000000" },
"destToken": "0x724dc807b04555b71ed48a6896b6F41593b8C637"
}
]
}'
import type { ZapBundleRequest } from "@dzapio/sdk";
const bundleRequest: ZapBundleRequest = {
account: "0xUser",
recipient: "0xUser",
refundee: "0xUser",
slippage: 0.5,
actions: [
{
action: "swap",
srcChainId: 42161,
srcToken: { address: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", amount: "1000000" },
destToken: "0x724dc807b04555b71ed48a6896b6F41593b8C637",
},
],
};
// Quote only
const bundleQuote = await dzap.getZapBundleQuote(bundleRequest);
// Or get executable transaction steps directly
const bundleTx = await dzap.buildZapBundleTx(bundleRequest);
{
"status": "success",
"data": {
"approvalData": [
{
"callTo": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
"approveTo": "0x1d46863e3592745008b5CbbAC12014F67329A9b8",
"amount": "1000000"
}
],
"dust": [],
"output": [
{
"amount": "918943376897193",
"amountUSD": "1.68",
"minAmount": "918024433520296",
"asset": { "symbol": "aUSDC", "chainId": 42161 }
}
],
"path": [
{
"action": "swap",
"protocol": { "id": "dzap", "name": "Dzap Aggregator" },
"input": [{ "amount": "1000000", "amountUSD": "1.00", "asset": { "symbol": "USDC", "chainId": 42161 } }],
"output": [{ "amount": "918943376897193", "amountUSD": "1.68", "minAmount": "918024433520296", "asset": { "symbol": "aUSDC", "chainId": 42161 } }],
"fee": [],
"estimatedDuration": 10
}
]
}
}
Last modified on July 29, 2026