Overview
The simulation endpoint is TxShield’s core. A single POST request runs three parallel checks against live chain state and returns a unified risk report:- Transaction Simulation — exact token and ETH deltas, tax, gas, reentrancy
- Bytecode Analysis — static analysis for kill switches, proxies, and malicious patterns
- Transaction History — activity pulse showing whether the token is alive or dead
Endpoint
POST /api/simulate/execute-simulation
Request
Headers
Body
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
targetContractAddress | string | ✅ | The token or contract address to analyze |
chainId | number | ✅ | The chain to run the simulation on. See supported chain IDs below |
Supported Chain IDs
| Chain | chainId |
|---|---|
| Ethereum | 1 |
| BNB Smart Chain | 56 |
| Base | 8453 |
| Arbitrum | 42161 |
Response
Response Fields Explained
Top Level
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the overall request succeeded |
checks | object | Container for all three analysis results |
checks.simulateResult
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the simulation itself executed successfully |
ethDelta | string | Change in ETH balance after the transaction. Negative = ETH spent |
tokenDelta | string | Change in token balance in raw units (wei-scale). Negative = tokens spent |
isProfit | boolean | Whether the user ends up with more value than they started with |
allowanceChanged | boolean | Whether the transaction modifies a token allowance |
allowanceDelta | string | The change in allowance. "Unlimited" is a red flag |
estimatedTax | string | Estimated buy/sell tax as a percentage string |
gasUsed | string | Gas consumed by the simulated transaction |
isReentrancy | boolean | Whether reentrancy patterns were detected in execution |
isHoneypot | boolean | Whether the simulation detected honeypot behaviour |
errorReason | string | Populated when success is false. Human-readable failure reason |
simulatedAt | string | ISO timestamp of when the simulation was run |
watchedTokens | string | Comma-separated list of major token addresses monitored during simulation |
watchedTokensDeltas | string | Corresponding balance deltas for each watched token |
simulation.calls | array | Full call trace of the simulated transaction |
simulation.logs | array | Event logs emitted during the simulation |
checks.byteCodeResult
| Field | Type | Description |
|---|---|---|
isContract | boolean | Whether the address is a contract or an EOA |
trustStatus | string | Overall trust verdict. One of: Safe, Low Risk, Medium Risk, High Risk, Critical Risk |
humanWarning | string | Plain-English summary of the most severe finding |
riskFlags | array | List of individual risk findings |
riskFlags[].threatLevel | string | HIGH, MEDIUM, or LOW |
riskFlags[].title | string | Short name of the detected risk |
riskFlags[].description | string | What this risk means for the user |
checks.transactionHistoryResult
| Field | Type | Description |
|---|---|---|
success | boolean | Whether the history lookup succeeded |
activityPulse | string | Human-readable activity summary: Very Active, Active, Low Activity, Dead / No Activity |
message | string | Plain-English explanation of the activity status |
recentTransfers | array | Recent transfer events for the token |
Important: Read All Three Results
The example response above is a real case — simulation passed, but bytecode flagged a Kill Switch and Hidden Logic. A user trusting onlyisHoneypot
would have traded into a Critical Risk contract.
Code Examples
Error Responses
| Status | Error | Meaning |
|---|---|---|
400 | targetContractAddress is required | Missing address in body |
400 | chainId is required | Missing chainId in body |
401 | Missing Authorization header | No API key provided |
403 | Invalid API key | Key not found or revoked |
429 | Analysis rate limit hit | Exceeded 10 req/min |
500 | Simulation failed | Internal error or RPC failure |
Honeypot Detection
Run a dedicated honeypot check with time-travel analysis.
Authentication
How to generate and use your API key.
