# Tokens

## Token Specific

## Get Token

<mark style="color:blue;">`GET`</mark> `https://api.pepeanalytics.com/v1/token/:address`

Available data about a specified token. `type=min` will return the minimal response while `type=full` will return everything on the token.&#x20;

Includes: token price, liquidity, token sniffer score, contract analysis, deployment time, contract analysis, holder data, allocations, daily or hourly activity history, etc.

#### Path Parameters

| Name                                      | Type   | Description            |
| ----------------------------------------- | ------ | ---------------------- |
| address<mark style="color:red;">\*</mark> | String | Token contract address |

#### Query Parameters

| Name              | Type        | Description                                                                            |
| ----------------- | ----------- | -------------------------------------------------------------------------------------- |
| history           | day \| hour | If wanting to see hourly or daily history                                              |
| type              | full \| min | Get full response data (Default: full)                                                 |
| include\_holders  | Boolean     | Show PEPE AI Holders with property: \`pepeAiHolders\`                                  |
| first\_txs\_count | Number      |                                                                                        |
| pool\_txs\_count  | Number      | How many pool transactions to show per pool. `txs` property will be added to each pool |

{% tabs %}
{% tab title="200: OK Sucess: type=full" %}

```
{
    data: {
        address: string                        # Token contract address
        symbol: string                         # Token symbol
        name: string                           # Token name
        decimals: string                       # Token decimals
        txCount: string                        # Transactions with token
        createdAt: string                      # Deployed at timestamp (UTC)
        website: string                        # Website URL
        logo: string                           # Token Image
        chainId: string                        # Chain ID
        owner: string                          # Token owner address
        marketCap?: {
            eth: string                        # Market Cap in ETH
            usd: string                        # Market Cap in USD
        }
        volume: {
            eth: string                        # 24H Volume in ETH
            usd: string                        # 24H Volume in USD
        }
        tvl?: {
            eth: string                        # TVL in ETH
            usd: string                        # TVL in USD
        }
        liquidity?: {
            eth: string                        # Liquidity in ETH
            usd: string                        # Liquidity in USD
        }
        price: {
            eth: string                        # Price in ETH
            usd: string                        # Price in USD
        }
        totalSupply: string                    # Total supply of token
        pepeAiHolders?: [                      # Pepe AI Coupon holders that hold this token
            {
                address: string
                balance: string | number
            }
            ...
        ]
        deployer: string                        # Deployer wallet address
        score?: string                          # Token Sniffer score
        percentChange?: {                       # Percent changes for token price and volume
            price: {
                daily: number
                weekly: number
                monthly: number
            }
            volume: {
                daily: number
                weekly: number
                monthly: number
            }
        }
        history?: [
            {
               timestamp: string                       # Timestamp (UTC)
               volume: {
                  eth: string                          # Volume in ETH at that time
                  usd: string                          # Volume in USD at that time
                }
                tvl?: {
                    eth: string                        # TVL in ETH at that time
                    usd: string                        # TVL in USD at that time
                }
                liquidity?: {
                    eth: string                        # Liquidity in ETH at that time
                    usd: string                        # Liquidity in USD at that time
                 }
                 priceUSD: string                      # Token price at that time
                 feesUSD?: string                      # Fees generated from UniV3
                 open?: string                         # Ticker open (wnly with UniV3)
                 close?: string                        # Ticker close (only with UniV3
                 low?: string                          # Ticker low (only with UniV3)
                 high?: string                         # Ticker high (only with UniV3)
                 txCount?: string                      # Transaction count at that time
            }
            ...
        ]
        analysis: {                                 
            pools: {
                count: string | number               # Amount of pools
                list: [                              # Available DEX liquidity pools
                    {
                      address: string                # Pool address
                      name: string                   # Pool name
                      base: {                        
                        symbol: string               # Pool base symbol
                        address: string              # Pool base address
                        reserve: string              # Pool base reserve
                      };
                      balances: {
                        owner: string                # Pool's owner balance
                        deployer: string             # Pool deployer balance
                        burned: string               # Amount burned
                        locked: string               # Amount locked
                      };
                      topHolders: [                  # Top LP holders
                          {
                            address: string          
                            balance: string
                          }
                          ...
                      ]
                      locks: [any]
                      txs?: [
                          {
                              pool: string           # Pool address
                              address: string        # Wallet address executing tx
                              amount: string         # Amount in respective token 
                              hash: string           # Transaction hash
                              timestamp: string      # UTC timestamp
                              type: 'sell' | 'buy'   # Buy or sell transaction
                          }
                          ...
                      ]
                    }
                    ...
                ]
            },
            contract: {                                # Token Sniffer response about contract
                verifiedSource: boolean                
                ownershipRenounced: boolean
                hasFeeModifier: boolean
                hasMaxTransactionAmount: boolean
                hasMint: boolean
                hasPause: boolean
                isUpgradable: boolean
                hasBlacklist: boolean
                buyFee: number
                sellFee: number
                isSellable: boolean
                isFlagged: boolean
            },
            holders: {
                count: number                          # Amount of holders
                top: [                                 # List of top token holders
                    {
                        address: string                # Holder address
                        amount: number                 # Holder balance
                    }
                    ...
                ],
                creatorHoldsLittle: boolean            # Creator holds less than 5%
                topTenRatio: boolean | 'N/A'           # The top 10% hold less than 5%
            },
            balances: {                                # Current token balance allocations
                locked: {
                    amount: string                     # Token amount locked
                    share: string                      # Token percent locked
                }
                burned: {
                    amount: string                     # Token amount burned
                    share: string                      # Token percent burned
                }
                unlocked: {
                    amount: string                     # Token amount unlocked
                    share: string                      # Token percent unlocked
                }
                owner: {
                    amount: string                     # Token amount owner holds
                    share: string                      # Token percent owner holds
                }
                deployer: {
                    amount: string                     # Token amount deployer holds
                    share: string                      # Token percent deployer holds
                }
            },
            allocation: {                              # Token allocation
                team: string
                community: string
            }
        }
        firstTxs: [                                    # List of first transactions after deployment
            {
                to: string
                timestamp: string                      # UTC timestamp of TX
                hash: string                           # TX Hash
                from: string                           # Wallet executed with
                amount: string                         # Amount of transaction
                asset: string                          # Token symbol
            }
            ...
        ]
        pepeAiHolders?: [                              # Pepe AI Coupon holders that hold this token
            {
                address: string
                balance: string | number
            }
            ...
        ]
    }
    message: 'Success'
    isError: false
}
```

{% endtab %}

{% tab title="200: OK Success: type=min" %}

```
{
    data: {
        address: string                        # Token contract address
        symbol: string                         # Token symbol
        name: string                           # Token name
        decimals: string                       # Token decimals
        txCount: string                        # Transactions with token
        createdAt: string                      # Deployed at timestamp (UTC)
        website: string                        # Website URL
        logo: string                           # Token Image
        chainId: string                        # Chain ID
        owner: string                          # Token owner address
        marketCap?: {
            eth: string                        # Market Cap in ETH
            usd: string                        # Market Cap in USD
        }
        volume: {
            eth: string                        # 24H Volume in ETH
            usd: string                        # 24H Volume in USD
        }
        tvl?: {
            eth: string                        # TVL in ETH
            usd: string                        # TVL in USD
        }
        liquidity?: {
            eth: string                        # Liquidity in ETH
            usd: string                        # Liquidity in USD
        }
        price: {
            eth: string                        # Price in ETH
            usd: string                        # Price in USD
        }
        totalSupply: string                    # Total supply of token
        pepeAiHolders?: [                      # Pepe AI Coupon holders that hold this token
            {
                address: string
                balance: string | number
            }
            ...
        ]
    }
    message: 'Success'
    isError: false
}
```

{% endtab %}

{% tab title="500: Internal Server Error Error" %}

```
{
    data: null
    isError: true
    message: any
}
```

{% endtab %}

{% tab title="404: Not Found Token not found" %}

```
{
    data: {
        address: string
    }
    isError: true
    message: any
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

```
{
    data: null
    isError: true
    message: string
}
```

{% endtab %}
{% endtabs %}

## Get Token Pools

<mark style="color:blue;">`GET`</mark> `https://api.pepeanalytics.com/v1/token/:address/pools`

Gets all pools that include the respective token.

#### Query Parameters

| Name       | Type   | Description                                                                         |
| ---------- | ------ | ----------------------------------------------------------------------------------- |
| txs\_count | Number | Amount of transactions for each pool. `txs` property will be added to the response. |

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
    data: [
        {
            address: string                  # Pool address
            name: string                     # Pool name
            base: {                        
                symbol: string               # Pool base symbol
                address: string              # Pool base address
                reserve: string              # Pool base reserve
            }
            balances: {
                owner: string                # Pool's owner balance
                deployer: string             # Pool deployer balance
                burned: string               # Amount burned
                locked: string               # Amount locked
            }
            topHolders: [                    # Top LP holders
                {
                    address: string          
                    balance: string
                }
                ...
            ]
            locks: [any]
            txs?: [                          # Pool transactions
                {
                      pool: string           # Pool address
                      address: string        # Wallet address executing tx
                      amount: string         # Amount in respective token 
                      hash: string           # Transaction hash
                      timestamp: string      # UTC timestamp
                      type: 'sell' | 'buy'   # Buy or sell transaction
                }
                ...
            ]
        }
        ...
    ],
    message: 'Success'
    isError: false
}
```

{% endtab %}
{% endtabs %}

## Get Token Transfers

<mark style="color:blue;">`GET`</mark> `https://api.pepeanalytics.com/v1/token/:address/txs`

Gets list of most recent transfers performed on respective token.

#### Path Parameters

| Name                                      | Type   | Description   |
| ----------------------------------------- | ------ | ------------- |
| address<mark style="color:red;">\*</mark> | String | Token address |

#### Query Parameters

| Name   | Type   | Description                                          |
| ------ | ------ | ---------------------------------------------------- |
| amount | Number | Amount of transactions to retrieve (default: 15)     |
| page   | Number | Paginated response that sends 15 transfers at a time |

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
    data: [
       {
          to: string                  # To address
          from: string                # From address
          amount: string              # Amount sent in token terms
          hash: string                # Transaction hash
          timestamp: string           # Timestamp (UTC)
          asset: string               # Token symbol
       }
       ...
    ]
    message: 'Success'
    isError: false
}
```

{% endtab %}
{% endtabs %}

## Get Top Token Holders

<mark style="color:blue;">`GET`</mark> `https://api.pepeanalytics.com/v1/token/:address/top`

Gets top 10 token holders.

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
    data: [
        {
            address: string                        # Wallet address
            balance: string | number               # Token balance
            share: number                          # Share percent of total token supply
        }
        ...
    ]
    message: 'Success'
    isError: false
}
```

{% endtab %}
{% endtabs %}

## Check If Address(es) Hold Token

<mark style="color:green;">`POST`</mark> `https://api.pepeanalytics.com/v1/token/:address/holders`

Checks if list of addresses hold the specific token and returns their wallet address and respective balances.

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
    data: [
        {
            address: string
            balance: string | number
        }
        ...
    ]
    message: 'Success'
    isError: false
}
```

{% endtab %}
{% endtabs %}

## Multiple Tokens

## Get Tokens

<mark style="color:blue;">`GET`</mark> `https://api.pepeanalytics.com/v1/tokens`

Gets all tokens listed on both UniSwapV3 and SushiSwap and ordered by symbol.&#x20;

Includes: metadata, volume, tvl, fees, and price

#### Query Parameters

| Name      | Type    | Description                                        |
| --------- | ------- | -------------------------------------------------- |
| first     | String  | Limits how many data points is queried (Max: 1000) |
| skip      | String  | How many data points to skip in the query          |
| volume    | String  | Minimum amount of volume to query for              |
| liquidity | String  | Minimum amount of liquidity to query for           |
| tx\_count | String  | Minimum amount of transactions required            |
| show\_all | Boolean | Show more than 1000 results                        |

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
    data: [
        {
            address: string
            symbol: string
            name: string
            decimals: string
            txCount: string
            poolCount: string
            totalSupply: string
            volume: {
              token: string
              usd: string
            }
            tvl: {
              token: string
              usd: string
            }
            priceUSD: string
            feesUSD: string
        }
        ...
    ]
    message: 'Success'
    isError: false
}
```

{% endtab %}

{% tab title="500: Internal Server Error Error" %}

```
{
    data: null
    isError: true
    message: any
}
```

{% endtab %}
{% endtabs %}

## Get New Tokens

<mark style="color:blue;">`GET`</mark> `https://api.pepeanalytics.com/v1/tokens/new`

Get newest 100 deployed tokens.

Each item in the list contains: token metadata, price, owner address, transaction data, etc.&#x20;

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
    data: [
      {
        address: string;
        totalSupply: string | number;
        name: string;
        symbol: string;
        decimals: string | number;
        price: {                                      # Price-related data
          rate: string | number
          currency: string
          diff: string | number
          diff7d: string | number
          diff30d: string | number
          marketCapUsd: string | number
          availableSupply: string | number
          volume24h: string | number
          ts: string | number
        } | false;
        owner: string
        countOps: string | number                      # Operations count
        totalIn: string | number
        totalOut: string | number
        transfersCount: string | number
        ethTransfersCount: string | number
        holdersCount: string | number
        issuancesCount: string | number
        image?: string
        description?: string
        website?: string
        lastUpdated?: string                            # Last time Ethplorer updated this
        added: string | number
      }
      ...
    ]
    message: 'Success'
    isError: false
}
```

{% endtab %}

{% tab title="500: Internal Server Error Error" %}

```
{
    data: null
    isError: true
    message: any
}
```

{% endtab %}
{% endtabs %}

## Get Top Tokens

<mark style="color:blue;">`GET`</mark> `https://api.pepeanalytics.com/v1/tokens/top`

Shows top 50 most active tokens for the last 30 days.

Each item in the list contains: token metadata, price, owner address, transaction data, etc.&#x20;

{% tabs %}
{% tab title="200: OK Successful response" %}

```
{
    data: [
      {
        address: string
        totalSupply: string
        name: string
        symbol: string
        decimals: string
        price: {
          rate: number
          currency: string
          diff: number
          diff7d: number
          diff30d: number
          marketCapUsd: number
          availableSupply: number
          volume24h: number
          ts: number
        }
        owner: string
        countOps: number
        transfersCount: number
        holdersCount: number
        issuancesCount: number
        lastUpdated: number
      }
      ...
    ]
    message: 'Success'
    isError: false
}
```

{% endtab %}

{% tab title="500: Internal Server Error Error" %}

```
{
    data: null
    isError: true
    message: any
}
```

{% endtab %}
{% endtabs %}
