Skip to content

Commit

Permalink
Merge pull request #525 from MoralisWeb3/add-token-pairs-and-liquidit…
Browse files Browse the repository at this point in the history
…y-apis

Add token pairs and liquidity apis
  • Loading branch information
bharathbabu-moralis authored Oct 11, 2024
2 parents 5f8fa5d + d57d1ff commit bf0a12f
Show file tree
Hide file tree
Showing 13 changed files with 849 additions and 56 deletions.
43 changes: 43 additions & 0 deletions blog/2024-10-11-token-pairs-and-liquidity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: "New Token Pairs & Liquidity APIs"
slug: "token-pairs-liquidity-apis"
authors:
name: Reuben Salisbury
tags: [Web3 Data API]
---

## Changelog: New Token Pairs & Liquidity APIs

### Release Date: October 11, 2024

We’re excited to announce the addition of new **Token Pairs** and **Liquidity APIs** across both Solana and EVM networks! These updates provide you with deeper insights into token pairings and liquidity data, enabling you to build more comprehensive DeFi and trading applications.

### What’s New?

#### Solana APIs

| Name | Description | API Reference |
| ----------------------------------- | ------------------------------------------------------- | --------------------------------------------------------------------------------------- |
| **Get Token Pairs by Address** | Retrieve the supported token pairs for a given address. | [Method Documentation](/web3-data-api/solana/reference/get-token-pairs-by-address) |
| **Get Aggregated Token Pair Stats** | Retrieve aggregated stats for a token across all pairs. | [Method Documentation](/web3-data-api/solana/reference/get-aggregated-token-pair-stats) |

#### EVM APIs

| Name | Description | API Reference |
| ----------------------------------- | ------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| **Get Token Pairs by Address** | Retrieve the supported token pairs for a given address. | [Method Documentation](/web3-data-api/evm/reference/get-token-pairs) |
| **Get Aggregated Token Pair Stats** | Retrieve aggregated stats for a token across all pairs. | [Method Documentation](/web3-data-api/evm/reference/get-aggregated-token-pair-stats) |

### What Can You Do?

With these new APIs, you can:

- **Track Token Pairings**: Discover token pairings across various exchanges on Solana and EVM chains.
- **Monitor Liquidity**: Retrieve real-time liquidity data for specific token pairs.
- **Access Aggregated Data**: Gain insights into the total number of active pairs and DEXes for a token across supported networks.

### Example Use Cases:

- **DeFi Dashboards**: Display detailed token pair statistics for users to track liquidity pools and potential trading pairs.
- **Analytics Tools**: Analyze liquidity trends and token pair activity across multiple DEXes.
- **Portfolio Management**: Help users manage their assets by showing token pair data and liquidity stats for the tokens in their portfolios.
29 changes: 16 additions & 13 deletions docs/01-web3-data-api/evm/reference/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,15 @@ Select what you want to achieve:

## Token API

Select what you want to achieve:

- [Get Token Metadata](#get-token-metadata)
- [Get Token Price](#get-token-price)
- [Get Token Balances](#get-token-balances)
- [Get Token Approvals](#get-token-approvals)
- [Get Token Transfers](#get-token-transfers)
- [Get Token PnL](#get-token-pnl)
- [Get Token Pairs & Liquidity](#get-token-pairs-&-liquidity)
- [Get Token Top Traders](#get-token-top-traders)
- [Get Token Pairs & Liquidity](#get-token-pairs--liquidity)
- [Get Token Stats](#get-token-stats)
- [Get Token Owners](#get-token-owners)

Expand Down Expand Up @@ -245,31 +247,32 @@ Select what you want to achieve:
| 10 | `getWalletTokenTransfers` | Get ERC20 token transfers by wallet | [Method Documentation](/web3-data-api/evm/reference/get-wallet-token-transfers) | [https://deep-index.moralis.io/api/v2.2/:address/erc20/transfers](https://deep-index.moralis.io/api/v2.2/:address/erc20/transfers) |
| 11 | `getTokenTransfers` | Get ERC20 token transfers by contract | [Method Documentation](/web3-data-api/evm/reference/get-token-transfers) | [https://deep-index.moralis.io/api/v2.2/erc20/:address/transfers](https://deep-index.moralis.io/api/v2.2/erc20/:address/transfers) |

### Get Token Transfers
### Get Token Top Traders

| No. | Method | Description | API Reference | URL |
| ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- | ------------- | --- |
| 12 | `getTopProfitableWalletPerToken` | Get Top Profitable Wallets by Token |
| [Method Documentation](/web3-data-api/evm/reference/get-top-profitable-wallet-per-token) | [https://deep-index.moralis.io/api/v2.2/erc20/:address/top-gainers](https://deep-index.moralis.io/api/v2.2/erc20/:address/top-gainers) |
| No. | Method | Description | API Reference | URL |
| --- | -------------------------------- | ---------------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| 12 | `getTopProfitableWalletPerToken` | Get Token Profitable Wallets | [Method Documentation](/web3-data-api/evm/reference/get-top-profitable-wallet-per-token) | [https://deep-index.moralis.io/api/v2.2/erc20/:address/top-gainers](https://deep-index.moralis.io/api/v2.2/erc20/:address/top-gainers) |

### Get Token Pairs & Liquidity

| No. | Method | Description | API Reference | URL |
| --- | ----------------- | --------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 13 | `getPairReserves` | Get DEX token pair reserves | [Method Documentation](/web3-data-api/evm/reference/get-pair-reserves) | [https://deep-index.moralis.io/api/v2.2/:pair_address/reserves](https://deep-index.moralis.io/api/v2.2/:pair_address/reserves) |
| 14 | `getPairAddress` | Get DEX token pair address | [Method Documentation](/web3-data-api/evm/reference/get-pair-address) | [https://deep-index.moralis.io/api/v2.2/:token0_address/:token1_address/pairAddres](https://deep-index.moralis.io/api/v2.2/:token0_address/:token1_address/pairAddres) |
| No. | Method | Description | API Reference | URL |
| --- | ----------------------------- | ------------------------------------ | ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 13 | `getTokenPairs` | Get token pairs by address | [Method Documentation](/web3-data-api/evm/reference/get-token-pairs) | [https://deep-index.moralis.io/api/v2.2/:token_address/pairs](https://deep-index.moralis.io/api/v2.2/:token_address/pairs) |
| 14 | `getAggregatedTokenPairStats` | Get aggregated token pair statistics | [Method Documentation](/web3-data-api/evm/reference/get-aggregated-token-pair-stats) | [https://deep-index.moralis.io/api/v2.2/:token_address/pairs/stats](https://deep-index.moralis.io/api/v2.2/:token_address/pairs/stats) |
| 15 | `getPairAddress` | Get DEX token pair address | [Method Documentation](/web3-data-api/evm/reference/get-pair-address) | [https://deep-index.moralis.io/api/v2.2/:token0_address/:token1_address/pairAddres](https://deep-index.moralis.io/api/v2.2/:token0_address/:token1_address/pairAddres) |
| 16 | `getPairReserves` | Get DEX token pair reserves | [Method Documentation](/web3-data-api/evm/reference/get-pair-reserves) | [https://deep-index.moralis.io/api/v2.2/:pair_address/reserves](https://deep-index.moralis.io/api/v2.2/:pair_address/reserves) |

### Get Token Stats

| No. | Method | Description | API Reference | URL |
| --- | --------------- | --------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| 15 | `getTokenStats` | Get ERC20 token stats | [Method Documentation](/web3-data-api/evm/reference/get-token-stats) | [https://deep-index.moralis.io/api/v2.2/erc20/:address/stats](https://deep-index.moralis.io/api/v2.2/erc20/:address/stats) |
| 17 | `getTokenStats` | Get ERC20 token stats | [Method Documentation](/web3-data-api/evm/reference/get-token-stats) | [https://deep-index.moralis.io/api/v2.2/erc20/:address/stats](https://deep-index.moralis.io/api/v2.2/erc20/:address/stats) |

### Get Token Owners

| No. | Method | Description | API Reference | URL |
| --- | ---------------- | ---------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| 16 | `getTokenOwners` | Get ERC20 token owners | [Method Documentation](/web3-data-api/evm/reference/get-token-owners) | [https://deep-index.moralis.io/api/v2.2/erc20/:token_address/owners](https://deep-index.moralis.io/api/v2.2/erc20/:token_address/owners) |
| 18 | `getTokenOwners` | Get ERC20 token owners | [Method Documentation](/web3-data-api/evm/reference/get-token-owners) | [https://deep-index.moralis.io/api/v2.2/erc20/:token_address/owners](https://deep-index.moralis.io/api/v2.2/erc20/:token_address/owners) |

# DeFi API

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
sidebar_position: 1
sidebar_label: Get Aggregated Token Pair Stats
slug: /web3-data-api/evm/reference/get-aggregated-token-pair-stats
---

import ApiReference from "@site/src/components/ApiReference";
import config from "@site/docs/configs/api-reference/configs.json";

# Get Aggregated Token Pair Stats

import ApiBanner from "@site/src/components/ApiBanner/ApiBanner.tsx";

<ApiReference {...config.token.getAggregatedTokenPairStats} />
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 1
sidebar_label: Get DEX token pair address
sidebar_position: 2
sidebar_label: Get Specific Token Pair Address
slug: /web3-data-api/evm/reference/get-pair-address
---

Expand All @@ -11,6 +11,4 @@ import config from "@site/docs/configs/api-reference/configs.json";

import ApiBanner from "@site/src/components/ApiBanner/ApiBanner.tsx";



<ApiReference {...config.defi.getPairAddress} />
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 0
sidebar_label: Get DEX token pair reserves
sidebar_position: 3
sidebar_label: Get Token Pair Reserves
slug: /web3-data-api/evm/reference/get-pair-reserves
---

Expand All @@ -11,6 +11,4 @@ import config from "@site/docs/configs/api-reference/configs.json";

import ApiBanner from "@site/src/components/ApiBanner/ApiBanner.tsx";



<ApiReference {...config.defi.getPairReserves} />
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
sidebar_position: 0
sidebar_label: Get Token Pairs by Address
slug: /web3-data-api/evm/reference/get-token-pairs
---

import ApiReference from "@site/src/components/ApiReference";
import config from "@site/docs/configs/api-reference/configs.json";

# Get Token Pairs by Address

import ApiBanner from "@site/src/components/ApiBanner/ApiBanner.tsx";

<ApiReference {...config.token.getTokenPairs} />
Loading

0 comments on commit bf0a12f

Please sign in to comment.