Token Transfer
Requesting a Quote
You can request a quote by specifying either the fromAmount
(the amount you are sending) or the toAmount
(the amount the recipient will receive).
Quoting by Sending Amount (fromAmount
)
fromAmount
)To generate a quote based on the amount you are sending, use the /quote
endpoint. This method is useful when you know the exact amount you want to send and need to calculate how much the recipient will receive.
Quoting by Receiving Amount (toAmount
)
toAmount
)To generate a quote based on the amount the recipient will receive, use the /quote/toAmount
endpoint. This method is helpful when you want to ensure that the recipient receives an exact amount of tokens.
The recipient might receive slightly more toToken
than requested due to slippage or rounding
If a quote for this transfer can be found, it looks like the following:
The action
contains information about what exactly will happen, the estimate
will contain information about the estimated outcome of the transaction.
But to send the transaction to your wallet, the transactionRequest
has to be used. It is an ethers.js TransactionRequest
object which can directly be passed on to a wallet.
To see what this can look like, check out the Transferring Tokens guide.
Possible Query Parameters
Quoting by Sending Amount (fromAmount
)
fromAmount
)The /quote
endpoints offer several parameters that can be used to fine-tune the result.
fromChain
✅
The sending chain. Can be the chain id or chain key
DAI
toChain
✅
The receiving chain. Can be the chain id or chain key
POL
fromToken
✅
The token that should be transferred. Can be the address or the symbol
USDC
toToken
✅
The token that should be transferred to. Can be the address or the symbol
POL
fromAddress
✅
The sending wallet address
Your wallet address
toAddress
❌
The receiving wallet address. If none is provided, the fromAddress
will be used
Your second wallet address
fromAmount
✅
The amount that should be sent including all decimals (e.g. 1000000
for 1 USDC (6 decimals))
1000000
order
❌
Which kind of route should be preferred
BEST_VALUE
, BEST_FEE
, or BEST_FEE_GAS
slippage
❌
The maximum allowed slippage for the transaction (0.05 represents 5%)
0.05
integrator
❌
A string containing tracking information about the integrator of the API
SirSwapALot
fee
❌
The percent of the integrator's fee that is taken from every transaction. 0.02 represents 2%. The maximum fee amount is 10%.
0.02
referrer
❌
Integrators can set a wallet address as referrer to track them
0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0
allowBridges
❌
List of bridges that are allowed for this transaction
multichain,connext
allowExchanges
❌
List of exchanges that are allowed for this transaction
1inch,paraswap
denyBridges
❌
List of bridges that are not allowed for this transaction
cbridge,optimism
denyExchanges
❌
List of exchanges that are not allowed for this transaction
openocean
preferBridges
❌
List of bridges that should be preferred for this transaction
connext
preferExchanges
❌
List of exchanges that should be preferred for this transaction
1inch
swapStepTimingStrategies
❌
Timeout parameter for response timing optimization
minWaitTime-600-4
Quoting by Receiving Amount (toAmount
)
toAmount
)The /quote/toAmount
endpoint offers several parameters to fine-tune the result.
Parameter
Required
Description
Example
fromChain
✅
The sending chain. Can be the chain id or chain key
DAI
(or 137
for Polygon)
toChain
✅
The receiving chain. Can be the chain id or chain key
POL
(or 137
for Polygon)
fromToken
✅
The token that will be transferred. Can be the token address or symbol
USDC
toToken
✅
The token that will be received. Can be the token address or symbol
POL
(or MATIC
)
fromAddress
✅
The sending wallet address
Your wallet address
toAddress
❌
The receiving wallet address. If not provided, fromAddress
will be used
Your second wallet address
toAmount
✅
The amount that should be received, including all decimals (e.g., 10000000000000000000 for 10 MATIC (18 decimals))
10000000000000000000
(10 MATIC)
order
❌
Preference for the type of route
BEST_VALUE
, BEST_FEE
, BEST_FEE_GAS
slippage
❌
The maximum allowed slippage for the transaction (0.05 represents 5%)
0.05
(5%)
integrator
❌
A string containing tracking information about the integrator of the API
SirSwapALot
fee
❌
The percent of the integrator's fee taken from every transaction (0.02 represents 2%, with a maximum of 10%)
0.02
referrer
❌
Integrators can set a wallet address as a referrer for tracking purposes
0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0
allowBridges
❌
List of bridges allowed for the transaction
multichain,connext
allowExchanges
❌
List of exchanges allowed for the transaction
1inch,paraswap
denyBridges
❌
List of bridges not allowed for the transaction
cbridge,optimism
denyExchanges
❌
List of exchanges not allowed for the transaction
openocean
preferBridges
❌
List of bridges that should be preferred for the transaction
connext
preferExchanges
❌
List of exchanges that should be preferred for the transaction
1inch
swapStepTimingStrategies
❌
Timeout parameter for response timing optimization
minWaitTime-600-4
The bridges we currently support are: hop
, multichain
, cbridge
, connext
, hyphen
, optimism
, polygon
, arbitrum
and avalanche.
The currently available exchanges are 1inch
, paraswap
, openocean
, 0x
and a lot of dexes.
For a complete and up-to-date list, please refer to our API documentation.
Last updated
Was this helpful?