GetCollectionStats
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
bb query tokenization collection-stats 1curl https://lcd.bitbadges.io/bitbadges/bitbadgeschain/tokenization/get_collection_stats/1Request
| Field | Type | Description |
|---|---|---|
collectionId | string | Collection ID. |
Response
{
"stats": {
"holderCount": "2",
"balances": [
{
"amount": "100",
"ownershipTimes": [{ "start": "1", "end": "18446744073709551615" }],
"tokenIds": [{ "start": "1", "end": "100" }]
}
]
}
}| Field | Type | Description |
|---|---|---|
holderCount | Uint | Addresses with a non-zero balance. |
balances | Balance[] | Circulating supply as balance ranges: total minted minus tokens locked in a backed path. |
Behavior
holderCountexcludes the special addressesMintandTotal, 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 emptybalancesarray. - Fails with
ErrInvalidCollectionIDfor an unknown collection. - Uses: holder analytics, supply displays, and compliance checks on holder-count limits.