"""RugMunch Intelligence API Docs — written for normal developers. No blockchain knowledge required. No crypto wallet needed. No USDC. The product is token intelligence and scam detection. The payment infrastructure (x402) is invisible backend plumbing. """ from __future__ import annotations from fastapi import APIRouter from fastapi.responses import HTMLResponse router = APIRouter(tags=["API-Docs"]) SEO_KEYWORDS = "x402 protocol, crypto intelligence API, blockchain token scanner, rug pull detection, USDC payment gateway, crypto scam detection API, web3 security API, on-chain analysis API, token risk assessment, wallet forensics API, blockchain API pay-per-call, MCP crypto tools, DeFi security API, smart contract scam detector" def _page(title: str, body: str) -> str: return f"""
Scan tokens for rug pulls. Analyze wallets for risk. Detect scams before they steal. No blockchain knowledge needed. Just an API call. Built on the x402 protocol — the open standard for pay-per-call blockchain API access with USDC settlement.
Detect honeypots, rug pulls, fake liquidity, wash trading, and social engineering in any token contract.
Score any wallet for risk, trace fund flows, identify scam connections, and detect suspicious patterns.
Real-time token prices, holder concentration, liquidity changes, and whale movement alerts.
Get webhook notifications when tokens get flagged, liquidity drops, or suspicious activity detected.
Free tier: 100 API calls free every month. No credit card required.
Pay as you go: $0.01-$0.05 per call after that. Pay with any credit card.
curl -X POST https://api.rugmunch.io/v1/token/scan \\
-H "X-API-Key: your-key" \\
-H "Content-Type: application/json" \\
-d '{"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chain": "ethereum"}'
# → {"risk_score": 12, "risk_level": "low", "liquidity_usd": 50000000}
No crypto wallet needed. No USDC. Just a credit card or free API key.
Send a POST request with your email. We'll send you a key instantly.
curl https://api.rugmunch.io/v1/auth/signup \\
-H "Content-Type: application/json" \\
-d '{"email": "you@example.com"}'
# Response: {"api_key": "rm_free_abc123...", "free_calls_remaining": 100}
Use your API key to scan any token for rug pull indicators. No payment needed for your first 100 calls.
curl https://api.rugmunch.io/v1/token/scan \\
-H "X-API-Key: rm_free_abc123" \\
-H "Content-Type: application/json" \\
-d '{"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chain": "ethereum"}'
# Response: {"risk_score": 12, "risk_level": "low", "flags": [], "liquidity_usd": 50000000}
When you run out of free calls, buy credits with a credit card or USDC on-chain. Starts at $10 for 1,000 calls. The x402 protocol settles payments automatically on Base, Solana, Ethereum, BSC, Arbitrum, Polygon, and Optimism.
curl https://api.rugmunch.io/v1/credits/buy \\
-H "X-API-Key: rm_free_abc123" \\
-H "Content-Type: application/json" \\
-d '{"amount_usd": 10, "payment_method": "card"}'
# Response: {"credits_added": 1000, "total_balance": 1000, "price_per_call": "$0.01"}
All endpoints accept JSON and return JSON. Authenticate with X-API-Key header.
| Endpoint | Method | Cost | Description |
|---|---|---|---|
| /v1/token/scan | POST | $0.02 | Full token risk analysis (honeypot, liquidity, holders) |
| /v1/token/price | GET | $0.01 | Current price + 24h change |
| /v1/token/holders | GET | $0.01 | Top holders and concentration |
| Endpoint | Method | Cost | Description |
|---|---|---|---|
| /v1/wallet/analyze | POST | $0.03 | Full wallet risk assessment |
| /v1/wallet/balance | GET | $0.01 | Wallet balance across chains |
| /v1/wallet/history | GET | $0.05 | Transaction history + patterns |
# Python — pip install requests import requests API_KEY = "rm_free_abc123" api = "https://api.rugmunch.io/v1" # Scan a token resp = requests.post(f"{api}/token/scan", headers={"X-API-Key": API_KEY}, json={"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chain": "ethereum"} ) print(resp.json()) # Check remaining credits resp = requests.get(f"{api}/credits/balance", headers={"X-API-Key": API_KEY} ) print(f"Credits remaining: {resp.json()['balance']}")
# JavaScript — fetch
const API_KEY = "rm_free_abc123";
const resp = await fetch("https://api.rugmunch.io/v1/token/scan", {
method: "POST",
headers: { "X-API-Key": API_KEY, "Content-Type": "application/json" },
body: JSON.stringify({ address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", chain: "ethereum" })
});
const data = await resp.json();
console.log(data);
"""))
@router.get("/old-docs")
async def redirect_old_docs():
"""Redirect old x402 docs to the new developer-friendly docs."""
from fastapi.responses import RedirectResponse
return RedirectResponse(url="/docs")