Skip to content
Fourohtwo

Check a token for rug risk from an AI agent

Before an agent buys a token, have it call a rug check: verified source, owner powers, holder concentration and age, in one paid API call.

4 min read · updated Nov 26, 2026

Trading agents get scammed the same way people do: honeypots, owners who can mint or pause, supply held by a handful of wallets. rug-check scores a Robinhood Chain token on those risks so the agent can stop before it signs anything.

1. Call rug-check

TypeScript
import { createPayer } from "fourohtwo";

const pay = createPayer({
  privateKey: process.env.AGENT_KEY!, // a new wallet gets 5 free calls
  maxPerCallUsd: "0.05",
  maxDailyUsd: "2",
});

const res = await pay("https://fourohtwo.xyz/x/rug-check?address=0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168");
const risk = await res.json();
Response
{
  "symbol": "USDG",
  "riskScore": 27,
  "level": "medium",
  "flags": [
    { "flag": "Upgradeable proxy: code can change", "points": 15 },
    { "flag": "Top 10 holders own 58.22% of supply", "points": 12 }
  ],
  "facts": { "verified": true, "proxy": true, "holders": 442321, "top10SharePct": 58.22 }
}

2. Make it a rule

Keep the decision out of the model's hands: check the score in code before any buy.

TypeScript
if (risk.level === "high" || risk.riskScore >= 60) {
  throw new Error(`Not buying ${risk.symbol}: ${risk.flags.map((f) => f.flag).join("; ")}`);
}

3. Dig deeper when it's close

  • token-info: name, supply, decimals and whether the source is verified ($0.005)
  • token-holders: the largest holders and their share ($0.005)
  • contract-info: whether an address is a contract, a proxy, and who deployed it

APIs in this guide

Try it free

Questions

Is a low score a guarantee?
No. It means none of the checked risks were found. Agents should still cap how much they spend on any one token.
What does it cost?
$0.02 per check, nothing if the call fails, and a new wallet's first 5 calls are free.
Does it work for tokens on other chains?
rug-check covers Robinhood Chain. For other chains, search the directory for security APIs with search_apis.

More guides