> For the complete documentation index, see [llms.txt](https://docs.mito.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mito.fi/integration/holders-stakers.md).

# Holders/Stakers

This document aims to allow external developers to fetch `denom` holders and Mito LP holders/stakers at a particular height.&#x20;

### Query

#### Fetch Bank Denom Holders

This can be the particular `denom` OR the LP token that's minted when users hold LP on Mito. For example, for Ethena the `denom` is `peggy0x4c9EDD5852cd905f086C759E8383e09bff1E68B3` and the LP for the Mito vault is `factory/inj1vcqkkvqs7prqu70dpddfj7kqeqfdz5gg662qs3/lpinj1r86atmuulmhzw63pqx5tp989nmupvn4fd94m7u`.

You can also fetch at a particular height. *Remember that the public nodes do not store long historical data (up to 2 days).*

```typescript
import { ChainGrpcBankApi } from '@injectivelabs/sdk-ts'
import { getNetworkEndpoints, Network } from '@injectivelabs/networks'

const BLOCK_HEIGHT = 74264699
const endpoints = getNetworkEndpoints(Network.MainnetSentry)
const chainGrpcBankApi = new ChainGrpcBankApi(endpoints.grpc)

const denom = 'peggy0x...'

// In case you want to set a particular height
chainGrpcBankApi.setMetadata({
    "x-cosmos-block-height": BLOCK_HEIGHT,
});

const owners = await chainGrpcBankApi.fetchDenomOwners(denom, {
    limit: 10000,
})

console.log(owners)
```

#### Fetch LP Stakers

```typescript
import { ChainGrpcWasmApi } from '@injectivelabs/sdk-ts'
import { getNetworkEndpoints, Network } from '@injectivelabs/networks'

const STAKING_CONTRACT_ADDRESS = 'inj1gtze7qm07nky47n7mwgj4zatf2s77xqvh3k2n8'
const BLOCK_HEIGHT = 74264699
const LP_DENOM = 'factory/...'
const endpoints = getNetworkEndpoints(Network.MainnetSentry)
const chainGrpcWasmApi = new ChainGrpcWasmmApi(endpoints.grpc)

const denom = 'peggy0x...'

// In case you want to set a particular height
chainGrpcWasmApi.setMetadata({
    "x-cosmos-block-height": BLOCK_HEIGHT,
});

const staker = 'inj1...'

// Has to be queried for each staker individually
const response = (await api.fetchSmartContractState(
  STAKING_CONTRACT_ADDRESS,
  toBase64({
    user_stakes: {
      address: staker,
      denom: LP_DENOM,
    },
  })
)) as unknown as { data: string };
const result = fromBase64(response.data);

// Amount is stored within the `power` property of the result object
console.log({ staker, amount: result.power })
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mito.fi/integration/holders-stakers.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
