dex-skills v0.1.0

getTrending()

Retrieve a list of trending tokens from a supported platform. Results can be filtered by category (top gainers, highest volume, newest, or recently graduated) and limited by count. This is a read-only operation that does not require a private key.

Signature

const skill = getSkill(skills, "pumpfun");
const trending: TokenInfo[] = await skill.getTrending({
  category: "gainers",
  limit: 20,
});

Parameters

Parameter Type Description
category string Trending category. One of: "gainers", "volume", "new", "graduated". Default: "gainers"
limit number Maximum number of tokens to return. Default: 20

Return Value

Returns a Promise<TokenInfo[]> -- an array of TokenInfo objects. See the getTokenInfo() reference for the full TokenInfo type definition.

Categories

Category Description
gainers Tokens with the highest price increase over a recent period.
volume Tokens with the highest trading volume.
new Most recently created tokens.
graduated Tokens that recently graduated from the bonding curve to a DEX.

Platform Support

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

Example

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

const skills = createSkills({
  wallets: {
    solana: {
      privateKey: "your-base58-private-key",
      rpcUrl: "https://api.mainnet-beta.solana.com",
    },
  },
});

// Get top gainers on Pump.fun
const pumpfun = getSkill(skills, "pumpfun");
const gainers = await pumpfun.getTrending({
  category: "gainers",
  limit: 10,
});

for (const token of gainers) {
  console.log(`${token.symbol} -- ${token.name} (MC: $${token.marketCap})`);
}

// Get highest volume tokens on Zora
const zora = getSkill(skills, "zora");
const topVolume = await zora.getTrending({
  category: "volume",
  limit: 5,
});

console.log("Top Zora tokens by volume:");
for (const token of topVolume) {
  console.log(`  ${token.symbol}: $${token.volume24h}`);
}
Category availability
Not all categories may be available on every platform. If a platform does not support the requested category, results fall back to the default trending list.