agentsvc.io

Guide · token safety

Check a token for honeypots before a swap

A trading agent that buys a honeypot cannot sell it again. Check every token before the swap: our own on-chain checks read the contract, the pools and simulate a real buy and sell, on Base, Ethereum, BNB Chain, Arbitrum, Polygon, Avalanche, Optimism and Solana. The check only reads public chain data and never signs anything.

Which service

  • In a trading loop: token-precheck ($0.004 for up to 5 tokens) returns one decision per token: ALLOW, CAUTION or BLOCK, with grade, honeypot flag and the main reason. Cached for 10 minutes, so repeat checks answer in milliseconds.
  • Full report for one token: token-security ($0.009) returns grade A to F, verdict, risk_flags with severity, and the raw checks such as is_honeypot, sell_tax, is_mintable, owner_holding_pct and top10_holders_pct.

Try it free

curl -X POST https://agentsvc.io/api/v1/try/token-precheck -H "Content-Type: application/json" -d '{}'

JavaScript

npm i @x402/fetch @x402/evm viem

import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agentsvc.io/api/v1/proxy/token-precheck", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ tokens: ["0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed"], chain: "base" }),
});
console.log(await res.json());

Python

pip install "x402[httpx]" eth_account

from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client

client = x402Client()
register_exact_evm_client(client, EthAccountSigner(Account.from_key(PRIVATE_KEY)))
async with x402HttpxClient(client) as http:
    r = await http.post("https://agentsvc.io/api/v1/proxy/token-security", json={"token": "0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed", "chain": "base"})
    await r.aread()
    print(r.json())

A simple rule

  • BLOCK, grade D or F, or any honeypot finding: skip the trade.
  • CAUTION or grade C: trade smaller or ask the owner.
  • ALLOW: no known red flag right now. That is not a guarantee, so keep position limits.

A complete example that checks before every swap: x402-token-check-before-swap.

Paying

No account and no API key. Three ways to pay, all only for calls that succeed:

  • Wallet (x402): a separate wallet with a few dollars of USDC on Base, Solana, Polygon or Arbitrum. The x402 client pays the price from the 402 answer and retries; you pay no gas.
  • Credit token: buy one at /credits ($5 to $100, USDC on Base, +10% bonus) and send it as Authorization: Bearer. Good for a script that runs through a long list.
  • Zero: if your agent already uses the Zero CLI, it pays the 402 for you: zero fetch https://agentsvc.io/api/v1/proxy/token-precheck -d '{"tokens":["0x4ed4E862860beD51a9570b96d89aF5E1B0Efefed"],"chain":"base"}'

Details for every client, MCP and frameworks: docs, LangChain, Vercel AI SDK.

Claude Code, Codex or Cursor can learn this as a skill: npx skills add agentsvc/skills (source).