Empower your users to transact with confidence
In 2022, more than $5B was lost in crypto scams. With transparent previews, Transaction Simulation ensures transactions will behave as users expect.
Simulate a transaction and know if it will revert on chain ahead of time. No more wasting unnecessary gas.
With three products, Asset Changes, Execution Simulation and Bundle Simulation, choose the type of transaction to simulate, and the format and granularity of the preview data.
Simulate any transaction with a single method. Compatible with the Alchemy SDK and available on Ethereum, Polygon, Arbitrum, Optimism and Base.
Malicious transactions are predicated on opaque smart contracts that most users don't understand. Users deserve predictability and clear previews, 100% of the time.
Other simulation methods, e.g., debug_traceCall, have limited functionality with hard-to-parse outputs. Now, simulate complex transactions and get simple results, such as why transactions will fail and revert.
What you can do
"Alchemy handled the heavy lifting for us and saved us hundreds of hours of development time. Transaction Simulation allowed us to go-to-market 4 weeks faster!"
Kartik Patel
Former Head of Protocol, OpenSea
Explore more of our developer suite
Token balances and metadata
The token data your users expect, no token list required. Available on all EVM-supported chains.
Code preview
curl --request POST \
--url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "alchemy_getTokenBalances",
"params": [
"0x95222290DD7278Aa3Ddd389Cc1E1d165CC4BAfe5",
"erc20"
]
}
'
Portfolio management, simplified
100x faster than others. One request to get all historical transaction activity, including internal transfers.
Code preview
curl --request POST \
--url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"id": 1,
"jsonrpc": "2.0",
"method": "alchemy_getAssetTransfers",
"params": [
{
"fromBlock": "0x0",
"toBlock": "latest",
"toAddress": "0x5c43B1eD97e52d009611D89b74fA829FE4ac56b1",
"withMetadata": false,
"excludeZeroValue": true,
"maxCount": "0x3e8"
}
]
}
'
Cheaper, faster, safer transactions
7.9x faster, 100% success rate. Transaction simulation, frontrunning protection, and real-time notifications.
Code preview
curl --request POST \
--url https://eth-mainnet.g.alchemy.com/v2/docs-demo \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"method": "alchemy_sendGasOptimizedTransaction"
}
'