How to define the amount of tokens while using the API?#

For all interfaces involving token amounts in the DEX API, precision is required. For example, 1 ETH is represented as 1 × 10^18 .

What does the amount returned by the token interface mean?#

The amount returned by the token interface doesn’t mean that only the tokens in the response can be exchanged. You can enter the token amount yourself and call the quoting and swapping interfaces.

What are the native token addresses for each chain?#

We have uniformly defined it as 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.

How to call the authorization contract and the transaction contract?#

Authorization contracts and transaction contracts are separate contracts, so your steps should be:

  1. Call the /approve-transaction interface to perform the authorization.
  2. After authorization is complete, call the /swap interface again to execute the swap.