Read Solana Rug Risk Signals from One API Response
Check a Solana token risk score, sniper share, bundlers, insider wallets and authority flags from one API payload.
Rug risk is a bundle of signals, not one flag
To check whether a Solana token is likely a rug, call GET /tokens/{mint} and read the risk object, you get a 1-10 score plus concrete signals (snipers, bundlers, insiders, dev holding, mint/freeze authority) without parsing on-chain accounts yourself.
What you need
- A Solana Tracker API key (free) and Datastream key (Premium+, same dashboard)
- Node.js 18+
- Optional: token mint (
TOKEN_MINT); the example auto-picks a trending token if unset
Step 1: Pull the risk payload
import { Client } from '@solana-tracker/data-api';
const client = new Client({ apiKey: process.env.ST_API_KEY, baseUrl: 'https://data.solanatracker.io' });
const data = await client.getTokenInfo(MINT);
const { risk } = data;
console.log('Score:', risk?.score, '/10');
if (risk?.rugged) console.log('Token is flagged as rugged');
Step 2: Read the signals that move the score
| Signal | Field | What to watch |
|--------|-------|---------------|
| Snipers | risk.snipers.totalPercentage | Wallets that bought in the first blocks |
| Insiders | risk.insiders.totalPercentage | Linked wallets with early allocation |
| Bundlers | risk.bundlers.totalPercentage | Coordinated buy clusters |
| Dev | risk.dev.percentage | Creator wallet still holding |
| Authorities | risk.risks[] | Mint/freeze/liquidity flags |
const warn = (label: string, pct?: number) => {
if (pct == null) return;
if (pct > 15) console.warn(`${label} high: ${pct.toFixed(1)}%`);
};
warn('Snipers', risk?.snipers?.totalPercentage);
warn('Bundlers', risk?.bundlers?.totalPercentage);
Step 3: Gate trades in your bot
function passesRiskGate(risk: typeof data.risk, minScore = 6) {
if (!risk || risk.rugged) return false;
if ((risk.score ?? 0) < minScore) return false;
if ((risk.snipers?.totalPercentage ?? 0) > 20) return false;
return true;
}
Use thresholds that match your strategy, memecoin snipers accept different risk than longer holds.
FAQ
What score is "safe"?
There is no universal cutoff. Scores below 3 are generally cleaner; above 7 warrants extra scrutiny. Combine the score with liquidity, holder count, and your own rules.
Is this the same as Rugcheck on Solana Tracker?
The same risk data powers Rugcheck. This guide shows the API path for programmatic checks.
Can I filter tokens by risk in search?
Yes, searchTokens() accepts minRiskScore / maxRiskScore filters.
Related: Token screener API -> · Solana Data API
Download the example
Clone the full runnable project on GitHub, npm install && npm start with your keys in .env. Or open it in StackBlitz to run in your browser (free). See the tutorial for step-by-step context.
Runnable Node.js project — clone from GitHub, add keys to .env, then npm start. StackBlitz runs REST and Datastream examples in your browser for free.