ZeroDust Quote API
Quote generation
Operations 4
GET
/direct/route
Whether a bridge can take a direct chain's balance to a destination now (quotes…
#
Quote generation
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/zerodust-xyz:zerodust-xyz-quote-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: ZeroDust Quote API
description: 'Move a wallet''s entire native gas balance off an EVM chain and leave exactly 0, to any address on the same chain or bridged to another chain. Sign with the wallet''s key (EIP-7702) or through MetaMask Advanced Permissions (ERC-7715, signer=permission). Supported chains change: read GET /chains and GET /direct/chains. Docs: https://zerodust.xyz/docs/api'
version: 1.0.0
contact:
name: ZeroDust
url: https://zerodust.xyz
servers:
- url: https://api.zerodust.xyz
description: Production (mainnet)
tags:
- name: Quote
description: Quote generation
paths:
/quote:
get:
summary: Get a quote for sweeping native balance
tags:
- Quote
description: Returns quote with granular fee structure
parameters:
- schema:
type: number
in: query
name: fromChainId
required: true
- schema:
type: number
in: query
name: toChainId
required: true
- schema:
type: string
pattern: ^0x[a-fA-F0-9]{40}$
in: query
name: userAddress
required: true
- schema:
type: string
pattern: ^0x[a-fA-F0-9]{40}$
in: query
name: destination
required: true
- schema:
type: string
pattern: ^0x[a-fA-F0-9]{40}$
in: query
name: callTarget
required: false
description: Bridge contract address for cross-chain
- schema:
type: string
pattern: ^0x[a-fA-F0-9]*$
in: query
name: callData
required: false
description: Encoded bridge call data for cross-chain
- schema:
type: string
enum:
- key
- permission
in: query
name: signer
required: false
description: 'key (default): EIP-7702, signed with the wallet''s key. permission: a MetaMask Advanced Permission (ERC-7715) redeemed by ZeroDustPermissionRouter (cross-chain through Relay and Across only)'
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
properties:
quoteId:
type: string
version:
type: number
userBalance:
type: string
estimatedReceive:
type: string
mode:
type: number
description: 0 = transfer, 1 = call
fees:
type: object
properties:
overheadGasUnits:
type: string
protocolFeeGasUnits:
type: string
extraFeeWei:
type: string
reimbGasPriceCapWei:
type: string
maxTotalFeeWei:
type: string
revokeGasUnits:
type: string
description: Gas for auto-revoke tx
autoRevoke:
type: boolean
description: Whether auto-revoke is included
signer:
type: string
description: key or permission, as requested
permission:
type: object
description: 'signer=permission only: grant a one-time native-token-allowance to the router (as delegate, redeemer and payee) and sign the intent with the router as verifyingContract'
properties:
router:
type: string
delegationManager:
type: string
domainVersion:
type: string
receiveToken:
type: object
description: 'Token delivery only: estimatedReceive/minReceive are in this ERC-20 on the destination, not native gas'
properties:
symbol:
type: string
address:
type: string
decimals:
type: number
bridge:
type: object
description: 'Cross-chain only: the bridge chosen for this sweep'
properties:
name:
type: string
displayName:
type: string
inputAmount:
type: string
description: Exact amount routed to the bridge (source wei)
expectedOutput:
type: string
description: What the bridge expects to deliver (destination wei)
intent:
type: object
description: Fields to include in EIP-712 signature
properties:
mode:
type: number
destination:
type: string
destinationChainId:
type: string
callTarget:
type: string
routeHash:
type: string
callData:
type: string
description: Bridge calldata; keccak256(callData) == routeHash. Lets the client check the route before signing
minReceive:
type: string
deadline:
type: number
nonce:
type: number
description: Contract nonce for sweep intent
authNonce:
type: number
description: Transaction count for EIP-7702 authorization (signer=key only)
validForSeconds:
type: number
'400':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
minimumBalanceWei:
type: string
description: 'AMOUNT_TOO_LOW: the smallest balance a bridge would take (estimate)'
'500':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
'503':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
operationId: getQuote
x-operation-id-source: derived
/direct/route:
get:
summary: Whether a bridge can take a direct chain's balance to a destination now (quotes…
tags:
- Quote
parameters:
- schema:
type: integer
minimum: 1
maximum: 4294967295
in: query
name: chainId
required: true
- schema:
type: integer
minimum: 1
maximum: 4294967295
in: query
name: toChainId
required: true
- schema:
type: string
pattern: ^0x[a-fA-F0-9]{40}$
in: query
name: from
required: true
- schema:
type: string
pattern: ^0x[a-fA-F0-9]{40}$
in: query
name: recipient
required: true
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
properties:
available:
type:
- 'null'
- boolean
exit:
type: boolean
reason:
type: string
minimumBalanceWei:
type: string
'400':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
minimumBalanceWei:
type: string
operationId: getDirectRoute
x-operation-id-source: derived
/direct/prepare:
get:
summary: Unsigned transactions that take a direct chain to exactly 0 (route, burn or…
tags:
- Quote
parameters:
- schema:
type: integer
minimum: 1
maximum: 4294967295
in: query
name: chainId
required: true
- schema:
type: integer
minimum: 1
maximum: 4294967295
in: query
name: toChainId
required: true
- schema:
type: string
pattern: ^0x[a-fA-F0-9]{40}$
in: query
name: from
required: true
- schema:
type: string
pattern: ^0x[a-fA-F0-9]{40}$
in: query
name: recipient
required: true
- schema:
type: string
enum:
- route
- burn
- donate
in: query
name: mode
required: false
- schema:
type: string
pattern: ^0x[a-fA-F0-9]{64}$
in: query
name: feePaidTx
required: false
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
properties:
chainId:
type: integer
route:
type: string
requestId:
type:
- 'null'
- string
txs:
type: array
items:
type: object
properties:
kind:
type: string
to:
type: string
data:
type: string
value:
type: string
gas:
type: string
gasPrice:
type: string
nonce:
type: integer
paymaster:
type: string
paymasterInput:
type: string
gasPerPubdata:
type: string
receive:
type: string
fee:
type: string
gasFee:
type: string
balance:
type: string
leftoverMax:
type: string
tool:
type: string
quoted:
type: string
txGapBlocks:
type: integer
expiresAt:
type: integer
'400':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
minimumBalanceWei:
type: string
'409':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
minimumBalanceWei:
type: string
'422':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
minimumBalanceWei:
type: string
'503':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
minimumBalanceWei:
type: string
operationId: getDirectPrepare
x-operation-id-source: derived
/direct/exit:
get:
summary: Swap-then-bridge plan for a direct chain with no direct route (LI.FI)
tags:
- Quote
parameters:
- schema:
type: integer
minimum: 1
maximum: 4294967295
in: query
name: chainId
required: true
- schema:
type: integer
minimum: 1
maximum: 4294967295
in: query
name: toChainId
required: true
- schema:
type: string
pattern: ^0x[a-fA-F0-9]{40}$
in: query
name: from
required: true
- schema:
type: string
pattern: ^0x[a-fA-F0-9]{40}$
in: query
name: recipient
required: true
- schema:
type: string
pattern: ^0x[a-fA-F0-9]{64}$
in: query
name: feePaidTx
required: false
responses:
'200':
description: Default Response
content:
application/json:
schema:
type: object
properties:
chainId:
type: integer
route:
type: string
requestId:
type:
- 'null'
- string
txs:
type: array
items:
type: object
properties:
kind:
type: string
to:
type: string
data:
type: string
value:
type: string
gas:
type: string
gasPrice:
type: string
nonce:
type: integer
paymaster:
type: string
paymasterInput:
type: string
gasPerPubdata:
type: string
receive:
type: string
fee:
type: string
gasFee:
type: string
balance:
type: string
leftoverMax:
type: string
tool:
type: string
quoted:
type: string
txGapBlocks:
type: integer
expiresAt:
type: integer
'400':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
minimumBalanceWei:
type: string
'409':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
minimumBalanceWei:
type: string
'422':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
minimumBalanceWei:
type: string
'503':
description: Default Response
content:
application/json:
schema:
type: object
properties:
error:
type: string
code:
type: string
minimumBalanceWei:
type: string
operationId: getDirectExit
x-operation-id-source: derived
components:
securitySchemes:
apiKey:
type: apiKey
in: header
name: X-API-Key
bearerAuth:
type: http
scheme: bearer