API Reference
SweepGuard provides a REST API for programmatic access to scanning, recovery, and monitoring features.
Base URL
https://sweeptsguard.vercel.app/api
Authentication
API keys are required for production use. Get yours at /api-docs.
Authorization: Bearer YOURAPIKEY
Endpoints
Scan Wallet
Scan a wallet address for assets across all chains.
POST /api/scan
Content-Type: application/json{
"address": "0x...",
"chains": ["1", "137", "42161"] // optional, defaults to all
}
Response:
{
"ok": true,
"address": "0x...",
"assets": {
"native": [
{ "chain": "1", "symbol": "ETH", "balance": "1.5", "value": 5000 }
],
"erc20": [
{ "chain": "1", "symbol": "USDC", "balance": "1000", "contract": "0x..." }
],
"nfts": [
{ "chain": "1", "collection": "CryptoPunks", "tokenId": "1234" }
]
}
}
Recover Funds
Initiate a recovery operation.
POST /api/recover
Content-Type: application/json{
"compromisedAddress": "0x...",
"safeAddress": "0x...",
"method": "flashbots", // "flashbots"
"eip7702" "auto-sweep"
"assets": ["all"] // or specific asset addresses
}
Response:
{
"ok": true,
"recoveryId": "recabc123",
"status": "pending",
"estimatedGas": "0.005 ETH",
"assetsToRecover": 5
}
Monitor Address
Start monitoring an address for changes.
POST /api/monitor
Content-Type: application/json{
"address": "0x...",
"chain": "1",
"webhookUrl": "https://your-app.com/webhook", // optional
"alertTypes": ["balancechange", "incoming_transfer"]
}
Gas Estimation
Get current gas prices across chains.
GET /api/gas?chains=1,137,42161
Honeypot Check
Check if a token is a honeypot.
POST /api/honeypot
Content-Type: application/json{
"address": "0x...",
"chain": "1"
}
Scam Check
Check an address against known scam databases.
POST /api/scam-check
Content-Type: application/json{
"address": "0x..."
}
Rate Limits
- Free tier: 100 requests/hour
- Pro tier: 10,000 requests/hour
- Enterprise: Custom limits
Error Codes
Code Description 400 Invalid request parameters
401 Missing or invalid API key
403 Rate limit exceeded
404 Resource not found
500 Internal server error
SDKs
JavaScript/TypeScript: npm install @sweeptsguard/sdk
Python: pip install sweeptsguard
Go: go get github.com/sweeptsguard/go-sdk Full API Documentation
Visit /api-docs for interactive API documentation with request/response examples.