Skip to content

Commit 609f62d

Browse files
Add token holders query to Solana transfers documentation
1 parent b6b649f commit 609f62d

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

docs/Examples/Solana/transfers.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ keywords:
99
- Solana transaction monitoring
1010
- Solana transfer history
1111
- Solana balance tracking
12+
- Solana token holders
1213
- Solana transfer analytics
1314
- Solana transfer data
1415
- Solana transfer queries
@@ -362,6 +363,38 @@ query ($address: String!, $date: ISO8601DateTime!) {
362363
}
363364
```
364365

366+
## Token holders
367+
368+
This query returns all holders of a specific token with their balances. It aggregates transfers by receiver (holder) for the given token: each row is a wallet address that holds the token, with total received (`sum_in`), total sent (`sum_out`), and current balance (`sum_in - sum_out`). Results are sorted by balance descending and limited to the top 10,000 holders. Use `date: { since: "..." }` to compute balances from a given date onward.
369+
370+
You can run the query [here](https://ide.bitquery.io/solana-holders_1).
371+
372+
```
373+
{
374+
solana(network: solana) {
375+
transfers(
376+
date: { since: "2026-02-19" }
377+
currency: { is: "943YczGfS95e1ZnUSMd5DPQrGXaKBS2zGR76htycpump" }
378+
options: { limit: 10000, desc: "balance" }
379+
) {
380+
sum_in: amount(calculate: sum)
381+
sum_out: amount(calculate: sum)
382+
balance: expression(get: "sum_in - sum_out")
383+
count_in: countBigInt
384+
count_out: countBigInt
385+
currency {
386+
address
387+
symbol
388+
tokenType
389+
}
390+
receiver {
391+
address
392+
}
393+
}
394+
}
395+
}
396+
```
397+
365398
## Token Transfers to a Specific Wallet (for Bubble Map)
366399

367400
This query retrieves all incoming transfers of a specific token (e.g., USDT) to a given Solana wallet on a particular date. It includes sender and receiver details, transaction signatures, block data, and transfer amounts in USD — useful for visualizing wallet inflows using a Bubble Map.

0 commit comments

Comments
 (0)