BlockChain區塊鏈
Ctrlk
  • 本書簡介
  • 區塊鏈運作原理
  • Bitcoin介紹
  • Bitcoin原理與實作
  • BitcoinJS
  • Serverless 架構實作
  • Docker常用指令
  • ethereum初探
  • ethereum PoS 節點架設
  • ethereum(Docker)
  • ethereum(Geth)
  • ethereum(智能合約)
  • ethereum(Dapp)
  • Hyperledger Fabric
  • blockchainDB
  • 挖礦程式使用教學
  • Bitfinex API 使用
  • FTX API
  • CCXT 通用交易所 API
  • Solana 教學
  • Ethereum BigQuery
  • The Graph
  • DeFi 筆記
    • MEV 相關
    • Dex 聚合
    • Yearn
    • Curve
    • Uniswap
    • AAVE、Compound
Powered by GitBook
On this page

Was this helpful?

  1. DeFi 筆記

Dex 聚合

Quote 相關 API,搜尋最佳報價:

1inch:

https://docs.1inch.io/docs/aggregation-protocol/api/swagger

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

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://api.0x.org/swap/v1/quote?buyToken=DAI&sellToken=WETH&sellAmount=1000000000000000000

Paraswap:

https://developers.paraswap.network/api/master

https://apiv5.paraswap.io/prices/?amount=1000000000000000000&destDecimals=18&destToken=0x6b175474e89094c44da98b954eedeac495271d0f&network=1&side=SELL&srcDecimals=18&srcToken=0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeEapiv5.paraswap.io

Cow Protocol (Meta aggregator):

LogoCoW DAO - Don't get milked!CoWSwap

https://api.cow.fi/docs/#/default/post_api_v1_quote

PreviousMEV 相關NextYearn

Last updated 3 years ago

Was this helpful?