POSTRun get method

TON Mainnethttps://ton-mainnet.nodit.io/api/v2/runGetMethod
CU60

Executes a read-only method on a smart contract. Get methods query contract state without sending a transaction. Common methods include seqno (wallet sequence number), get_wallet_data (wallet info), and get_jetton_data (token info). Method arguments are provided in the stack array.

Request Body
addressstringrequired

Account address in raw format (e.g., 0:ca6e321c...) or user-friendly format (e.g., EQDKbjIcfM...). All formats are automatically detected.

methodstringrequired

The get method name (e.g., "seqno", "get_wallet_data") or its numeric ID.

stackoneOf[][]required

Input arguments as a TVM stack. Each entry is a two-element array: [type, value] where type is "num" (decimal string), "cell" (base64 BoC), or "slice" (base64 BoC).

seqnointeger (int32)

Masterchain block sequence number. Run the get method against the contract state at this specific block height. If omitted, uses the current state.

Responses
okbooleanrequired

Returns true if the request succeeded; otherwise false. See the error field for details.

@typestring (enum)required

TonLib type identifier for get method execution results. Refer to the TonLib type reference for a full list.

gas_usedinteger (int64)required

Gas consumed during execution. Useful for cost estimation.

stackoneOf[][]required

Output values as a TVM stack. Each entry is a two-element array: [type, value] where type is "num" (decimal string), "cell" (base64 BoC), or "slice" (base64 BoC).

exit_codeinteger (int32)required

TVM exit code. 0 or 1 means success; other values indicate errors. Refer to the TVM exit code reference for all values.

block_idobjectrequired

Block at which the get method was executed.

@typestring (enum)required

TonLib type identifier for full block identifiers. Refer to the TonLib type reference for a full list.

workchainintegerrequired

Workchain ID: -1 for masterchain, 0 for basechain.

shardstringrequired

Shard identifier as a signed 64-bit integer string. Masterchain uses -9223372036854775808.

seqnointegerrequired

Block sequence number within its workchain and shard. For the masterchain (workchain -1), this equals the global block height. For basechain shards (workchain 0), this is the sequence number local to that specific shard, not a global height.

root_hashstringrequired

Root hash of the block. Together with file_hash, uniquely identifies a block.

file_hashstringrequired

Hash of the serialized block file. Together with root_hash, uniquely identifies a block.

last_transaction_idobjectrequired

Most recent transaction at the time of execution.

@typestring (enum)required

TonLib type identifier for transaction ID references. Refer to the TonLib type reference for a full list.

ltstringrequired

Logical time of the transaction. Use together with its hash for pagination and lookups.

hashstringrequired

SHA-256 hash of this transaction, encoded in base64.

@extrastring

Optional request ID that can be passed in the request and received back in the response. Useful for matching async responses.

X-API-KEY
Request
cURL
curl -X POST "https://ton-mainnet.nodit.io/api/v2/runGetMethod" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs",
    "method": "get_jetton_data",
    "stack": []
  }'
Response
Example · 200
{
  "ok": true,
  "result": {
    "@type": "smc.runResult",
    "gas_used": 5679,
    "stack": [
      [
        "num",
        "0x5148e3baabcb0"
      ],
      [
        "num",
        "-0x1"
      ]
    ],
    "exit_code": 0,
    "block_id": {
      "@type": "ton.blockIdExt",
      "workchain": -1,
      "shard": "-9223372036854775808",
      "seqno": 107892927,
      "root_hash": "+1bbGYZppNuJSoyMCZ0yKFExK3cgt9bwbnXC1/Vo1sQ=",
      "file_hash": "UEuAUwi9zcLNEk7W4DcUAP6L69kIUjvtTBBfy9FftdE="
    },
    "last_transaction_id": {
      "@type": "internal.transactionId",
      "lt": "119172099000039",
      "hash": "HgqsBts+Mu9CooDaG32CZiu6ZPZHp3umkCsOQBIoA44="
    }
  },
  "@extra": "1795684398:8:22.053"
}