GET v1/firm-quote
Get signed calldata for selling a ERC20 / native token. Submit the return data to Native router to execute swap.
Last updated
Get signed calldata for selling a ERC20 / native token. Submit the return data to Native router to execute swap.
Last updated
This endpoint provides transaction data given the requested token and token amount. Please refer to section for examples of using the endpoint.
Native supports native token swap. Use 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE to represent the token address of the native token.
Headers
apiKey
Contact Native to get your API key.
Params
chain
Blockchain name. Supported chains: ethereum, bsc
token_in
Token address for the token to be sold.
token_out
Token address for the token to be bought.
amount
Amount of token to be sold, in ether unit.
address
Address of the user making the swap.
In this example, wallet 0x42d4e9ee3f725c84b7934e4fda64f2be0f803130 requests for transaction data for swapping 1 ETH to USDT on Ethereum.
In the response above, Native returns 1,839.7184 USDT for the order sent in the example.