Optional pre-buy token safety gate for Base (free preview)
Hi, a practical add-on for a Base trading bot: a pre-trade token safety gate, so the bot skips honeypots and thin pools before it buys.
Free, no wallet, no key:
curl -s "https://x402-data-api.sigrunner.workers.dev/gate/swap/preview?token=weth"
# {"decision":"go|hold|block","verdict":"SAFE|CAUTION|AVOID","risk_score":..,"liquidity_usd":..,"impact_pct_of_pool":..,"flags":[..]}
Any Base ERC-20 address works on the preview, 3 checks a day per IP. For unlimited use, the same route over x402 is $0.008 per call in USDC on Base (GET /gate/swap?token=0x…&side=buy¬ional_usd=250). It runs a honeypot/sellability simulation, admin-control checks and Uniswap v3 liquidity vs your trade size.
Drop-in guard:
import requests
r = requests.get("https://x402-data-api.sigrunner.workers.dev/gate/swap/preview", params={"token": addr}).json()
if r["decision"] != "go": skip(addr, r["reason"])
Happy to wire it in with a PR if you point me at the buy function. Feel free to close if not relevant.
Closing along with #214. Paid calls from Franklin go through the BlockRun gateway and its spend controls, so we won't wire a direct-to-vendor x402 endpoint into the agent. If you want to offer the token gate to Franklin users, listing it as a partner API on the BlockRun gateway is the way in. Thanks for the suggestion.