Skip to main content
POST
/
v2
/
wallet
/
emulate
cURL
curl --request POST \
  --url https://tonapi.io/v2/wallet/emulate \
  --header 'Content-Type: application/json' \
  --data '
{
  "boc": "<string>",
  "params": [
    {
      "address": "0:97146a46acc2654y27947f14c4a4b14273e954f78bc017790b41208b0043200b",
      "balance": 10000000000
    }
  ]
}
'
{
  "trace": {
    "transaction": {
      "hash": "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122",
      "lt": 25713146000001,
      "account": {
        "address": "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365",
        "is_scam": true,
        "is_wallet": true,
        "name": "Ton foundation",
        "icon": "https://ton.org/logo.png"
      },
      "success": true,
      "utime": 1645544908,
      "orig_status": "active",
      "end_status": "active",
      "total_fees": 25713146000001,
      "end_balance": 25713146000001,
      "transaction_type": "TransOrd",
      "state_update_old": "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122",
      "state_update_new": "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122",
      "out_msgs": [
        {
          "msg_type": "int_msg",
          "created_lt": 25713146000001,
          "ihr_disabled": true,
          "bounce": true,
          "bounced": true,
          "value": 60000000,
          "fwd_fee": 5681002,
          "ihr_fee": 5681002,
          "import_fee": 5681002,
          "created_at": 5681002,
          "hash": "1219de582369ac80ee1afe12147930f458a54ff1eea612611a8bc6bd31581a6c",
          "value_extra": [
            {
              "amount": "1000000000",
              "preview": {
                "id": 239,
                "symbol": "FMS",
                "decimals": 5,
                "image": "https://cache.tonapi.io/images/extra.jpg"
              }
            }
          ],
          "op_code": "0xdeadbeaf",
          "raw_body": "B5EE9C7201010101001100001D00048656C6C6F2C20776F726C64218",
          "decoded_op_name": "nft_transfer",
          "decoded_body": "<unknown>"
        }
      ],
      "block": "(-1,4234234,8000000000000000)",
      "aborted": true,
      "destroyed": true,
      "raw": "b5ee9c72410206010001380003b372cf3b5b8c891e517c9addbda1c0386a09ccacbb0e3faf630b51cfc8152325acb00002ac5795c0e41fdf79135cb7da03cc623b165d614b562a51eeccd8a5e097f405abf6b37f4e73000002ac5629732c1666887ed000144030480102030101a004008272abc8f2971aa4404ac6da1597720f348b2e1247b1ad9f55cbd3b6812f0a5f08b269bb65039fb1f6074d00f794e857f6dfd01131d299df456af10a8a4943d4d165000d0c80608840492001ab48015581f575c3b8c6ab3d6",
      "prev_trans_hash": "55e8809519cd3c49098c9ee45afdafcea7a894a74d0f628d94a115a50e045122",
      "prev_trans_lt": 25713146000001,
      "bounce_phase": "cskip_no_state"
    },
    "interfaces": [
      "wallet",
      "tep62_item"
    ],
    "children": "<array>",
    "emulated": false
  },
  "risk": {
    "transfer_all_remaining_balance": true,
    "ton": 500,
    "jettons": [
      {
        "quantity": "597968399",
        "wallet_address": {
          "address": "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365",
          "is_scam": true,
          "is_wallet": true,
          "name": "Ton foundation",
          "icon": "https://ton.org/logo.png"
        },
        "jetton": {
          "address": "0:0BB5A9F69043EEBDDA5AD2E946EB953242BD8F603FE795D90698CEEC6BFC60A0",
          "name": "Wrapped TON",
          "symbol": "WTON",
          "decimals": 9,
          "image": "https://cache.tonapi.io/images/jetton.jpg",
          "verification": "whitelist",
          "score": 123,
          "custom_payload_api_uri": "<string>",
          "description": "<string>"
        }
      }
    ],
    "nfts": [
      {
        "address": "0:E93E7D444180608B8520C00DC664383A387356FB6E16FDDF99DBE5E1415A574B",
        "index": 58,
        "verified": true,
        "metadata": {},
        "approved_by": [
          "getgems"
        ],
        "trust": "whitelist",
        "previews": [
          {
            "resolution": "100x100",
            "url": "https://site.com/pic1.jpg"
          }
        ],
        "dns": "crypto.ton",
        "include_cnft": false,
        "code_hash": "<string>",
        "data_hash": "<string>"
      }
    ],
    "total_equivalent": 123
  },
  "event": {
    "event_id": "e8b0e3fee4a26bd2317ac1f9952fcdc87dc08fdb617656b5202416323337372e",
    "account": {
      "address": "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365",
      "is_scam": true,
      "is_wallet": true,
      "name": "Ton foundation",
      "icon": "https://ton.org/logo.png"
    },
    "timestamp": 1234567890,
    "actions": [
      {
        "type": "TonTransfer",
        "status": "ok",
        "simple_preview": {
          "name": "Ton Transfer",
          "description": "Transferring 5 Ton",
          "accounts": [
            {
              "address": "0:10C1073837B93FDAAD594284CE8B8EFF7B9CF25427440EB2FC682762E1471365",
              "is_scam": true,
              "is_wallet": true,
              "name": "Ton foundation",
              "icon": "https://ton.org/logo.png"
            }
          ],
          "action_image": "<string>",
          "value": "5 Ton",
          "value_image": "<string>"
        },
        "base_transactions": [
          "e8b0e3fee4a26bd2317ac1f9952fcdc87dc08fdb617656b5202416323337372e"
        ]
      }
    ],
    "is_scam": false,
    "lt": 25713146000001,
    "in_progress": false,
    "extra": 3,
    "progress": 0.5,
    "ext_msg_hash": "a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456"
  }
}

Headers

Accept-Language
string
default:en
Example:

"ru-RU,ru;q=0.5"

Query Parameters

currency
string
Example:

"usd"

Body

application/json

bag-of-cells serialized to base64/hex and additional parameters to configure emulation

boc
string<cell>
required
params
object[]

additional per account configuration

Response

Emulated wallet message consequences

Result of emulating a wallet message on the current blockchain state: describes the expected on-chain consequences (trace, high-level AccountEvent, risk) for the signing wallet. For UI display only.

trace
object
required
risk
object
required

Conservative upper bound on assets this wallet may lose if the emulated message is sent and the counterparty behaves maliciously. Values may exceed current balances (e.g. already-authorized future receipts). For UI display only.

event
object
required

High-level view over a transaction trace caused by a single inbound message. TonAPI analyses the trace, detects known patterns and groups low-level transactions into user-facing actions (Jetton transfer, NFT purchase, etc.). Actions are a best-effort UI abstraction and may change; do not rely on them for protocol-critical logic.