Skip to content

Commit

Permalink
Merge pull request #535 from MoralisWeb3/add-token-pair-stats-api
Browse files Browse the repository at this point in the history
feat: Token Pair Stats API
  • Loading branch information
bharathbabu-moralis authored Nov 26, 2024
2 parents 3437a93 + d618494 commit f986dc0
Show file tree
Hide file tree
Showing 13 changed files with 872 additions and 28 deletions.
11 changes: 6 additions & 5 deletions docs/01-web3-data-api/evm/reference/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,21 +258,22 @@ Select what you want to achieve:
| 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) |
| 14 | `getPairStats` | Get token pair statistics | [Method Documentation](/web3-data-api/evm/reference/get-token-pair-stats) | [https://deep-index.moralis.io/api/v2.2//pairs/:address/stats](https://deep-index.moralis.io/api/v2.2//pairs/:address/stats) |
| 15 | `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) |
| 16 | `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) |
| 17 | `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 |
| --- | --------------- | --------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| 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) |
| 18 | `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 |
| --- | ---------------- | ---------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| 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) |
| 19 | `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
@@ -1,5 +1,5 @@
---
sidebar_position: 1
sidebar_position: 2
sidebar_label: Get Aggregated Token Pair Stats
slug: /web3-data-api/evm/reference/get-aggregated-token-pair-stats
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 2
sidebar_position: 3
sidebar_label: Get Specific Token Pair Address
slug: /web3-data-api/evm/reference/get-pair-address
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 3
sidebar_position: 4
sidebar_label: Get Token Pair Reserves
slug: /web3-data-api/evm/reference/get-pair-reserves
---
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
sidebar_position: 1
sidebar_label: Get Token Pair Stats
slug: /web3-data-api/evm/reference/get-token-pair-stats
---

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

# Get Token Pair Stats

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

<ApiReference {...config.token.getPairStats} >
<Admonition type="info" title="Note">

<p>
The data is updated every 30 seconds to ensure you have access to near real-time information about price changes, liquidity, volume, and trading activity.

</p>
</Admonition>
</ApiReference>
11 changes: 6 additions & 5 deletions docs/01-web3-data-api/evm/reference/token-api/token-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,19 @@ Select what you want to achieve:
| 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) |
| 14 | `getPairStats` | Get token pair statistics | [Method Documentation](/web3-data-api/evm/reference/get-token-pair-stats) | [https://deep-index.moralis.io/api/v2.2//pairs/:address/stats](https://deep-index.moralis.io/api/v2.2//pairs/:address/stats) |
| 15 | `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) |
| 16 | `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) |
| 17 | `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 |
| --- | --------------- | --------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| 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) |
| 18 | `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 |
| --- | ---------------- | ---------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| 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) |
| 19 | `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) |
13 changes: 7 additions & 6 deletions docs/01-web3-data-api/solana/reference/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ Find your favorite method by selecting one of the following categories:

### Token API

| No. | Method | Description | API Reference | URL | Spam Detection |
| --- | ----------------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------- |
| 1 | `getTokenPrice` | Get token price | [Method Documentation](/web3-data-api/solana/reference/get-sol-token-price) | [https://solana-gateway.moralis.io/token/:network/:address/price](https://solana-gateway.moralis.io/token/:network/:address/price) | |
| 2 | `getTokenMetadata` | Get token metadata | [Method Documentation](/web3-data-api/solana/reference/get-token-metadata) | [https://solana-gateway.moralis.io/token/:network/:address/metadata](https://solana-gateway.moralis.io/token/:network/:address/metadata) | |
| 3 | `getTokenPairs` | Get token pairs by address | [Method Documentation](/web3-data-api/solana/reference/get-token-pairs-by-address) | [https://solana-gateway.moralis.io/token/:network/:address/pairs](https://solana-gateway.moralis.io/token/:network/:address/pairs) | |
| 4 | `getAggregatedTokenPairStats` | Get aggregated token pair statistics | [Method Documentation](/web3-data-api/solana/reference/get-aggregated-token-pair-stats) | [https://solana-gateway.moralis.io/token/:network/:address/pairs/stats](https://solana-gateway.moralis.io/token/:network/:address/pairs/stats) | |
| No. | Method | Description | API Reference | URL | Spam Detection |
| --- | ----------------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------- |
| 1 | `getTokenPrice` | Get token price | [Method Documentation](/web3-data-api/solana/reference/get-sol-token-price) | [https://solana-gateway.moralis.io/token/:network/:address/price](https://solana-gateway.moralis.io/token/:network/:address/price) | |
| 2 | `getTokenMetadata` | Get token metadata | [Method Documentation](/web3-data-api/solana/reference/get-token-metadata) | [https://solana-gateway.moralis.io/token/:network/:address/metadata](https://solana-gateway.moralis.io/token/:network/:address/metadata) | |
| 3 | `getTokenPairs` | Get token pairs by address | [Method Documentation](/web3-data-api/solana/reference/get-token-pairs-by-address) | [https://solana-gateway.moralis.io/token/:network/:address/pairs](https://solana-gateway.moralis.io/token/:network/:address/pairs) | |
| 4 | `getTokenPairStats` | Get token pair statistics | [Method Documentation](/web3-data-api/solana/reference/get-token-pair-stats) | [https://solana-gateway.moralis.io/token/:network/pairs/:pairAddress/stats](https://solana-gateway.moralis.io/token/:network/pairs/:pairAddress/stats) |
| 5 | `getAggregatedTokenPairStats` | Get aggregated token pair statistics | [Method Documentation](/web3-data-api/solana/reference/get-aggregated-token-pair-stats) | [https://solana-gateway.moralis.io/token/:network/:address/pairs/stats](https://solana-gateway.moralis.io/token/:network/:address/pairs/stats) | |

### Balance API

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: 4
sidebar_position: 5
sidebar_label: Get Aggregated Token Pair Stats
slug: /web3-data-api/solana/reference/get-aggregated-token-pair-stats
---
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 2
sidebar_label: Get token metadata
sidebar_label: Get Token Metadata
slug: /web3-data-api/solana/reference/get-token-metadata
---

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

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

# Get Token Pair Stats

<ApiReference {...config.solana.getPairStats} >
<Admonition type="info" title="Note">

<p>
The data is updated every 30 seconds to ensure you have access to near real-time information about price changes, liquidity, volume, and trading activity.

</p>
</Admonition>
</ApiReference>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 1
sidebar_label: Get token price
sidebar_label: Get Token Price
slug: /web3-data-api/solana/reference/get-sol-token-price
---

Expand Down
Loading

0 comments on commit f986dc0

Please sign in to comment.