Decentralized Exchange Data
Last updated
Last updated
Decentralized Finance (DeFi) is a rapidly emerging ecosystem of applications and protocols used for trading, lending, and various other financial services. Rather than relying on centralized intermediaries, these protocols utilize permissionless blockchains such as Ethereum to conduct the majority of their activities and transactions on-chain.
Our decentralized exchange (DEX) market data is collected directly from the blockchain and harmonized to match the format of our centralized exchange market data. Each liquidity pool contract is represented as a distinct market, with many pairs being traded across multiple liquidity pools with alternative fee structures.
Market coverage can be found by querying our /catalog-v2/market-trades, /catalog-all-v2/market-trades, or /reference-data/markets API endpoints. Using the market-trades endpoints, decentralized exchanges can be identified as any market where the market
parameter in the response contains the exchange value. Alternatively, the catalog results can be queried with the exchange
parameter set to any of the exchange values in the table below. Using the reference-data endpoint, decentralized exchanges can be identified as any market where the exchange
parameter contains the exchange value from the table below.
Currently we offer coverage of 5 DEX protocols:
Exchange Name | Exchange | Spot Market Count | Start Date |
---|---|---|---|
In addition to returning standard metadata such as the market's base and quote asset, DEX market entries in the reference-data endpoint also contain several DeFi-specific fields:
contract_address
: The smart contract address of the liquidity pool contract.
fee
: The fee percentage charged for each swap. Fees are distributed pro-rata to the pool's liquidity providers.
base_address
: The address of the ERC-20 token contract associated with the base asset.
quote_address
: The address of the ERC-20 token contract associated with the quote asset.
Many of our data types are available at the market level. For decentralized exchanges, we define a market as a specific liquidity pool contract deployed on a specific decentralized exchange, like uniswap_v2_eth-1inch-aave-spot
or uniswap_v3_eth-2-wsteth-weth-spot
or sushiswap_v1_eth-srm-weth-spot
. The data types listed below are available for each DEX liquidity pool:
In addition to returning standard metadata such as the trade's size and price, DEX market entries in the catalog also contain several DeFi-specific fields:
block_hash
: The unique hash of the block containing the swap transaction.
block_height
: The height of the block containing the swap transaction.
txid
: The transaction hash associated with the swap.
initiator
: The Ethereum address which submitted the transaction, as a result of which the swap occurred.
sender
: The Ethereum address that invoked the liquidity pool smart contract's function for swapping.
beneficiary
: The Ethereum address credited with the output tokens upon the completion of a swap.
Coin Metrics calculates several metrics for exchange-asset pairs such as uniswap_v3_eth-usdc
, sushiswap_v1_eth-aave
, and uniswap_v2_eth-wbtc
. The exchange coverage can be found by querying our /catalog/exchange-assets
or /catalog-all/exchange-assets
API endpoints.
Data available at the exchange-asset level is available through the /timeseries/exchange-asset-metrics
API endpoint and specific metrics are described in the pages linked in this section:
Coin Metrics calculates several metrics for decentralized exchanges such as uniswap_v3_eth
, uniswap_v2_eth
, and sushiswap_v1_eth
. The exchange coverage can be found by querying our /catalog/exchanges
or /catalog-all/exchanges
API endpoints.
Data available at the exchange level is available through the /timeseries/exchange-metrics
API endpoint and specific metrics are described in the pages linked in this section:
Curve
curve_eth
200
2020-02-10
Sushiswap
sushiswap_v1_eth
216
2020-09-04
Uniswap v1
uniswap_v1_eth
39
2018-11-02
Uniswap v2
uniswap_v2_eth
660
2020-05-05
Uniswap v3
uniswap_v3_eth
989
2021-05-04