Nibiru Indexer (Heart Monitor) — User Balances
Use this skill when working with the Nibiru indexer / Heart Monitor GraphQL API for user and users queries and Token balances (account balances by address).
Quick Facts
- Indexer = Heart Monitor = GraphQL API. Endpoints (path
/query): Mainnethttps://hm-graphql.nibiru.fi/query; testnethttps://hm-graphql.itn-2.nibiru.fi/query. Env is the hostname segment for the network: mainnet has no env (hosthm-graphql.nibiru.fi); testnet uses envitn-2(hosthm-graphql.itn-2.nibiru.fi). The playground is at/graphqlon the same host. - No container: Unlike staking (
query { staking { ... } }), user and users are root-level fields onQuery. Useuser(where: { address: "nibi1..." })andusers(...)directly. where.address: Accepts Bech32 (nibi1...) or EVM hex (0x...). The resolver normalizes to the same account;user.addressin the response is always Bech32.balancesvsall_balances:balancesis the legacy{ denom, amount }list and is often empty for accounts whose funds are mostly EVM / FunToken / enriched balances. Preferall_balances: each row is a Balance withamount(string, base units) andtoken_info(TokenInfo: symbol, name, decimals,bank_denom,erc20_contract_address,type, etc.). See reference.md — User, Balance, TokenInfo.- Amount strings: Token.amount and Balance.amount are String scalars (unlike staking Ints). Parse for display using
token_info.decimalswhen present. - Pagination: Same as indexer-staking — default limit 1000, max 1000; use
limit(and for list endpoints, offset where supported) to page. See reference.md. - TS SDK: Use
HeartMonitorfrom@nibiruchain/nibijs; methodsuser()andusers()for these queries.
Canonical Usage
- Single user by address:
user(where: { address: "nibi1..." })oruser(where: { address: "0x..." })with a selection set that includesall_balanceswhen you need real balances, for example:
user(where: { address: "0x..." }) {
address
balances { denom amount }
all_balances {
amount
token_info {
type
name
symbol
bank_denom
erc20_contract_address
decimals
verified
price
logo
}
}
created_block { block }
is_blocked
}
- List users:
users(where: ..., order_by: UserOrder, order_desc: Boolean, limit: Int)with the sameall_balances/balancesshape as needed. Filter byUsersFilter(optionaladdress,created_block_eq,created_block_lte,created_block_gte); order byUserOrder(address,created_block).
Rule of Thumb: Where to Query?
| Requirement | Preferred Source | Reason |
| :--- | :--- | :--- |
| Current account balances (by address) | Indexer | Fast, indexed, GraphQL support. |
| Strict consistency or balance type not in indexer | Chain | Use nibid query bank balances <address> or chain RPC. |
| Indexer lag acceptable | Indexer | Data may be a few seconds behind the chain. |