Skip to main content
POST
https://api.chainguardai.dev
/
v1
/
scan
/
contract
curl --request POST \
  --url https://api.chainguardai.dev/v1/scan/contract \
  --header 'Authorization: Bearer cg_live_xxxxxxxxxxxxxxxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
    "chain": "ethereum",
    "options": {
      "includeAbi": true,
      "simulateTrade": true
    }
  }'
{
  "success": true,
  "data": {
    "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
    "chain": "ethereum",
    "riskScore": 8,
    "riskLevel": "safe",
    "isHoneypot": false,
    "contractDetails": {
      "name": "TetherToken",
      "symbol": "USDT",
      "verified": true,
      "createdAt": "2017-11-28T00:00:00Z",
      "creator": "0x36928500Bc1dCd7af6a2B4008875CC336b927D57"
    },
    "tokenSecurity": {
      "buyTax": 0,
      "sellTax": 0,
      "isMintable": true,
      "canBlacklist": true,
      "canPause": true,
      "ownershipRenounced": false,
      "hiddenOwner": false
    },
    "threats": [],
    "recommendation": "SAFE"
  },
  "meta": {
    "requestId": "req_contract_abc123",
    "timestamp": "2024-01-15T14:32:00.847Z",
    "processingTime": 456
  }
}
Perform deep analysis of smart contract bytecode to detect honeypots, rug pulls, and malicious functions.

Authorization

Authorization
string
required
Bearer token. Format: Bearer cg_live_xxxxxxxx

Body Parameters

address
string
required
Contract address (42 characters, starting with 0x).Example: 0x6B175474E89094C44Da98b954EedcDC9BC55c6
chain
string
required
Blockchain network.Options: ethereum (chainId: 1), bsc (chainId: 56), polygon (chainId: 137)
options
object
Analysis configuration.

Response

address
string
Contract address analyzed
chain
string
Blockchain network
riskScore
integer
Overall risk score (0-100)
riskLevel
string
Risk classification: safe, low, medium, high, critical
isHoneypot
boolean
Whether the contract is identified as a honeypot
contractDetails
object
Contract metadata.
tokenSecurity
object
Token-specific security analysis (for ERC-20/BEP-20).
threats
array
Detected threat indicators.Possible values: honeypot, hidden_mint, blacklist_function, high_tax, rug_pull_risk, proxy_contract, unverified
recommendation
string
Action recommendation: SAFE, CAUTION, AVOID, BLOCK
curl --request POST \
  --url https://api.chainguardai.dev/v1/scan/contract \
  --header 'Authorization: Bearer cg_live_xxxxxxxxxxxxxxxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
    "chain": "ethereum",
    "options": {
      "includeAbi": true,
      "simulateTrade": true
    }
  }'
{
  "success": true,
  "data": {
    "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
    "chain": "ethereum",
    "riskScore": 8,
    "riskLevel": "safe",
    "isHoneypot": false,
    "contractDetails": {
      "name": "TetherToken",
      "symbol": "USDT",
      "verified": true,
      "createdAt": "2017-11-28T00:00:00Z",
      "creator": "0x36928500Bc1dCd7af6a2B4008875CC336b927D57"
    },
    "tokenSecurity": {
      "buyTax": 0,
      "sellTax": 0,
      "isMintable": true,
      "canBlacklist": true,
      "canPause": true,
      "ownershipRenounced": false,
      "hiddenOwner": false
    },
    "threats": [],
    "recommendation": "SAFE"
  },
  "meta": {
    "requestId": "req_contract_abc123",
    "timestamp": "2024-01-15T14:32:00.847Z",
    "processingTime": 456
  }
}