Skip to content

GetCollectionStats returns a collection's unique holder count and circulating supply.

Returns the number of unique holders and the circulating supply of a collection.

Example

bash
bb query tokenization collection-stats 1
bash
curl https://lcd.bitbadges.io/bitbadges/bitbadgeschain/tokenization/get_collection_stats/1

Request

FieldTypeDescription
collectionIdstringCollection ID.

Response

json
{
  "stats": {
    "holderCount": "2",
    "balances": [
      {
        "amount": "100",
        "ownershipTimes": [{ "start": "1", "end": "18446744073709551615" }],
        "tokenIds": [{ "start": "1", "end": "100" }]
      }
    ]
  }
}
FieldTypeDescription
holderCountUintAddresses with a non-zero balance.
balancesBalance[]Circulating supply as balance ranges: total minted minus tokens locked in a backed path.

Behavior

  • holderCount excludes the special addresses Mint and Total, backed path addresses, and cosmos coin wrapper path addresses.
  • Both values update on every mint, transfer, backing, and unbacking.
  • A collection with no stats record yet returns holderCount: "0" and an empty balances array.
  • Fails with ErrInvalidCollectionID for an unknown collection.
  • Uses: holder analytics, supply displays, and compliance checks on holder-count limits.

Edit this page on GitHub