query_whales
Identify large cryptocurrency wallets by filtering blockchain networks, minimum balances, and token holdings to analyze whale activity and holdings.
Instructions
List whale wallets filtered by blockchain, minimum balance, token, and activity. Returns wallet address, balance, token holdings, and last activity timestamp. Cost: $0.014 per query. Source: On-chain analytics, updated hourly.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | Filter by blockchain network | |
| min_balance_usd | No | Minimum wallet balance in USD | |
| token | No | Filter by token symbol (e.g. WETH, USDC) | |
| sort | No | Sort order (default: balance) | |
| limit | No | Maximum results (default 25) |
Implementation Reference
- src/tools/whales.ts:66-95 (handler)The handler for query_whales tool which fetches data from the API endpoint /api/v1/whales.
async ({ chain, min_balance_usd, token, sort, limit }) => { const res = await apiGet<WhaleQueryResponse>("/api/v1/whales", { chain, min_balance_usd, token, sort, limit: limit ?? 25, }); if (!res.ok) { return { content: [ { type: "text" as const, text: `API error (${res.status}): ${JSON.stringify(res.data)}`, }, ], isError: true, }; } const { count, data } = res.data; const warn = stalenessWarning(res); const summary = `${warn}Found ${count} whale wallet(s).`; const json = JSON.stringify(data, null, 2); return { content: [{ type: "text" as const, text: `${summary}\n\n${json}` }], }; }, - src/tools/whales.ts:32-65 (registration)The registration of the query_whales tool including its schema definition.
server.registerTool( "query_whales", { title: "Query Whale Wallets", description: "List whale wallets filtered by blockchain, minimum balance, token, and activity. " + "Returns wallet address, balance, token holdings, and last activity timestamp. " + "Cost: $0.014 per query. Source: On-chain analytics, updated hourly.", inputSchema: { chain: z .enum(["ethereum", "arbitrum", "polygon", "base", "bsc"]) .optional() .describe("Filter by blockchain network"), min_balance_usd: z .number() .optional() .describe("Minimum wallet balance in USD"), token: z .string() .optional() .describe("Filter by token symbol (e.g. WETH, USDC)"), sort: z .enum(["balance", "activity", "pnl"]) .optional() .describe("Sort order (default: balance)"), limit: z .number() .int() .min(1) .max(100) .optional() .describe("Maximum results (default 25)"), }, },