@sperax/tool-pump-fun
v0.2.1
Published
Real-time Solana memecoin data from pump.fun — an agent tool for SperaxOS.
Maintainers
Readme
@sperax/tool-pump-fun
Real-time Solana memecoin data from pump.fun
Pump.fun is an agent tool from SperaxOS, packaged headless so you can call
it from any agent framework. It ships two things: the manifest — a JSON-Schema function
definition a model can call — and the executor that runs the call against the real API.
There is no UI layer and no framework lock-in. It works anywhere TypeScript runs.
Install
npm install @sperax/tool-pump-funUsage
Call it directly
import { pumpFunExecutor } from '@sperax/tool-pump-fun';
const result = await pumpFunExecutor.invoke('getBuyQuote', {"mint":"<mint>","solAmount":"<solAmount>"}, {
messageId: 'msg-1',
});
console.log(result.content); // prose summary written for the model to read
console.log(result.state); // typed data payload for your own UIGive it to a model
import Anthropic from '@anthropic-ai/sdk';
import { PumpFunManifest, pumpFunExecutor } from '@sperax/tool-pump-fun';
const client = new Anthropic();
const response = await client.messages.create({
model: 'claude-opus-4-8',
max_tokens: 1024,
messages: [{ role: 'user', content: 'Ask something this tool can answer' }],
tools: PumpFunManifest.api.map((api) => ({
name: api.name,
description: api.description,
input_schema: api.parameters,
})),
});
for (const block of response.content) {
if (block.type !== 'tool_use') continue;
const result = await pumpFunExecutor.invoke(block.name, block.input, { messageId: response.id });
console.log(result.content);
}PumpFunManifest.api is already in JSON-Schema form, so it maps onto any tool-calling API —
Anthropic, OpenAI, the Vercel AI SDK, or an MCP server — without translation.
Every executor returns a BuiltinToolResult — { success, content, state }. content is
prose written for the model to read; state is the typed data payload for your own code.
Executors never throw: a failed call comes back as { success: false, content: '<reason>' },
so a network blip degrades the answer instead of crashing the agent loop.
Configuration
None. This tool calls a public API directly and needs no key or origin configuration.
Tool identifier
sperax-pump-fun
API reference
getBuyQuote
Get a buy quote for a pump.fun token — estimate how many tokens you get for a given SOL amount. Uses constant-product AMM bonding curve math. Only works for non-graduated tokens.
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| mint | string | yes | Solana mint address of the pump.fun token. |
| solAmount | string | yes | SOL amount to spend (e.g. "0.5", "1.0", "0.01"). |
getSellQuote
Get a sell quote for a pump.fun token — estimate how much SOL you receive for selling a given token amount. Uses constant-product AMM bonding curve math. Only works for non-graduated tokens.
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| mint | string | yes | Solana mint address of the pump.fun token. |
| tokenAmount | string | yes | Token amount to sell (e.g. "1000", "1.5M", "500K"). |
getBondingCurveStatus
Get detailed bonding curve status for a pump.fun token — progress percentage, lifecycle stage (new/growing/graduating/graduated), virtual reserves, spot price, and pool address if graduated.
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| mint | string | yes | Solana mint address of the pump.fun token. |
getFeeTiers
Get pump.fun fee tiers showing protocol and creator fee rates at different market cap levels. Optionally pass a mint address to highlight which tier a specific token is in.
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| mint | string | no | Optional: Solana mint address to highlight the current fee tier for that token. |
getCreatorProfile
Look up a pump.fun token creator by wallet address. Shows their tokens, graduation rate, and overall profile. Useful for evaluating creator reputation.
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| limit | number | no | Number of tokens to return (default 10, max 25). |
| wallet | string | yes | Creator Solana wallet address. |
getCoinInfo
Look up a specific pump.fun token by its Solana mint address. Returns name, symbol, market cap, bonding curve status, creator, social links, ATH, reply count, and more.
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| mint | string | yes | Solana mint address of the pump.fun token (e.g. "8J69rbLTzWWgUJziFY8jeu5tDwEPBwUz4pKBMr5rpump"). |
getLatestCoins
Browse the latest or most active pump.fun coins on Solana. Returns a list sorted by last trade time, creation time, or market cap.
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| limit | number | no | Number of coins to return (default 10, max 50). |
| order | string | no | Sort order: "ASC" or "DESC" (default DESC). |
| sort | string | no | Sort field: "last_trade_timestamp" (most active, default), "created_timestamp" (newest), "market_cap" (biggest). |
getLiveStreams
Get pump.fun tokens that are currently live-streaming. These are actively promoted tokens with the most engagement.
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| limit | number | no | Number of coins to return (default 10, max 50). |
searchCoins
Search for pump.fun tokens by name or symbol. Use when the user provides a token name but not an address.
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| limit | number | no | Max number of results (default 10, max 50). |
| query | string | yes | Search query — token name or symbol (e.g. "wojak", "PEPE"). |
getGraduationAlerts
Premium x402: Get tokens closest to graduating the bonding curve. Shows bonding progress %, buy velocity, and estimated time to graduation. Paid via x402 micropayment (0.001 USDC).
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| limit | number | no | Number of alerts to return (default 10, max 25). |
| minProgress | number | no | Minimum bonding curve progress % to include (default 80). Higher = closer to graduation. |
getWhaleActivity
Premium x402: Track large wallet (whale) buy/sell activity on pump.fun tokens. Shows trade size, direction, wallet address, and transaction. Paid via x402 micropayment (0.002 USDC).
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| limit | number | no | Number of whale trades to return (default 15, max 50). |
| minSolAmount | number | no | Minimum trade size in SOL to qualify as a whale trade (default 10). |
| mint | string | no | Optional: filter to a specific token mint address. |
getSniperSignals
Premium x402: Early-stage token signals — newly created tokens with high smart money activity, rising holder counts, and strong buy pressure. Paid via x402 micropayment (0.003 USDC).
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| limit | number | no | Number of signals to return (default 10, max 25). |
| maxAgeMinutes | number | no | Maximum token age in minutes (default 5). Only tokens younger than this are included. |
| minHolders | number | no | Minimum holder count to qualify (default 3). Filters out single-holder tokens. |
Types
Shared types come from @sperax/agent-tools-core:
BuiltinToolManifest, BuiltinToolResult, BuiltinToolContext, and the BaseExecutor
class every tool executor extends.
Related
@sperax/agent-tools-core— the tool contract- All SperaxOS agent tools — tool-pump-fun is one of many
- SperaxOS — the agent workspace these tools were built for
License
Apache-2.0
