> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# onHoldersUpdated

> Live-streamed list of wallets that hold a given token. Also has the unique count of holders for that token.

<div data-generated>
  ## GraphQL

  ```
  type Subscription {
    # Requires a Growth or Enterprise plan.
    onHoldersUpdated(
      tokenId: String!
    ): HoldersUpdate
  }

  type SocialLinks {
    bitcointalk: String
    blog: String
    coingecko: String
    coinmarketcap: String
    discord: String
    email: String
    facebook: String
    github: String
    instagram: String
    linkedin: String
    reddit: String
    slack: String
    telegram: String
    twitch: String
    twitter: String
    website: String
    wechat: String
    whitepaper: String
    youtube: String
  }

  type TokenInfo {
    id: String!
    address: String!
    circulatingSupply: String
    cmcId: Int
    gridAssetId: String
    bluechipRating: String
    isScam: Boolean
    name: String
    networkId: Int!
    symbol: String!
    totalSupply: String
    imageThumbHash: String
    imageThumbUrl: String
    imageSmallUrl: String
    imageLargeUrl: String
    imageBannerUrl: String
    videoExternalUrl: String
    description: String
  }

  type OrganizationUrl {
    url: String!
    type: String
  }

  type OrganizationSocial {
    url: String!
    type: String
  }

  type AssetDeployment {
    id: String!
    networkId: Int!
    address: String!
    standard: String
    assetId: String!
    rootId: String!
    token: EnhancedToken
  }

  type Asset {
    id: String!
    name: String
    description: String
    ticker: String
    type: String
    status: String
    icon: String
    rootId: String!
    assetDeployments: [AssetDeployment!]!
  }

  type Organization {
    name: String!
    foundingDate: String
    descriptionShort: String
    descriptionLong: String
    tagLine: String
    type: String
    sector: String
    urls: [OrganizationUrl!]!
    socials: [OrganizationSocial!]!
    logo: String
    icon: String
    header: String
    rootId: String!
    assets: [Asset!]!
  }

  type ExplorerTokenData {
    id: String!
    blueCheckmark: Boolean
    description: String
    divisor: String
    tokenPriceUSD: String
    tokenType: String
  }

  type Exchange {
    id: String!
    address: String!
    color: String
    name: String
    exchangeVersion: String
    iconUrl: String
    networkId: Int!
    tradeUrl: String
  }

  enum WalletCategory {
    NORMIE
    TOKEN_CREATOR
    EXCHANGE
    DEFI_EXCHANGE
    PAIR
    PAIR_TOKEN_HOLDER
    POOL_AUTHORITY
    STAKING_VAULT
    NOTORIOUS
  }

  type WalletFunding {
    fundedByAddress: String!
    fundedByLabel: String
    fundedAt: Int!
    tokenAddress: String!
    networkId: Int!
    amount: String!
    transactionHash: String!
  }

  type WalletPolymarketProfile {
    proxyWallet: String!
    xUsername: String
    displayName: String
    pseudonym: String
    profileImageUrl: String
    verifiedBadge: Boolean
    displayUsernamePublic: Boolean
    fetchedAt: Int!
  }

  type Wallet {
    address: String!
    category: WalletCategory
    firstSeenTimestamp: Int
    firstFunding: WalletFunding
    identityLabels: [String!]
    avatarUrl: String
    displayName: String
    twitterId: String
    twitterUsername: String
    telegramId: String
    telegramUsername: String
    website: String
    discordId: String
    discordUsername: String
    githubId: String
    githubUsername: String
    farcasterId: String
    farcasterUsername: String
    description: String
    ethosScore: Int
    ethosLevel: String
    ethosVerified: Boolean
    identitySource: String
    identityUpdatedAt: Int
    polymarket: WalletPolymarketProfile
    tokensCreatedCount: Int
    tokensMigratedCount: Int
  }

  type LaunchpadData {
    launchpadName: String
    graduationPercent: Float
    poolAddress: String
    completedAt: Int
    completed: Boolean
    completedSlot: Int
    migratedSlot: Int
    migratedAt: Int
    migrated: Boolean
    migratedPoolAddress: String
    launchpadProtocol: String
    launchpadIconUrl: String
    isCashbackEnabled: Boolean
    category: String
  }

  type TokenExtrema {
    id: String!
    address: String!
    networkId: Int!
    athPrice: String!
    athPriceTimestamp: Int!
    atlPrice: String!
    atlPriceTimestamp: Int!
    athFdv: String!
    athFdvTimestamp: Int!
    atlFdv: String!
    atlFdvTimestamp: Int!
    athCircMc: String!
    athCircMcTimestamp: Int!
    atlCircMc: String!
    atlCircMcTimestamp: Int!
  }

  type CoinCommunity {
    id: String!
    createdAt: Int!
    postCount: Int!
    memberCount: Int!
    likeCount: Int!
    lastPostAt: Int
  }

  type Token2022ScaledUiAmountConfig {
    authority: String
    multiplier: Float!
    newMultiplierEffectiveTimestamp: String
    newMultiplier: Float
  }

  type Token2022Extensions {
    scaledUiAmountConfig: Token2022ScaledUiAmountConfig
  }

  type B20Extensions {
    multiplier: String
    multiplierObservedAt: String
    pausedTransfer: Boolean
    pausedMint: Boolean
    pausedBurn: Boolean
    supplyCap: String
  }

  type TokenExtensions {
    token2022: Token2022Extensions
    b20: B20Extensions
  }

  type Erc7572CustomInfo {
    type: String!
    featuredImage: String
    collaborators: [String!]
  }

  enum CategoryType {
    CANONICAL
    NARRATIVE
  }

  enum CategoryStatus {
    DRAFT
    ACTIVE
    ARCHIVED
  }

  type Category {
    id: String!
    name: String!
    shortName: String
    slug: String!
    description: String
    type: CategoryType!
    status: CategoryStatus!
    parentId: String
    memberCount: Int
  }

  type EnhancedToken {
    id: String!
    address: String!
    cmcId: Int
    decimals: Int!
    isScam: Boolean
    name: String
    networkId: Int!
    symbol: String
    socialLinks: SocialLinks
    info: TokenInfo
    gridAssetId: String
    bluechipRating: String
    organization: Organization
    asset: Asset
    exchanges: [Exchange!]
    creatorAddress: String
    creator: Wallet
    createBlockNumber: Int
    createTransactionHash: String
    createdAt: Int
    mintable: String
    freezable: String
    isFreezableValid: Boolean
    isMintableValid: Boolean
    launchpad: LaunchpadData
    top10HoldersPercent: Float
    profanity: Boolean
    extrema: TokenExtrema
    coinCommunity: CoinCommunity
    extensions: TokenExtensions
    tokenStandardCustomData: Erc7572CustomInfo
    categories: [Category!]
  }

  type Balance {
    walletId: String!
    tokenId: String!
    address: String!
    networkId: Int!
    tokenAddress: String!
    balance: String!
    shiftedBalance: Float!
    uiBalance: Float
    balanceUsd: String
    tokenPriceUsd: String
    firstHeldTimestamp: Int
    updatedAtBlock: Int
    token: EnhancedToken
    liquidityUsd: String
    tokenLastTradedTimestamp: Int
    wallet: Wallet
  }

  type HoldersUpdate {
    holders: Int!
    tokenId: String!
    tokenAddress: String!
    networkId: Int!
    balances: [Balance!]!
  }
  ```
</div>

### Example

<a href="/explore" target="_blank" rel="noopener noreferrer">Test this query in the Explorer →</a>

```graphql theme={null}
subscription {
  onHoldersUpdated(
    tokenId: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2:1"
  ) {
    holders
    tokenId
    tokenAddress
    networkId
    balances {
      address
      balance
      shiftedBalance
      balanceUsd
      tokenPriceUsd
      firstHeldTimestamp
    }
  }
}
```

```json Example Response theme={null}
{
  "data": {
    "onHoldersUpdated": {
      "holders": 3208982,
      "tokenId": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2:1",
      "tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
      "networkId": 1,
      "balances": [
        {
          "address": "0x7773538f830bea99e8f6f222d019622764f0d426",
          "balance": "1638817141369641256",
          "shiftedBalance": 1.6388171413696413,
          "balanceUsd": null,
          "tokenPriceUsd": null,
          "firstHeldTimestamp": null
        }
        // ... 9 more balances
      ]
    }
  }
}
```

### Usage Guidelines

* Subscribe using `tokenId` in the format `tokenAddress:networkId`
* `holders` returns the total unique count of wallets holding the token
* `balances` array contains details for wallets whose balances changed
* Use `shiftedBalance` for human-readable token amounts (adjusted for decimals)
* `firstHeldTimestamp` shows when the wallet first acquired the token
* Updates are triggered when any holder's balance changes

### Troubleshooting Tips

<AccordionGroup>
  <Accordion title="What triggers an update?">
    Updates are sent whenever a wallet's token balance changes - through buys, sells, transfers, or any other on-chain movement of the token.
  </Accordion>

  <Accordion title="Does balances include all holders?">
    No, `balances` only includes wallets whose balances changed in the update. Use `holders` for the total count of unique holders.
  </Accordion>

  <Accordion title="What's the difference between balance and shiftedBalance?">
    `balance` is the raw token amount (including all decimals). `shiftedBalance` divides by the token's decimals for readability. For example, 1.5 ETH would have balance "1500000000000000000" and shiftedBalance 1.5.
  </Accordion>

  <Accordion title="Why might balanceUsd be null?">
    `balanceUsd` requires a valid token price. For very new tokens or those without sufficient liquidity, the USD value may not be available.
  </Accordion>
</AccordionGroup>

### Related Recipes

* [Detailed Token Page](/recipes/detailed-token-page): Build a comprehensive token detail page with price, holders, trades, and real-time updates
