Moralis Token API

The Token API from Moralis — 35 operation(s) for token.

OpenAPI Specification

moralis-token-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: EVM Balance Token API
  version: '2.2'
servers:
- url: https://deep-index.moralis.io/api/v2.2
security:
- ApiKeyAuth: []
tags:
- name: Token
paths:
  /erc20/{address}/price:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get ERC20 token price
      description: Retrieve the current or historical price of an ERC20 token in the blockchain’s native currency and USD. Each token returned includes on-chain metadata, as well as off-chain metadata, logos, spam status and more. Additional options to exclude low-liquidity tokens and inactive tokens.
      tags:
      - Token
      x-tag-sdk: token
      operationId: getTokenPrice
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: path
        name: address
        description: The address of the token contract
        required: true
        schema:
          type: string
          example: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0'
      - in: query
        name: exchange
        description: The factory name or address of the token exchange
        required: false
        schema:
          type: string
      - in: query
        name: to_block
        description: The block number from which the token price should be checked
        required: false
        schema:
          type: integer
          minimum: 0
      - in: query
        name: include
        description: This parameter is now deprecated as percentage change are included by default
        required: false
        deprecated: true
        schema:
          type: string
          example: ''
          default: ''
          enum:
          - percent_change
      - in: query
        name: max_token_inactivity
        description: Exclude tokens inactive for more than the given amount of days
        required: false
        schema:
          type: number
      - in: query
        name: min_pair_side_liquidity_usd
        description: Exclude tokens with liquidity less than the specified amount in USD. This parameter refers to the liquidity on a single side of the pair.
        required: false
        schema:
          type: number
      responses:
        '200':
          description: Returns the price denominated in the blockchain's native token and USD for a given token contract address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/erc20Price'
      x-mcp-prompt: Enter the token contract address to fetch its price. Use this when users ask for the current price of an ERC20 token or the historical price of a token at a point in time, or simply need price data for trading.
  /erc20/{address}/swaps:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get swap transactions by token address
      description: Get all swap transactions (buy/sell) for a specific ERC20 token.
      tags:
      - Token
      x-tag-sdk: token
      operationId: getSwapsByTokenAddress
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: path
        name: address
        description: The token address to get transaction for
        required: true
        schema:
          type: string
          example: '0x6982508145454ce325ddbe47a25d4ec3d2311933'
      - in: query
        name: cursor
        description: The cursor returned in the previous response (used for getting the next page).
        schema:
          type: string
      - in: query
        name: limit
        description: The desired page size of the result.
        required: false
        schema:
          type: integer
          minimum: 0
      - in: query
        name: order
        description: The order of the result, in ascending (ASC) or descending (DESC)
        required: false
        schema:
          $ref: '#/components/schemas/orderList'
      - in: query
        name: fromBlock
        description: 'The minimum block number from which to get the token transactions

          * Provide the param ''from_block'' or ''from_date''

          * If ''from_date'' and ''from_block'' are provided, ''from_block'' will be used.

          '
        required: false
        schema:
          type: integer
          minimum: 0
      - in: query
        name: toBlock
        description: The block number to get the token transactions from
        required: false
        schema:
          type: string
      - in: query
        name: fromDate
        description: 'The start date from which to get the token transactions (format in seconds or datestring accepted by momentjs)

          * Provide the param ''from_block'' or ''from_date''

          * If ''from_date'' and ''from_block'' are provided, ''from_block'' will be used.

          '
        required: false
        schema:
          type: string
      - in: query
        name: toDate
        description: 'The end date from which to get the token transactions (format in seconds or datestring accepted by momentjs)

          * Provide the param ''to_block'' or ''to_date''

          * If ''to_date'' and ''to_block'' are provided, ''to_block'' will be used.

          '
        required: false
        schema:
          type: string
      - name: transactionTypes
        in: query
        required: false
        schema:
          type: string
        description: Array of transaction types. Allowed values are 'buy', 'sell'.
      responses:
        '200':
          description: Returns swap transactions by wallet address.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/getSwapsByWalletAddressResponse'
      x-mcp-prompt: Provide the token contract address to view its swap transactions. Use this when users want to track trading activity for a token or analyze swap volume.
  /erc20/{tokenAddress}/holders:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get a holders summary by token address
      description: Returns total holders for a given token, as well as aggregated stats holder supply, holder trends, holder distribution and holder acquisition metrics.
      tags:
      - Token
      x-tag-sdk: token
      operationId: getTokenHolders
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: path
        name: tokenAddress
        description: The token address to get transaction for
        required: true
        schema:
          type: string
          example: '0x6982508145454ce325ddbe47a25d4ec3d2311933'
      responses:
        '200':
          description: Returns token holder summary result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenHolderSummaryResult'
      x-mcp-prompt: Enter the token contract address to retrieve its total holders as well as detailde holder metrics. Use this when users ask who holds a token or want to analyze its activity, distribution or trends.
  /erc20/{tokenAddress}/holders/historical:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get timeseries holders data
      description: Track changes in the holder base of an ERC20 token over time. Supports timeseries data for total holders as well as change metrics such as holder distribution and holder acquisition.
      tags:
      - Token
      x-tag-sdk: token
      operationId: getHistoricalTokenHolders
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: path
        name: tokenAddress
        description: The token address
        required: true
        schema:
          type: string
          example: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0'
      - in: query
        name: fromDate
        description: 'The starting date (format in seconds or datestring accepted by momentjs)

          '
        required: true
        schema:
          type: string
          example: '2025-01-01T10:00:00'
      - in: query
        name: toDate
        description: 'The ending date (format in seconds or datestring accepted by momentjs)

          '
        required: true
        schema:
          type: string
          example: '2025-02-01T11:00:00'
      - in: query
        name: limit
        description: The number of results to return
        required: false
        schema:
          type: integer
          minimum: 0
      - in: query
        name: cursor
        description: The cursor returned in the previous response (used for getting the next page)
        required: false
        schema:
          type: string
      - in: query
        name: timeFrame
        description: The time frame to group the data by
        required: true
        schema:
          type: string
          example: 1d
          default: 1min
          enum:
          - 1min
          - 5min
          - 10min
          - 30min
          - 1h
          - 4h
          - 12h
          - 1d
          - 1w
          - 1m
      responses:
        '200':
          description: Returns token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenHolderTimelineResult'
      x-mcp-prompt: Provide the token contract address and time period to view timeseries historical holder changes. Use this when users want to see how a token’s holder base has evolved over time.
  /erc20/prices:
    post:
      security:
      - ApiKeyAuth: []
      summary: Get Multiple ERC20 token prices
      description: Retrieve the current or historical prices for multiple ERC20 tokens in the blockchain’s native currency and USD. Accepts an array of up to 100 `tokens`, each requiring `token_address` and optional fields such as `to_block` or `exchange`. Each token returned includes on-chain metadata, as well as off-chain metadata, logos, spam status and more. Additional options to exclude low-liquidity tokens and inactive tokens.
      tags:
      - Token
      x-tag-sdk: token
      operationId: getMultipleTokenPrices
      requestBody:
        description: Body
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetMultipleTokenPricesDto'
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: query
        name: include
        description: This parameter is now deprecated as percentage change are included by default
        required: false
        deprecated: true
        schema:
          type: string
          example: ''
          default: ''
          enum:
          - percent_change
      - in: query
        name: max_token_inactivity
        description: Exclude tokens inactive for more than the given amount of days
        required: false
        schema:
          type: number
      - in: query
        name: min_pair_side_liquidity_usd
        description: Exclude tokens with liquidity less than the specified amount in USD. This parameter refers to the liquidity on a single side of the pair.
        required: false
        schema:
          type: number
      responses:
        '200':
          description: Returns an array of token prices denominated in the blockchain's native token and USD for a given token contract address
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/erc20Price'
      x-mcp-prompt: Submit a list of token contract addresses to retrieve their prices. Use this when users need price data for one or many tokens or are comparing market values.
  /erc20/{token_address}/owners:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get ERC20 token owners by contract
      description: Identify the major holders of an ERC20 token and understand their ownership percentages. Includes known entities, exchanges and wallet labels.
      tags:
      - Token
      x-tag-sdk: token
      operationId: getTokenOwners
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: path
        name: token_address
        description: The address of the token contract
        required: true
        schema:
          type: string
          example: '0x6982508145454ce325ddbe47a25d4ec3d2311933'
      - in: query
        name: limit
        description: The desired page size of the result.
        required: false
        schema:
          type: integer
          minimum: 0
      - in: query
        name: cursor
        description: The cursor returned in the previous response (used for getting the next page).
        required: false
        schema:
          type: string
      - in: query
        name: order
        description: The order of the result, in ascending (ASC) or descending (DESC)
        required: false
        schema:
          $ref: '#/components/schemas/orderList'
      responses:
        '200':
          description: Returns a collection of owners of an ERC20 token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/erc20TokenOwnerCollection'
      x-mcp-prompt: Enter the token contract address to list its major owners. Use this when users want to know the top holders of a token or analyze ownership concentration.
  /{address}/erc20:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get ERC20 token balances by wallet
      description: Get an unpaginated list of token balances, without token prices, for a specific wallet address. Maximum of 2,000 tokens. Each token returned includes on-chain metadata, as well as off-chain metadata, logos, spam status and more.
      tags:
      - Token
      x-tag-sdk: token
      operationId: getWalletTokenBalances
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: path
        name: address
        description: The address from which token balances will be checked
        required: true
        schema:
          type: string
          example: '0xcB1C1FdE09f811B294172696404e88E658659905'
      - in: query
        name: to_block
        description: The block number up to which the balances will be checked.
        required: false
        schema:
          type: number
      - in: query
        name: token_addresses
        description: The addresses to get balances for (optional)
        required: false
        schema:
          type: array
          maxItems: 10
          items:
            type: string
      - in: query
        name: exclude_spam
        description: Exclude spam tokens from the result
        required: false
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: Returns token balances for a specific address
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/erc20TokenBalance'
      x-mcp-prompt: Provide the wallet address to fetch its ERC20 token balances. Use this when users ask for a wallet’s token holdings or want to check their portfolio.
  /{address}/erc20/transfers:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get ERC20 token transfers by wallet address
      description: Get all ERC20 token transfers for a given wallet address, sorted by block number (newest first).
      tags:
      - Token
      x-tag-sdk: token
      operationId: getWalletTokenTransfers
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: query
        name: from_block
        description: 'The minimum block number from which to get the transactions

          * Provide the param ''from_block'' or ''from_date''

          * If ''from_date'' and ''from_block'' are provided, ''from_block'' will be used.

          '
        required: false
        schema:
          type: integer
          minimum: 0
      - in: query
        name: to_block
        description: 'The maximum block number from which to get the transactions.

          * Provide the param ''to_block'' or ''to_date''

          * If ''to_date'' and ''to_block'' are provided, ''to_block'' will be used.

          '
        required: false
        schema:
          type: integer
          minimum: 0
      - in: query
        name: from_date
        description: 'The start date from which to get the transactions (format in seconds or datestring accepted by momentjs)

          * Provide the param ''from_block'' or ''from_date''

          * If ''from_date'' and ''from_block'' are provided, ''from_block'' will be used.

          '
        required: false
        schema:
          type: string
      - in: query
        name: to_date
        description: 'Get the transactions up to this date (format in seconds or datestring accepted by momentjs)

          * Provide the param ''to_block'' or ''to_date''

          * If ''to_date'' and ''to_block'' are provided, ''to_block'' will be used.

          '
        schema:
          type: string
      - in: path
        name: address
        description: The address of the wallet
        required: true
        schema:
          type: string
          example: '0xcB1C1FdE09f811B294172696404e88E658659905'
      - in: query
        name: contract_addresses
        description: List of contract addresses of transfers
        required: false
        schema:
          type: array
          items:
            type: string
      - in: query
        name: limit
        description: The desired page size of the result.
        required: false
        schema:
          type: integer
          minimum: 0
      - in: query
        name: order
        description: The order of the result, in ascending (ASC) or descending (DESC)
        required: false
        schema:
          $ref: '#/components/schemas/orderList'
      - in: query
        name: cursor
        description: The cursor returned in the previous response (used for getting the next page).
        schema:
          type: string
      responses:
        '200':
          description: Returns a collection of token transactions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/erc20TransactionCollection'
      x-mcp-prompt: Input the wallet address to view its ERC20 token transactions. Use this when users want to track a wallet’s token activity or review transaction history.
  /erc20/metadata:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get ERC20 token metadata by contract
      description: Retrieve metadata (name, symbol, decimals, logo) for an ERC20 token contract, as well as off-chain metadata, total supply, categories, logos, spam status and more.
      tags:
      - Token
      x-tag-sdk: token
      operationId: getTokenMetadata
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: query
        name: addresses
        description: The addresses to get metadata for
        required: true
        schema:
          type: array
          maxItems: 10
          items:
            type: string
            example: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0'
      responses:
        '200':
          description: Get the metadata for a given ERC20 token contract address (name, symbol, decimals, logo).
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/erc20Metadata'
      x-mcp-prompt: Enter the token contract address to fetch its metadata. Use this when users need basic information about a token or are verifying contract details.
  /tokens/categories:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get ERC20 token categories
      description: ''
      tags:
      - Token
      x-tag-sdk: token
      operationId: getTokenCategories
      responses:
        '200':
          description: Returns a list of ERC20 token categories, such as stablecoin, meme, governance, and more. Use this endpoint to explore available token categories for filtering or analytics.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/erc20Categories'
  /erc20/metadata/symbols:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get ERC20 token metadata by symbols
      description: Fetch metadata (name, symbol, decimals, logo) for a list of ERC20 token symbols.
      deprecated: true
      tags:
      - Token
      x-tag-sdk: token
      operationId: getTokenMetadataBySymbol
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: query
        name: symbols
        description: The symbols to get metadata for
        required: true
        schema:
          type: array
          items:
            type: string
            example: LINK
      responses:
        '200':
          description: Returns metadata for a given token contract address (name, symbol, decimals, logo).
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/erc20Metadata'
      x-mcp-prompt: Provide a list of token symbols to retrieve their metadata. Use this when users request metadata for tokens by symbol or are exploring multiple tokens.
  /erc20/{address}/transfers:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get ERC20 token transfers by contract address
      description: Get all ERC20 token transfers for a contract, ordered by block number (newest first).
      tags:
      - Token
      x-tag-sdk: token
      operationId: getTokenTransfers
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: query
        name: from_block
        description: 'The minimum block number from which to get the transfers

          * Provide the param ''from_block'' or ''from_date''

          * If ''from_date'' and ''from_block'' are provided, ''from_block'' will be used.

          '
        required: false
        schema:
          type: integer
          minimum: 0
      - in: query
        name: to_block
        description: 'The maximum block number from which to get the transfers.

          * Provide the param ''to_block'' or ''to_date''

          * If ''to_date'' and ''to_block'' are provided, ''to_block'' will be used.

          '
        required: false
        schema:
          type: integer
          minimum: 0
      - in: query
        name: from_date
        description: 'The start date from which to get the transfers (format in seconds or datestring accepted by momentjs)

          * Provide the param ''from_block'' or ''from_date''

          * If ''from_date'' and ''from_block'' are provided, ''from_block'' will be used.

          '
        required: false
        schema:
          type: string
      - in: query
        name: to_date
        description: 'Get transfers up until this date (format in seconds or datestring accepted by momentjs)

          * Provide the param ''to_block'' or ''to_date''

          * If ''to_date'' and ''to_block'' are provided, ''to_block'' will be used.

          '
        schema:
          type: string
      - in: path
        name: address
        description: The address of the token contract
        required: true
        schema:
          type: string
          example: '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0'
      - in: query
        name: limit
        description: The desired page size of the result.
        required: false
        schema:
          type: integer
          minimum: 0
      - in: query
        name: order
        description: The order of the result, in ascending (ASC) or descending (DESC)
        required: false
        schema:
          $ref: '#/components/schemas/orderList'
      - in: query
        name: cursor
        description: The cursor returned in the previous response (used for getting the next page).
        schema:
          type: string
      responses:
        '200':
          description: Returns a collection of token contract transactions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/erc20TransactionCollection'
      x-mcp-prompt: Enter the token contract address to list its transactions. Use this when users want to track all transactions for a token or analyze its activity.
  /erc20/{address}/stats:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get ERC20 token stats
      description: Get the total number of transfers for a given ERC20. For more detailed tokens stats we recommended to use `getTokenAnalytics` or `getMultipleTokenAnalytics`. For pair stats, we recommend to use `getPairStats`.
      deprecated: true
      tags:
      - Token
      x-tag-sdk: token
      operationId: getTokenStats
      parameters:
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      - in: path
        name: address
        description: The address of the erc20 token
        required: true
        schema:
          type: string
          example: '0x6982508145454ce325ddbe47a25d4ec3d2311933'
      responses:
        '200':
          description: Returns the stats for the erc20 token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/erc20TokenStat'
      x-mcp-prompt: Provide the token contract address to fetch the total number of transfers for this token. Use this when users ask how many transfers a given token has.
  /erc20/{address}/top-gainers:
    get:
      security:
      - ApiKeyAuth: []
      summary: Get top traders for a given ERC20 token
      description: List the most profitable wallets that have traded a specific ERC20 token.
      tags:
      - Token
      x-tag-sdk: token
      operationId: getTopProfitableWalletPerToken
      parameters:
      - in: path
        name: address
        required: true
        schema:
          type: string
          example: '0x6982508145454ce325ddbe47a25d4ec3d2311933'
        description: The ERC20 token address.
      - in: query
        name: days
        required: false
        schema:
          type: string
        description: Timeframe in days for which profitability is calculated, Options include 'all', '7', '30' default is 'all'.
      - in: query
        name: chain
        description: The chain to query
        required: false
        schema:
          $ref: '#/components/schemas/chainList'
      responses:
        '200':
          description: Successful response with top profitable wallets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WalletTopProfitableWalletPerTokenResponse'
      x-mcp-prompt: Provide the token contract address to find its top profitable wallets. Use this when users ask who’s profiting most from a token or want to analyze successful traders.
  /tokens/search:
    get:
      security:
      - ApiKeyAuth: []
      summary: Search for tokens based on contract address, pair address, token name or token symbol.
      description: Search for tokens using their contract address, pair address, name, or symbol. Cross-chain by default with support to filter by `chains`. Additional options to `sortBy` various metrics, such as market cap, liquidity or volume.
      tags:
      - Token
      x-tag-sdk: token
      operationId: searchTokens
      parameters:
      - in: query
        name: chains
        description: The chains to query
        required: false
        schema:
          type: string
      - in: query
        name: query
        description: The query to search
        required: true
        schema:
          type: string
          example: pepe
      - in: query
        name: limit
        description: The desired page size of the result.
        required: false
        schema:
          type: number
      - in: query
        name: isVerifiedContract
        description: True to include only verified contracts
        required: false
        schema:
          type: boolean
          default: false
      - in: query
        name: sortBy
        description: Sort by volume1hDesc, volume24hDesc, liquidityDesc, marketCapDesc
        required: false
        schema:
          type: string
          example: volume1hDesc
          default: volume1hDesc
          enum:
          - volume1hDesc
          - volume24hDesc
          - liquidityDesc
          - marketCapDesc
      - in: query
        name: boostVerifiedContracts
        description: True to boost verified contracts
        required: false
        schema:
          type: boolean
          default: true
      responses:
        '200':
          description: Returns the search results
          content:
            application/json:
              schema:
                type: object
                properties:
                  total:
                    type: integer
                    example: 10000
                  result:
                    type: array
                    items:
                      type: object
                      properties:
                        tokenAddress:
                          type: string
                          example: '0x6982508145454ce325ddbe47a25d4ec3d2311933'
                        chainId:
                          type: string
                          example: '0x1'
                        name:
                          type: string
                          example: Pepe
                        symbol:
                          type: string
                          example: PEPE
                        blockNumber:
                          type: integer
                          example: 17046105
                        blockTimestamp:
                          type: integer
                          example: 1681483883
                        usdPrice:
                          type: number
                          format: float
                          example: 2.4509478199144e-05
                        marketCap:
                          type: number
                          format: float
                          example: 9825629287.860994
                        experiencedNetBuyers:
                          type: object
                          properties:
                            oneHour:
                              type: integer
                              example: 31
                            oneDay:
                              type: integer
                              example: 51
                            oneWeek:
                              type: integer
                              example: 77
                        netVolumeUsd:
                          type: object
                          properties:
                            oneHour:
                              type: number
                              format: float
                              example: 188552.0639107914
                            oneDay:
                              type: number
                              format: float
                              example: 1188552.0639107914
                        liquidityChangeUSD:
                          ty

# --- truncated at 32 KB (133 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/moralis/refs/heads/main/openapi/moralis-token-api-openapi.yml