ThreatClient provides access to Webacy’s threat and risk analysis APIs. Use it to analyze addresses for security risks, screen for sanctions, check smart contract vulnerabilities, verify URL safety, assess ERC-4626 vault risk, and monitor stablecoin/RWA depeg risk.
Initialization
Resources
The ThreatClient provides access to these resources:| Resource | Description |
|---|---|
addresses | Address risk analysis, sanctions screening, poisoning detection, quick profiles |
contracts | Smart contract security analysis and code analysis |
url | URL safety and phishing detection |
wallets | Wallet activity and approval analysis |
ledger | Hardware wallet transaction scanning |
accountTrace | Fund flow tracing |
transactions | Transaction risk analysis |
scan | Transaction and EIP-712 message scanning |
batch | Batch analysis for addresses, contracts, and transactions |
vaults | ERC-4626 vault risk scoring and due diligence |
rwa | Stablecoin and RWA depeg risk monitoring |
usage | API usage statistics |
Addresses
Analyze Address Risk
Get comprehensive risk analysis for any blockchain address.| Option | Type | Description |
|---|---|---|
chain | Chain | Blockchain to analyze (optional if defaultChain set) |
modules | RiskModule[] | Specific risk modules to run |
detailed | boolean | Include detailed analysis data |
deployerRisk | boolean | Include deployer risk for contracts |
Check Sanctions
Screen an address against OFAC and other sanctions lists.Check Address Poisoning
Detect address poisoning (dust attack) attempts.Get Quick Profile
Get a lightweight risk profile with optional token approvals.| Option | Type | Description |
|---|---|---|
chain | Chain | Blockchain to analyze (ETH, BASE, BSC, POL, OPT, ARB, SOL) |
withApprovals | boolean | Include token approval data |
hideTrustFlags | boolean | Hide trust flags in response |
Contracts
Analyze Contract
Get security analysis for a smart contract.Get Contract Tax
Check buy/sell tax for a token contract.Get Code Analysis
Perform static code analysis on a contract’s source code.URL Safety
Check URL
Analyze a URL for phishing and malware.Wallets
Get Approvals
List token approvals for a wallet.Get Transactions
Get risk-scored transaction history for a wallet.Account Trace
Trace Fund Flows
Trace multi-hop fund flows for compliance and forensics.Usage
Get API Usage
Monitor your API usage and quotas.Get Max RPS
Get maximum requests per second for an organization over a time period.| Option | Type | Required | Description |
|---|---|---|---|
organization | string | Yes | Organization identifier |
from | number | Yes | Start time as Unix timestamp in milliseconds (e.g., Date.now() - 86400000) |
to | number | Yes | End time as Unix timestamp in milliseconds (e.g., Date.now()) |
Transactions
Analyze Transaction
Get risk analysis for a blockchain transaction.| Option | Type | Description |
|---|---|---|
chain | Chain | Blockchain to analyze |
hideTrustFlags | boolean | Hide trust flags in response |
Scan
Scan Transaction
Scan a raw transaction for risks before signing.Scan EIP-712 Message
Scan an EIP-712 typed data message before signing.Batch
You can analyze multiple addresses, contracts, or transactions in a single request using the batch methods.Prerequisites: You need an initialized
ThreatClient and a Chain import. See Installation if you haven’t set up the SDK yet.Batch Addresses
You can analyze multiple addresses for risk in one call.Batch Contracts
You can analyze multiple smart contracts for risk in one call.Batch Transactions
You can analyze multiple transactions for risk in one call.| Parameter | Type | Description |
|---|---|---|
addresses / transactions | string[] | List of addresses or transaction hashes to analyze |
chain | Chain | Target blockchain |
Advanced: Large Batches
When you have a large number of items to analyze, you can split them into chunks and handle partial failures gracefully.Vaults
List Vaults
Get a paginated list of ERC-4626 vaults with risk scores and ecosystem aggregates.| Option | Type | Description |
|---|---|---|
chain | Chain | Filter by chain (ETH, ARB, BASE, OPT, POL, BSC) |
tier | string | Risk tier: low, medium, high, critical, unknown |
protocol | string | DeFi protocol: morpho, aave, compound, euler, spark, fluid, beefy, yearn |
contractType | string | Vault type: erc4626_vault, strategy_vault, lending_wrapper, bridge_vault |
underlying | string | Underlying asset symbol (e.g. USDC) |
underlyingRisk | string | Underlying risk tier: battle_tested, medium_risk, high_risk, crypto, unknown |
minTvl | number | Minimum TVL in USD |
minScore | number | Minimum risk score (0-100) |
maxScore | number | Maximum risk score (0-100) |
attentionNeeded | boolean | Only vaults needing attention |
riskFlags | string | Comma-separated risk tag keys (e.g. vault-high-looping,vault-upgradeable) |
riskFlagsMode | string | Combine flags with any (OR) or all (AND) |
q | string | Search by name, symbol, or address |
sort | string | Sort: score_desc, score_asc, tvl_desc, tvl_asc, apy_desc, looping_desc, name_asc |
page | number | Page number (1-indexed, default 1) |
pageSize | number | Items per page (default 50, max 500) |
List Vaults with Cursor Pagination
For efficient sequential pagination, use cursor-based pagination.Get Vault Detail
Get detailed risk data for a specific vault, including looping markets, composition, and protocol-specific data.| Option | Type | Required | Description |
|---|---|---|---|
chain | Chain | Yes | Blockchain network |
Depeg Monitor (RWA)
List Pegged Tokens
Get a paginated list of stablecoins and RWAs with depeg risk scores and ecosystem aggregates.| Option | Type | Description |
|---|---|---|
chain | Chain | Filter by chain (ETH, ARB, POL, OPT, BASE, BSC, LINEA) |
tier | string | Risk tier: critical, warning, watch, ok |
tags | string[] | Token types (OR logic): standard, yield, rwa, gold, bridged, vault |
denomination | string | Denomination code (e.g. USD, EUR, XAU) |
minScore | number | Minimum depeg risk score (0-100) |
maxScore | number | Maximum depeg risk score (0-100) |
minMcap | number | Minimum market cap in USD |
liquidity | string | Liquidity tier: high, medium, low, very_low |
q | string | Search by symbol, name, or address |
sort | string | Sort field: score, symbol, chain, tier, abs_dev_clean, market_cap_usd, ts |
order | string | Sort direction: asc, desc |
showAll | boolean | Include excluded/problematic tokens |
collapsedOnly | boolean | Only collapsed/dead tokens (graveyard) |
page | number | Page number (1-indexed, default 1) |
pageSize | number | Items per page (default 50, max 500) |
Get Token Detail
Get detailed depeg risk for a specific pegged token, including historical time series and depeg events.| Option | Type | Required | Description |
|---|---|---|---|
chain | Chain | No | Blockchain network (auto-resolved if token exists on one chain) |
hours | number | No | Hours of history (default 24, max 168 = 7 days) |
Full Example
Next Steps
TradingClient
Holder analysis and sniper detection
Vault Risk API
Full vault risk API reference
Depeg Monitor API
Full depeg monitoring API reference
Error Handling
Handle errors gracefully
Chains
Supported blockchain networks
API Reference
Full API documentation
