# Dex 聚合

Quote 相關 API，搜尋最佳報價：

#### 1inch:

[https://docs.1inch.io/docs/aggregation-protocol/api/swagger](https://docs.1inch.io/docs/aggregation-protocol/api/swagger)

[https://api.1inch.io/v4.0/1/quote?fromTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\&toTokenAddress=0x6b175474e89094c44da98b954eedeac495271d0f\&amount=1000000000000000000](https://api.1inch.io/v4.0/1/quote?fromTokenAddress=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\&toTokenAddress=0x6b175474e89094c44da98b954eedeac495271d0f\&amount=1000000000000000000)

#### [https://gist.github.com/miguelmota/e1d3fd0daf493913072a4c09fa6ab203](https://gist.github.com/miguelmota/e1d3fd0daf493913072a4c09fa6ab203)

使用 /swap 獲得到 tx 後，使用 ether.js 發送 sendTransaction

#### 0x:

[https://docs.0x.org/0x-api-swap/api-references/get-swap-v1-quote](https://docs.0x.org/0x-api-swap/api-references/get-swap-v1-quote)

[https://api.0x.org/swap/v1/quote?buyToken=DAI\&sellToken=WETH\&sellAmount=1000000000000000000](https://api.0x.org/swap/v1/quote?buyToken=DAI\&sellToken=WETH\&sellAmount=1000000000000000000)

#### Paraswap:

[https://developers.paraswap.network/api/master](https://developers.paraswap.network/api/master)

{% embed url="https://apiv5.paraswap.io/prices/?amount=1000000000000000000&destDecimals=18&destToken=0x6b175474e89094c44da98b954eedeac495271d0f&network=1&side=SELL&srcDecimals=18&srcToken=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" %}

#### Cow Protocol (Meta aggregator):

{% embed url="https://cow.fi/#developers" %}

[https://api.cow.fi/docs/#/default/post\_api\_v1\_quote](https://api.cow.fi/docs/#/default/post_api_v1_quote)
