Security API
Simulate a transaction with risk analysis
Changed on/v4/data/security/transaction/simulate
60000 credits per API call
Simulate a transaction against live chain state before signing or broadcasting it. The simulation returns balance movements, execution steps, and a risk assessment covering drainer patterns, suspicious approvals, delegatecalls, MEV exposure, and other threat heuristics.
Input modes — provide either:
- from (plus optional to, value, data, nonce, fees) — simulate an unsigned transaction, or
- rawTx — replay a signed, already-mined transaction. The transaction is looked up on-chain, so it must exist; to replay it accurately pass blockNumber = the block before it was mined.
Requests with neither from nor rawTx return 400.
RPC — ethereum-mainnet, bsc-mainnet, polygon-mainnet, and base-mainnet have built-in RPC support. For any other supported chain, pass your own rpcUrl.
Other notes
- blockNumber and gasLimit are JSON numbers; value, nonce, and the fee fields are decimal or hex strings (values can exceed the safe JavaScript integer range).
- gasLimit defaults to 30,000,000 — lower it on chains with a smaller block gas limit (e.g. Gnosis).
- The risk summary (score, level, title, steps, warnings, risks) is returned at the top level of the response.
post/v4/data/security/transaction/simulate
Request
- Base URLhttps://api.tatum.io
- URLhttps://api.tatum.io/v4/data/security/transaction/simulate
- AuthAPI key in header x-api-key
Request body
Example request
{
"chain": "ethereum-mainnet",
"from": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
"to": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"value": "0"
}Response
OK
Example response
{
"success": true,
"score": 45,
"level": "medium",
"title": "Transaction executes 1 step(s) with 2 warning(s)",
"risks": [
{
"name": "Suspicious approvals",
"weight": 25,
"detected": true,
"description": "High-value token approvals detected"
}
],
"gas_used": 55690
}Changes
- info
endpoint added
- info