dex-skills v0.1.0

getHolders()

Retrieve a list of token holders for a specific token. Returns holder addresses, balances, and optional percentage ownership. This is a read-only operation that does not require a private key. Currently only supported on Zora.

Signature

const skill = getSkill(skills, "zora");
const holders: HolderInfo[] = await skill.getHolders("0xTokenAddress...", {
  limit: 50,
});

Parameters

Parameter Type Description
tokenAddress * string The address of the token to query holders for.
limit number Maximum number of holders to return. Default: 50

Return Value

Returns a Promise<HolderInfo[]>. See the Types reference for the full HolderInfo definition.

Platform Support

Platform Supported
Pump.fun No
LetsBonk No
Moonshot No
Zora Yes
Clanker No
Four.meme No
SunPump No

Example

get-holders.ts
import { createSkills, getSkill } from "dex-skills";

const skills = createSkills({
  wallets: {
    base: {
      privateKey: "0x-prefixed-hex-private-key",
      rpcUrl: "https://mainnet.base.org",
    },
  },
});

// Get top holders for a Zora token
const zora = getSkill(skills, "zora");
const holders = await zora.getHolders("0xTokenContractAddress...", {
  limit: 20,
});

for (const holder of holders) {
  console.log(`Address: ${holder.address}`);
  console.log(`  Balance: ${holder.balance}`);
  if (holder.percentage !== undefined) {
    console.log(`  Ownership: ${holder.percentage}%`);
  }
}
Zora only
getHolders() is currently only supported on the Zora platform. Calling this method on other platforms will throw an error indicating the method is not available.