How to hit the CoinMarketCap DEX API API

CoinMarketCap's DEX API (v4) at https://pro-api.coinmarketcap.com/v4/dex covers decentralized exchanges: networks, trading pairs, and on-chain quotes.

Authentication

Get a key at pro.coinmarketcap.com and send it as the X-CMC_PRO_API_KEY header. In the examples it's written {{CMC_API_KEY}}.

Full reference: https://coinmarketcap.com/api/documentation/v1/

List networks

curl https://pro-api.coinmarketcap.com/v4/dex/networks/list \
  -H "X-CMC_PRO_API_KEY: {{CMC_API_KEY}}"
Run in PostTaco

Latest pairs on a network

curl "https://pro-api.coinmarketcap.com/v4/dex/spot-pairs/latest?network_slug=ethereum&limit=5" \
  -H "X-CMC_PRO_API_KEY: {{CMC_API_KEY}}"
Run in PostTaco