GET /calldata
Similar to /firm-quote, but the response is raw calldata that can be directly submitted on-chain.
Header and Params are exactly the same as /firm-quote
.
Headers
Params
Example
In this example, the wallet 0x42d4e9ee3f725c84b7934e4fda64f2be0f803130
requests transaction data for swapping 1 ETH to USDT on the Ethereum network.
Response
Example
from
,to
,calldata
: Thecalldata
can be sent from thefrom
address to theto
address to execute the swap. Ensure that thefrom
address has sufficient allowance set for the NativeRouter (which is theto
address).amountInOffset
: This indicates the offset position (in bytes) of theamountIn
parameter. For example, in the sample response above, theamountIn
(uint256) occupies bytes 100-131. This is useful if you want to adjust theamountIn
within the calldata.amountOutMinimumOffset
: This indicates the offset position (in bytes) of theamountOutMinimum
parameter. For example, in the sample response above, theamountOutMinimum
(uint256) occupies bytes 132-163. This is useful if you want to adjust theamountOutMinimum
(for slippage protection) within the calldata.
If you prefer to use only Native pools (PMM-only pricing), please contact the Native team to have this option configured for you.
Explore this endpoint and see how it works here.
Last updated