Token Holders by Program ID
Returns a list of accounts currently holding a specific Solana token (identified by its program ID/mint address), sorted by their current balance in descending order. This endpoint uses pre-aggregated data for fast, efficient holder lookups.
GET
https://api.cambrian.org/solana/tokens/holders
Parameters
program_id* (string)
The program ID (mint address) of the token.
limit (integer)
Limit the number of results.
offset (integer)
Offset the results, allows you to skip a number of rows before starting to return rows.
Responses
Code
Description
200
Successful response
Media type: application/vnd.cambrian.table.v1.0.0+json
[
{
"columns": [
{
"name": "account",
"type": "FixedString(44)"
},
{
"name": "balanceRaw",
"type": "UInt64"
},
{
"name": "balanceUi",
"type": "Float64"
},
{
"name": "balanceUSD",
"type": "Float64"
}
],
"data": [
[
"5ooCx5vKiV2ZxAEKNNHAJjAJ7BARfLUZPGvgiApZjgFD",
14200768337139,
14200768.337139,
15015018.540679738
],
[
"Ce5j11WAsSzM3nkzrw4Kw6v6ic3nbyqpv5eywjYKeKc5",
9279147186819,
9279147.186819,
9811199.207257356
],
[
"3YzoJK4pS8Urmd6PZtj16BMBVtc8eepk3MLs6LYtrArV",
8350646724836,
8350646.724836,
8829459.95761101
],
[
"BwzWKw33iBQin9E8HwFgevCeMByioZCvoZFk7uN433ft",
6027328553947,
6027328.553947,
6372926.298050964
],
[
"3qPbC7P9baPCXxz2Duqk2Qmbj21ap8pRRbRY8sfobKje",
4078280040240,
4078280.04024,
4312122.341869334
],
[
"2NUxDnrNAUuPAmzHoCS2pFsRt9u5gFhdJTAHyfhj9mwp",
3293703343107,
3293703.343107,
3482559.224271808
],
[
"6wfrMMr9BAuEXHK7u93vxTDnzWJfHSURXJeN5HYFhkKi",
3000000010001,
3000000.010001,
3172015.3940120926
],
[
"AxNLCnLxauG6gEoi5aq6efZXSdwbWmtW39YWW3ARtvoh",
2062018344538,
2062018.344538,
2180251.303268391
],
[
"5WkQBvLSvHPR2MVd3P8oPvMg7rFpvr34MgBFU6J14dkd",
1823728142681,
1823728.142681,
1928297.907930769
],
[
"5oL1EyZEMJT1PjACWgTu1P3zhg62iEqmySVb6JWtf9iL",
1777694420093,
1777694.420093,
1879624.6825287566
]
],
"rows": 10
}
]
400
Bad Request: Invalid request parameters or malformed request.
401
Unauthorized: Missing or invalid API key. Include X-API-Key header with your request.
403
Forbidden: Invalid API key or insufficient permissions to access this resource.
404
Not Found: Endpoint or resource does not exist.
408
Request Timeout: Request took too long to process. Try again.
500
Internal Server Error: An unexpected error occurred while processing your request.
503
Service Unavailable: The server is temporarily unable to handle the request. Please try again later.
Examples
1. Top Holders of the ORCA Token
This example retrieves the top 10 holders of the ORCA token by current balance, useful for quickly assessing holder concentration.
curl
curl -X GET "https://api.cambrian.org/solana/tokens/holders?program_id=orcaEKTdK7LKz57vaAYr9QeNsVEPfiu6QeMU1kektZE&limit=10" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json"
Response:
JSON
1[
2 {
3 "columns": [
4 {
5 "name": "account",
6 "type": "FixedString(44)"
7 },
8 {
9 "name": "balanceRaw",
10 "type": "UInt64"
11 },
12 {
13 "name": "balanceUi",
14 "type": "Float64"
15 },
16 {
17 "name": "balanceUSD",
18 "type": "Float64"
19 }
20 ],
21 "data": [
22 [
23 "5ooCx5vKiV2ZxAEKNNHAJjAJ7BARfLUZPGvgiApZjgFD",
24 14200768337139,
25 14200768.337139,
26 15015018.540679738
27 ],
28 [
29 "Ce5j11WAsSzM3nkzrw4Kw6v6ic3nbyqpv5eywjYKeKc5",
30 9279147186819,
31 9279147.186819,
32 9811199.207257356
33 ],
34 [
35 "3YzoJK4pS8Urmd6PZtj16BMBVtc8eepk3MLs6LYtrArV",
36 8350646724836,
37 8350646.724836,
38 8829459.95761101
39 ],
40 [
41 "BwzWKw33iBQin9E8HwFgevCeMByioZCvoZFk7uN433ft",
42 6027328553947,
43 6027328.553947,
44 6372926.298050964
45 ],
46 [
47 "3qPbC7P9baPCXxz2Duqk2Qmbj21ap8pRRbRY8sfobKje",
48 4078280040240,
49 4078280.04024,
50 4312122.341869334
51 ],
52 [
53 "2NUxDnrNAUuPAmzHoCS2pFsRt9u5gFhdJTAHyfhj9mwp",
54 3293703343107,
55 3293703.343107,
56 3482559.224271808
57 ],
58 [
59 "6wfrMMr9BAuEXHK7u93vxTDnzWJfHSURXJeN5HYFhkKi",
60 3000000010001,
61 3000000.010001,
62 3172015.3940120926
63 ],
64 [
65 "AxNLCnLxauG6gEoi5aq6efZXSdwbWmtW39YWW3ARtvoh",
66 2062018344538,
67 2062018.344538,
68 2180251.303268391
69 ],
70 [
71 "5WkQBvLSvHPR2MVd3P8oPvMg7rFpvr34MgBFU6J14dkd",
72 1823728142681,
73 1823728.142681,
74 1928297.907930769
75 ],
76 [
77 "5oL1EyZEMJT1PjACWgTu1P3zhg62iEqmySVb6JWtf9iL",
78 1777694420093,
79 1777694.420093,
80 1879624.6825287566
81 ]
82 ],
83 "rows": 10
84 }
85]
2 {
3 "columns": [
4 {
5 "name": "account",
6 "type": "FixedString(44)"
7 },
8 {
9 "name": "balanceRaw",
10 "type": "UInt64"
11 },
12 {
13 "name": "balanceUi",
14 "type": "Float64"
15 },
16 {
17 "name": "balanceUSD",
18 "type": "Float64"
19 }
20 ],
21 "data": [
22 [
23 "5ooCx5vKiV2ZxAEKNNHAJjAJ7BARfLUZPGvgiApZjgFD",
24 14200768337139,
25 14200768.337139,
26 15015018.540679738
27 ],
28 [
29 "Ce5j11WAsSzM3nkzrw4Kw6v6ic3nbyqpv5eywjYKeKc5",
30 9279147186819,
31 9279147.186819,
32 9811199.207257356
33 ],
34 [
35 "3YzoJK4pS8Urmd6PZtj16BMBVtc8eepk3MLs6LYtrArV",
36 8350646724836,
37 8350646.724836,
38 8829459.95761101
39 ],
40 [
41 "BwzWKw33iBQin9E8HwFgevCeMByioZCvoZFk7uN433ft",
42 6027328553947,
43 6027328.553947,
44 6372926.298050964
45 ],
46 [
47 "3qPbC7P9baPCXxz2Duqk2Qmbj21ap8pRRbRY8sfobKje",
48 4078280040240,
49 4078280.04024,
50 4312122.341869334
51 ],
52 [
53 "2NUxDnrNAUuPAmzHoCS2pFsRt9u5gFhdJTAHyfhj9mwp",
54 3293703343107,
55 3293703.343107,
56 3482559.224271808
57 ],
58 [
59 "6wfrMMr9BAuEXHK7u93vxTDnzWJfHSURXJeN5HYFhkKi",
60 3000000010001,
61 3000000.010001,
62 3172015.3940120926
63 ],
64 [
65 "AxNLCnLxauG6gEoi5aq6efZXSdwbWmtW39YWW3ARtvoh",
66 2062018344538,
67 2062018.344538,
68 2180251.303268391
69 ],
70 [
71 "5WkQBvLSvHPR2MVd3P8oPvMg7rFpvr34MgBFU6J14dkd",
72 1823728142681,
73 1823728.142681,
74 1928297.907930769
75 ],
76 [
77 "5oL1EyZEMJT1PjACWgTu1P3zhg62iEqmySVb6JWtf9iL",
78 1777694420093,
79 1777694.420093,
80 1879624.6825287566
81 ]
82 ],
83 "rows": 10
84 }
85]
x402 Payment Option
This endpoint supports pay-per-use access via the x402 payment protocol (v2): pay $0.05 USDC per request using blockchain micropayments. No API key required.
Quickstart (Typescript)
bash
npm install @x402/fetch @x402/evm viem
TypeScript
1import { x402Client } from "@x402/core/client";
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/solana/tokens/holders"
11);
12const data = await response.json();
2import { ExactEvmScheme } from "@x402/evm/exact/client";
3import { wrapFetchWithPayment } from "@x402/fetch";
4import { privateKeyToAccount } from "viem/accounts";
5const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
6const client = new x402Client();
7client.register("eip155:*", new ExactEvmScheme(signer));
8const fetchWithPayment = wrapFetchWithPayment(fetch, client);
9const response = await fetchWithPayment(
10 "https://x402.cambrian.org/solana/tokens/holders"
11);
12const data = await response.json();
Quickstart (Python)
bash
pip install "x402[httpx]"
Python
1import asyncio, os
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/solana/tokens/holders")
13 print(response.json())
14asyncio.run(main())
2from eth_account import Account
3from x402 import x402Client
4from x402.http.clients import x402HttpxClient
5from x402.mechanisms.evm import EthAccountSigner
6from x402.mechanisms.evm.exact.register import register_exact_evm_client
7async def main():
8 client = x402Client()
9 account = Account.from_key(os.getenv("EVM_PRIVATE_KEY"))
10 register_exact_evm_client(client, EthAccountSigner(account))
11 async with x402HttpxClient(client) as http:
12 response = await http.get("https://x402.cambrian.org/solana/tokens/holders")
13 print(response.json())
14asyncio.run(main())
Payment Flow
- Send a normal request to the endpoint (no API key needed)
- Server returns 402 Payment Required with payment details
- The x402 SDK automatically signs a payment authorization with your wallet
- The SDK resubmits the request with the signed payment
- Server verifies payment and returns the API response
The x402 SDK handles steps 2 through 5 automatically.
Network: Base (chain ID 8453) | Currency: USDC | Price: $0.05 per request