API Reference

Integrate Lens wallet intelligence into your app.

Base URL

https://www.trenchlens.fun

Auth

None required

Format

JSON

GET/api/scan

Scan a Solana token contract address or wallet address. Returns a full threat assessment with funding chain, bundle detection, sibling wallets, deploy history, and cluster statistics.

Query Parameters

addressrequired
string

Solana address (32-44 base58 characters). Token CA or wallet address.

apiKey
string

Optional Helius API key for faster, higher-limit scans.

Example Request

bash
curl "https://www.trenchlens.fun/api/scan?address=7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"

Response Schema

The scan endpoint returns a ScanResult object.

inputAddressstring
The address you submitted
inputType"token" | "wallet"
Detected address type
resolvedWalletstring
Deployer wallet address
threatAssessmentobject
Risk score and factors
fundingSourceobject | null
Who funded the deployer
funderIdentityobject | null
Funder identity lookup
bundleDetectionobject | null
Jito bundle analysis
siblingWalletsSiblingWallet[]
Wallets funded by the same source
deployedTokensDeployedToken[]
Tokens the deployer created
clusterStatsobject
Aggregate stats across wallet cluster
walletAgenumber | null
Deployer wallet age in days
isBlacklistedboolean
Flagged in blacklist DB
scannedAtstring
ISO 8601 timestamp of scan

Example Response

json
{
  "inputAddress": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
  "inputType": "token",
  "resolvedWallet": "B4NhDFG...k9Wz",
  "threatAssessment": {
    "score": 89,
    "level": "SERIAL_RUGGER",
    "factors": [
      { "label": "New Wallet", "points": 25, "description": "Wallet is only 2 days old" },
      { "label": "Serial Rugger", "points": 30, "description": "100% of deployed tokens are dead" },
      { "label": "Bundle Detected", "points": 20, "description": "4 same-slot buys (confirmed)" }
    ]
  },
  "fundingSource": {
    "funder": "H8UKK1...qR4M",
    "funderName": "Coinbase",
    "amount": 2.5,
    "symbol": "SOL"
  },
  "bundleDetection": {
    "isBundled": true,
    "confidence": "confirmed",
    "sameSlotBuys": 4,
    "bundleWallets": [ ... ]
  },
  "siblingWallets": [ ... ],
  "deployedTokens": [ ... ],
  "clusterStats": {
    "totalWallets": 4,
    "totalTokensDeployed": 7,
    "totalRugged": 7,
    "overallRugRate": 1.0
  }
}

Error Responses

400{ "error": "Address is required" }Missing address query param
400{ "error": "Invalid Solana address" }Address fails base58 validation
500{ "error": "Scan failed" }Upstream Helius error or timeout

Rate Limits & Tips

Default (shared key)

Uses a shared Helius free-tier key. Subject to rate limits under heavy load. Good for testing and light usage.

Custom API key

Pass apiKey param for dedicated rate limits. Get a free key at dashboard.helius.dev.

Tip: Scans take 5-15 seconds due to deep chain analysis. Cache results on your end to avoid redundant calls. Each scan makes 20-40 Helius API calls under the hood.