GET /indicative-quote
Retrieve amount out for selling an ERC-20 or native token
This endpoint calculates and returns the number of tokens you would get based on the input token amount and the specified token pair. Native's routing optimizes for the best pricing among on-chain aggregators and Private Market Makers (PMMs).
For native token swaps, Native uses 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
to represent the token address of the native token.
Headers
Name | Description |
---|---|
| API Key retrieved from the Native app |
Params
Name | Description |
---|---|
| The blockchain name belonging to the token_in address - Refer to the |
| The blockchain name belonging to the token_out address - Refer to the |
| Address of the token to be sold |
| Address of the token to be bought |
| Amount of token to be sold, in ether unit |
| Amount of token to be sold, in wei unit |
| Address of the user that sells the |
| Address of the user that receives the |
| The expiry time of the quote, in seconds |
Example
In this example, wallet 0x42d4e9ee3f725c84b7934e4fda64f2be0f803130
requests a quote for swapping 1 ETH to USDT on the Ethereum network.
Response
Name | Description |
---|---|
| Indicates if the quote was successful fetched |
| The ERC-20 token address of the buyer's token. This is the token the market maker will receive. |
| The ERC-20 token address of the seller's token. This is the token that will be sent to market maker. |
| The token out amount of the order in ether |
| The token out amount of the order in wei |
| The token input amount of the order in ether |
| The token input amount of the order in wei |
| Price = buyerTokenAmount / sellerTokenAmount |
| The platform fee charged by the widget owner |
| The fee that will be paid to the liquidity provider |
| The total fees to be paid, if this order was executed |
| The routes taken for the provided quote. Native router will find the shortest route if there is no direct liquidity for the given pair. |
Example
In the response above, Native returns 1,846.565451 USDT for the order submitted.
Explore this endpoint and see how it works here.
Last updated