# Avalanche DEXs APIs

**URL:** <https://community.bitquery.io/t/avalanche-dexs-apis/838>\
**Category:** GraphQL Tutorials\
**Created:** [February 3, 2022, 8:49am UTC](https://community.bitquery.io/t/avalanche-dexs-apis/838 "2022-02-03T08:49:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbajpai](https://avatars.discourse-cdn.com/v4/letter/m/e5b9ba/32.png) [@mbajpai](https://community.bitquery.io/u/mbajpai)\
**Post date:** [February 3, 2022, 8:49am UTC](https://community.bitquery.io/t/avalanche-dexs-apis/838/1 "2022-02-03T08:49:37Z")

</div>

# Avalanche DEXs APIs

A decentralized exchange (DEX) is a cryptocurrency exchange that operates without a central authority, allowing users to transact peer-to-peer from [wallet-to-wallet](http://support.avalabs.org/en/articles/4587108-what-is-a-blockchain-wallet) whilst maintaining complete control of their assets. DEXs reduce the risk of price manipulation, as well as hacking and theft because crypto assets are never in the custody of the exchange itself.

[Announced](https://medium.com/avalancheavax/avalanche-foundation-announces-180m-defi-incentive-program-d320fdfafff7) in August 2021, the Avalanche Rush is a $180 million liquidity mining incentive program, that seeks to onboard some of the best DeFi protocols to the AVAX network. It aimed to empower both new and existing DeFi traders with several easy-to-use, fast, and cost-effective applications. Since then, the total number of transactions on the network has gone up from over 4 million to 18.5 million.

The Avalanche Foundation also launched Blizzard, an over $200M fund in November 2021, dedicated to accelerating development, growth, and innovation across the ecosystem of builders and users of the Avalanche public blockchain. The fund is focused on four key areas of growth across the [Avalanche](https://explorer.bitquery.io/avalanche) ecosystem: DeFi, enterprise applications, NFTs and culture applications.

The [Avalanche](https://www.altcoinbuzz.io/?s=avalanche) DeFi Ecosystem seems to be at the tipping point of an explosion. There are hundreds of projects building on Avalanche. From the success story of Polygon, we all know how much incentive programs encourage developers to build projects on top of the platform and attract more users.

Today we will talk about some interesting stats and how to get DEXs trading data deployed on Avalanche blockchain using our DEX APIs.

If you want to get Avalanch DEX APIs access, all you need to do is [sign up](https://graphql.bitquery.io/ide) on our Blockchain IDE and get your API keys!!

## Trade volume on Avalanche

Let’s analyse the volume of trade taking place on the various DEXs.

| | Total trade | Total volume | Average trade | Median trade | Contracts |
| --- | --- | --- | --- | --- | --- |
| Trader Joe | 19372716 | $57 billion | $2944.83 | $243.43 | 8192 |
| Pangolin | 5761874 | $13 billion | $2263.72 | $285 | 2193 |
| LydiaFinance | 654562 | $280 million | $429.23 | $158.50 | 99 |
| Elk | 294075 | $111 million | $380.460 | $89.73 | 110 |
| HcSwapAvax | 234756 | 6.24537e+25 | 2.66e+19 | $.14E+09 | 78 |

As visible from the above table, [Trader Joe](https://explorer.bitquery.io/avalanche/dex/Trader%20Joe) has the highest total trades, total volume and number of contracts too. However, [Pangolin](https://explorer.bitquery.io/avalanche/dex/Pangolin) has the highest median trade.

 ![2](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/e6e5109450bb9089d6a7311eb7721d0299f75a6c.png)

**Here is a pictorial representation of the data provided in the table.**

 ![3](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/06486c77dc406588ab5a48639c8aed8040e7c982.png)

You can obtain the above data using this [query](https://graphql.bitquery.io/ide/DEX-trends-on-Avalanche) as well.

## DEX protocols on Avalanche

Taking a look at the protocols on the Avalanche blockchain, we find that the many [DEXs on Avalanche are forks of popular protocols](https://graphql.bitquery.io/ide/Avalanche-DEXs) such as [Uniswap v2](https://explorer.bitquery.io/avalanche/dex_protocol/Uniswap%20v2) protocol.

 ![4](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/1f6ec6cf94b1791b54782fba660a97ef6edd92d9.png)

| Protocols | Trades | Currencies | Contracts |
| --- | --- | --- | --- |
| Uniswap v2 | 6298670 | 2355 | 4287 |
| Uniswap v3 | 137 | 4 | 6 |
| Uniswap | 9 | 3 | 2 |
| Mooniswap | 4 | 3 | 3 |

The Uniswap v2 protocol is the leading protocol on the network followed by the Uniswap v3 protocol by a great margin. The other protocols have almost negligible contributions as compared to the Uniswap v2 protocol.

 ![5](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/4819f2e504400955cc8b088f7585533b7f15afdc.png)

You can run the above query using this link: [Avalanche protocols (bitquery.io)](https://graphql.bitquery.io/ide/Avalanche-protocols)

## Top Trader

Let’s take a look at the top traders for different DEXs on the Avalanche network.

| | Top trader | Trade amount |
| --- | --- | --- |
| Trader Joe | 0x5dd596c901987a2b28c38a9c1dfbf86fffc15d77 | $6.9 million |
| Pangolin | 0x8848f3171ddd3080062e6b5169d6a4960e3cdbbd | $3 million |
| LydiaFinance | 0x23b570a4c01195ae0dcf638ed895bf972f6ccc47 | $214k |
| Elk | 0x212286bc6de93fe605aa0de60c7277f6808ec430 | $90k |
| HcSwapAvax | 0x5adaf66a3084281fb03856be96240abecfdf26b3 | $124k |
| Thorus | 0xb5b96f77dceca9969c1cf8bb52e1408347146274 | $100k |

Here also, Trader Joe’s top trader has traded the highest amount.

To find the above data, you can use this [query](https://graphql.bitquery.io/ide/Top-Trader-on-Avalanche-Dexs).

## Number of currencies traded on Avalanche

Moving on, now we’ll take a look at the highest number of currencies traded using different DEXs on the Avalanche blockchain network.

The highest number of traded Currencies:

| DEX | No.of currencies | Month and year |
| --- | --- | --- |
| Trader Joe | 4042 | December 2021 |
| LydiaFinance | 46 | December 2021 |
| Pangolin | 435 | September 2021 |
| Elk | 46 | December 2021 |

## Trader Joe analysis

We can also extract data related to a particular DEX, as an example here, we’ll take Trader Joe.

 ![6](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/f7ea0c5f70e0b52ed1900e2aaa6f1aff0bb538f5.png)

The different tabs give you data in pictorial well as tabular form which can even be queried using the GraphQL IDE.

Let’s take a look at the [most traded token pair on Trader Joe](https://explorer.bitquery.io/avalanche/dex/Trader%20Joe/pairs?from=2022-01-05&till=2022-02-03) now

The top traded token on Trader Joe DEX is [MIM](https://explorer.bitquery.io/avalanche/token/0x130966628846bfd36ff31a822705796e8cb8c18d/token_dex_trades) with more 1069868 trades and $2.6 billion in [trading volume](https://graphql.bitquery.io/ide/token-details-on-trader-joe).

 ![7](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/fdfb88535a08687aed2fb7b139b751b9e1f8d4d2.png)

You can get this information using this [query](https://graphql.bitquery.io/ide/Token-pairs-Trader-Joe) as well.

## Makers and takers on Avalanche

Under the [makers/takers](https://explorer.bitquery.io/avalanche/dex/Trader%20Joe/traders) tab, you can see a tabular representation of the latest makers and takers on the Avalanche network.

 ![8](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/c4523adab4b205b2c11afadf94849554698e9890.png)

The trade maker with the highest trade amount “0x60ae616a2155ee3d9a68541ba4544862310933d4” has a total of 3701182 trades with a total trade amount adding up to a sum of 8048464087.395188.

 ![9](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/ba26ddc8ebb191fb662a005f55126ab2f08f821b.png)

You can use this [query](https://graphql.bitquery.io/ide/Trade-maker-Trader-Joe) to get the above data.

## Unique Traders on Avalanche

There are more than [unique 250k takers](https://graphql.bitquery.io/ide/unique-takers-and-makers-on-avalanche) on Avalanche blockchain. This shows more than 250k people traded on different DEXs on Avalanche.

## OHLC Data for Avalanche

Using Bitquery’s APIs, you can easily get the OHLC data for the Avalanche network. You can use the following query for the same!

```auto
{
  ethereum(network: avalanche) {
    dexTrades(
      options: {limit: 100000, asc: "timeInterval.minute"}
      date: {since: "2022-01-23"}
      exchangeName: {is: "Trader Joe"}
      baseCurrency: {is: "0x1fe4869f2c5181b9cd780a7e16194fa2c4c4293d"}
      quoteCurrency: {is: "0x6e84a6216ea6dacc71ee8e6b0a5b7322eebc0fdd"}
    ) {
      timeInterval {
        minute(count: 5)
      }
      baseCurrency {
        symbol
        address
      }
      baseAmount
      quoteCurrency {
        symbol
        address
      }
      quoteAmount
      trades: count
      quotePrice
      maximum_price: quotePrice(calculate: maximum)
      minimum_price: quotePrice(calculate: minimum)
      open_price: minimum(of: block, get: quote_price)
      close_price: maximum(of: block, get: quote_price)
    }
  }
}

```

## Conclusion

We have almost all the DEXs on Avalanche and adding more every day, our DEX APIs are comprehensive and available for other blockchains too. If you building DEX related tool or looking to get DEX trading data, you can [try our APIs](https://graphql.bitquery.io/).

If you have questions, you can also [contact us](https://bitquery.io/forms/api).

## Also Read

- [Ethereum DEX GraphQL APIs with Examples - Bitquery](https://bitquery.io/blog/ethereum-dex-graphql-api)

- [Bitquery API integration with TradingView Technical Analysis Charts (DEX APIs)](https://community.bitquery.io/t/bitquery-api-integration-with-tradingview-technical-analysis-charts-dex-apis/244)

- [PancakeSwap API – Real-Time Trades, Volume, Liquidity & Pools - Bitquery](https://bitquery.io/blog/pancake-swap-dex-apis)

- [Price Index for DEX Tokens - Bitquery](https://bitquery.io/blog/dex-price-index)

- [How to get started with Bitquery's Blockchain GraphQL APIs?](https://community.bitquery.io/t/how-to-get-started-with-bitquerys-blockchain-graphql-apis/13)

## About Bitquery

Bitquery is a set of software tools that parse, index, access, search, and use information across blockchain networks in a unified way. We are crossing the ‘chain-chasm’ by delivering set of products that can work across blockchains. Our products include:

[Coinpath](https://bitquery.io/products/coinpath?utm_source=blog) APIs provide blockchain [money flow](https://blog.bitquery.io/coinpath-blockchain-money-flow-apis) analysis for more than 24 blockchains. With Coinpath’s APIs, you can monitor blockchain transactions, investigate crypto crimes such as bitcoin money laundering, and create crypto forensics tools. You can refer to this article to get started with [Coinpath](https://blog.bitquery.io/coinpath-api-get-start)

[Digital Assets API](https://bitquery.io/products/digital_assets?utm_source=blog&utm_medium=about) provides index information related to all major cryptocurrencies, coins, and tokens.

[DEX API](https://bitquery.io/products/dex?utm_source=blog&utm_medium=about) provides real-time deposits and transactions, trades, and other related data on different DEX protocols like Uniswap, SushiSawap, Kyber Network, Airswap, Matching Network, etc.

If you have any questions about our products, ask them on our [Telegram channel](https://t.me/Bloxy_info) or email us at [hello@bitquery.io](mailto:hello@bitquery.io) . Also, subscribe to our newsletter and stay updated about the latest in the cryptocurrency world.
