Skip to main content
POST
/
v2
/
hashdit
/
txn-simulation
Transaction Simulation
curl --request POST \
  --url https://service.hashdit.io/v2/hashdit/txn-simulation \
  --header 'Content-Type: <content-type>' \
  --header 'X-API-Key: <x-api-key>' \
  --data '
{
  "chain_id": "56",
  "block_height": "58083468",
  "evm_transactions": [
    {
      "from": "0xfe4e28082959fc24d602719178bFC30d853a11D8",
      "to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
      "value": "0",
      "gas_limit": "300000",
      "gas_price": "150000000",
      "data": "0x...",
      "force": true
    }
  ],
  "requested_items": {
    "balance_changes": true,
    "approve_changes": false,
    "ownership_changes": false,
    "involved_address_risks": true,
    "invocation_tree": false
  },
  "request_source": "Diting"
}
'
{
  "code": "000000000",
  "status": "OK",
  "type": "GENERAL",
  "data": {
    "involved_addresses": [
      "0xfe4e28082959fc24d602719178bfc30d853a11d8",
      "0x10ed43c718714eb63d5aa57b78b54704e256024e",
      "0x55d398326f99059ff775485246999027b3197955"
    ],
    "involved_addresses_risks": [
      {
        "address": "0x55d398326f99059ff775485246999027b3197955",
        "risk_level": 0,
        "score": 100
      },
      {
        "address": "0x51d0efe2ad6fe5c44528c8f2b3a80ab727c3a3fc",
        "risk_level": 4,
        "score": 60
      }
    ],
    "txn_summaries": [
      {
        "from": "0xfe4e28082959fc24d602719178bFC30d853a11D8",
        "to": "0x10ED43C718714eb63d5aA57B78B54704E256024E",
        "gas_used": 229454,
        "effective_gas_price": 150000000,
        "called_addresses": [
          "0x10ed43c718714eb63d5aa57b78b54704e256024e",
          "0x55d398326f99059ff775485246999027b3197955"
        ],
        "balance_changes": [
          {
            "tokenName": "Binance-Peg BSC-USD",
            "symbol": "BSC-USD",
            "token_address": "0x55d398326f99059ff775485246999027b3197955",
            "change_list": [
              {
                "address": "0xfe4e28082959fc24d602719178bfc30d853a11d8",
                "amount_change": "228.257892352717276327",
                "value_usd": "228.155861074835611704"
              }
            ]
          }
        ]
      }
    ]
  },
  "error_data": null
}

Headers

Content-Type
string
default:application/json
required

Must be set to application/json

X-API-Key
string
required

Your HashDit API key (required for production use)

Body

application/json

Transaction simulation request

chain_id
string
required

The network chain ID. See Supported Chains for a complete list of supported networks for this endpoint.

Example:

"56"

block_height
string
required

Block height used as the simulation context.

Example:

"58083468"

evm_transactions
object[]
required

List of EVM transactions to simulate.

requested_items
object
required
request_source
string

Identifier for the request source (e.g. application name).

Example:

"Diting"

Response

Successful response

code
string

API result code.

Example:

"000000000"

status
string

Request status (OK on success).

Example:

"OK"

type
string

Simulation category.

Example:

"GENERAL"

data
object
error_data
object

Error details if simulation fails.

Example:

null