curl --request POST \
--url https://app.blockgence.com/v1/simulate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"from": "<string>",
"to": "<string>",
"chain": "ethereum",
"value": "0",
"data": "0x",
"block": 123,
"eval_mode": false
}
'import requests
url = "https://app.blockgence.com/v1/simulate"
payload = {
"from": "<string>",
"to": "<string>",
"chain": "ethereum",
"value": "0",
"data": "0x",
"block": 123,
"eval_mode": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '<string>',
to: '<string>',
chain: 'ethereum',
value: '0',
data: '0x',
block: 123,
eval_mode: false
})
};
fetch('https://app.blockgence.com/v1/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.blockgence.com/v1/simulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '<string>',
'to' => '<string>',
'chain' => 'ethereum',
'value' => '0',
'data' => '0x',
'block' => 123,
'eval_mode' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.blockgence.com/v1/simulate"
payload := strings.NewReader("{\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"chain\": \"ethereum\",\n \"value\": \"0\",\n \"data\": \"0x\",\n \"block\": 123,\n \"eval_mode\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.blockgence.com/v1/simulate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"chain\": \"ethereum\",\n \"value\": \"0\",\n \"data\": \"0x\",\n \"block\": 123,\n \"eval_mode\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"chain\": \"ethereum\",\n \"value\": \"0\",\n \"data\": \"0x\",\n \"block\": 123,\n \"eval_mode\": false\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>",
"error": "<string>"
}{
"error": "source_unavailable",
"detail": "<string>",
"source": "<string>",
"reason": "<string>",
"retryable": true,
"chain": "<string>",
"primitive": "<string>",
"operation": "<string>",
"target": "<string>",
"http_status": 123,
"retry_after": 123,
"upstream_message": "<string>",
"source_fault": true,
"failure_cause": "<string>"
}Simulate a transaction
Simulates a transaction before signing it: it executes it on the state of a fixed block, without signing or sending anything and with no gas cost. A read-only API key can use it.
Body (JSON):
chain: the network. Default:ethereum.fromandto: EVM addresses, required. Contract creation (withoutto) is not simulated.value: the native value in wei, in decimal or hexadecimal (0x…). Default:0.data: the calldata in hexadecimal, up to 128 KB.block: the simulation block. Without it, the network head minus 5 blocks. On some networks only blocks close to the head are accepted; outside that window it returns400with the limit.eval_mode: the evaluation mode ofGET /v1/contract/{chain}/{addr}. It requiresblock.
Any other field (gas, gasPrice, nonce or an EIP-7702 authorization list) returns 422.
Main response fields:
status:success,reverted(with the decoded reason inrevert) orrejected(the network rejects it before executing it, for funds or gas, with the reason inrejection.reason).call,framesandlogs: the call, the call tree and the events, decoded.movements: the balance changes per account and asset, reconciled with the state change.movements.from_changesis what the signer gains or loses.approvals: each permission it grants or revokes (erc20,erc721,operator,permit2), with the spender and its leads.delegations_7702: the accounts the transaction would leave delegated.hints: the leads of the whole simulation, each with its reason. None is a verdict: no leads does not mean the transaction is safe.evidence: the block, the source and the mode (trace, with the full tree, oreth_call, without it). Ineth_callmode,movements,approvalsanddelegations_7702arenullwith the reason innull_reason:nullmeans unknown, and[]means it was read and there is nothing.not_covered: off-chain signatures (permit, Permit2, orders), EIP-7702 authorization lists, UserOperations, block ordering and contracts that detect the simulation.
Errors: an invalid body or a future block returns 400; if the transaction cannot be simulated, 503 with no
charge.
Cost: 15 credits base. Some operations charge less when they reuse a saved result; never more.
curl --request POST \
--url https://app.blockgence.com/v1/simulate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"from": "<string>",
"to": "<string>",
"chain": "ethereum",
"value": "0",
"data": "0x",
"block": 123,
"eval_mode": false
}
'import requests
url = "https://app.blockgence.com/v1/simulate"
payload = {
"from": "<string>",
"to": "<string>",
"chain": "ethereum",
"value": "0",
"data": "0x",
"block": 123,
"eval_mode": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '<string>',
to: '<string>',
chain: 'ethereum',
value: '0',
data: '0x',
block: 123,
eval_mode: false
})
};
fetch('https://app.blockgence.com/v1/simulate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.blockgence.com/v1/simulate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'from' => '<string>',
'to' => '<string>',
'chain' => 'ethereum',
'value' => '0',
'data' => '0x',
'block' => 123,
'eval_mode' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.blockgence.com/v1/simulate"
payload := strings.NewReader("{\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"chain\": \"ethereum\",\n \"value\": \"0\",\n \"data\": \"0x\",\n \"block\": 123,\n \"eval_mode\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.blockgence.com/v1/simulate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"chain\": \"ethereum\",\n \"value\": \"0\",\n \"data\": \"0x\",\n \"block\": 123,\n \"eval_mode\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.blockgence.com/v1/simulate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": \"<string>\",\n \"to\": \"<string>\",\n \"chain\": \"ethereum\",\n \"value\": \"0\",\n \"data\": \"0x\",\n \"block\": 123,\n \"eval_mode\": false\n}"
response = http.request(request)
puts response.read_body{
"detail": "<string>",
"error": "<string>"
}{
"detail": "<string>",
"error": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"detail": "<string>",
"error": "<string>"
}{
"error": "source_unavailable",
"detail": "<string>",
"source": "<string>",
"reason": "<string>",
"retryable": true,
"chain": "<string>",
"primitive": "<string>",
"operation": "<string>",
"target": "<string>",
"http_status": 123,
"retry_after": 123,
"upstream_message": "<string>",
"source_fault": true,
"failure_cause": "<string>"
}Authorizations
Headers
Body
Una tx sin firmar. Sin gas, gasPrice, nonce ni lista de autorización 7702: el gas no se cobra y una lista de
autorización el nodo la ignora en silencio (medido el 2026-11-16), así que se rechaza en vez de simular otra cosa.
Response
The simulation result, with its movements, permissions and leads.