Skip to content

Token Metadata and Supply

This section describes how to fetch token-specific metadata and supply information, as well as how to retrieve $M tokens with their supply and top holders.

1. Single Token Metadata

Use the token(id) query to fetch metadata for a specific token by its address:

query SingleTokenQuery {
  tokenM: token(id: "0x866a2bf4e572cbcf37d5071a7a58503bfb36be1b") {
    name
    symbol
    decimals
    totalSupplys(first: 2, orderBy: blockNumber, orderDirection: desc) {
      value
      blockTimestamp
    }
    holders(first: 2, orderBy: balance, orderDirection: desc) {
      address
      balance
    }
  }
}

This is useful for displaying user-facing token information or for $M contract-specific metadata.

Example output:

{
  "data": {
    "tokenM": {
      "name": "M by M0",
      "symbol": "M",
      "decimals": "6",
      "totalSupplys": [
        {
          "value": "225170325944179",
          "blockTimestamp": "1747318307"
        },
        {
          "value": "225162670497707",
          "blockTimestamp": "1747292471"
        }
      ],
      "holders": [
        {
          "address": "0x437cc33344a0b27a429f795ff6b469c72698b291",
          "balance": "93411941488976"
        },
        {
          "address": "0x83ae82bd4054e815fb7b189c39d9ce670369ea16",
          "balance": "87748002909622"
        }
      ]
    }
  }
}

2. Multiple Tokens Overview

Use the tokens query to retrieve multiple tokens, including recent total supply data and top holders:

query TokensOverviewQuery {
  tokens {
    id
    name
    symbol
    decimals
    totalSupplys(first: 2, orderBy: blockNumber, orderDirection: desc) {
      value
      blockTimestamp
    }
    holders(first: 2, orderBy: balance, orderDirection: desc) {
      address
      balance
    }
  }
}

Use this query to power dashboards, compare tokens, and monitor supply and concentration trends across assets.