> ## Documentation Index
> Fetch the complete documentation index at: https://ti-mm-mycompc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Detect Solana honeypot tokens before agents trade

> Return supply, freeze and mint authorities, a honeypot risk score, and the top 10 holders so agents can auto-reject risky mints before swapping.

Every agent that trades Solana meme tokens eventually buys a honeypot. This endpoint returns everything you need to reject that trade before it happens: freeze authority, mint authority, supply, top 10 holder concentration, and a pre-computed `riskLevel`. One call, one decision, one saved bag.

<Note>
  Paid endpoint. Pass your key in the `x-api-key` header. See [Get an API key](/guides/claim-api-key).
</Note>

## Why agents use this

* **Freeze authority = they can seize your tokens.** If it's set, you're one signature away from being locked out. Auto-reject.
* **Mint authority = infinite dilution risk.** Legit tokens renounce it. Meme rug tokens keep it.
* **Top 10 concentration.** If the top 10 wallets hold 90%, that's a dump waiting to happen.
* **Pre-computed `riskLevel` for lazy checks.** Agents can just gate on `security.riskLevel === "LOW"` and move on.

## Use cases

* **Auto-reject rugs in a Jupiter swap flow.** Before executing any quote, call `token-profile` on the output mint and abort if `riskLevel: HIGH`.
* **Telegram rug detector bot.** Cron this against every token users report holding. DM them the moment freeze authority is added or top-holder concentration spikes.
* **Concentration risk score in a portfolio dashboard.** Show users a red/yellow/green badge per holding based on the top 10 holder %.
* **"Should I ape?" MCP tool.** Wire this into Claude Desktop so users typing "check this contract" get a real answer instead of a hallucinated one.
* **Snapshot audit trail.** Log every mint's profile at trade time so you have proof of what looked safe when your bot bought.

## Recipe: gate every Jupiter swap on token safety

```typescript safe-swap.ts theme={null}
const API_KEY = process.env.API_KEY!;
const GATEWAY = "https://solana-pulse-gateway-1021990235790.us-central1.run.app";

async function safeSwap(inputMint: string, outputMint: string, amount: number) {
  const profile = await fetch(
    `${GATEWAY}/api/solana/token-profile?mint=${outputMint}`,
    { headers: { "x-api-key": API_KEY } },
  ).then((r) => r.json());

  if (profile.security.riskLevel === "HIGH") {
    throw new Error(
      `Rejected: ${outputMint} flagged as HIGH risk. ${profile.security.analysis}`,
    );
  }

  const topHolder = parseFloat(profile.topHolders[0].amount_formatted);
  const totalSupply = parseFloat(profile.supply_formatted);
  const topPct = (topHolder / totalSupply) * 100;
  if (topPct > 25) {
    throw new Error(`Rejected: top holder owns ${topPct.toFixed(1)}% of supply`);
  }

  // Safe to proceed with Jupiter swap...
  return { inputMint, outputMint, amount, safe: true };
}
```

<Warning>
  A `LOW` risk score is not a guarantee. Freeze/mint authority checks catch the obvious traps but sophisticated rugs use launched-then-abandoned patterns. Combine with liquidity and holder-history checks for real safety.
</Warning>
