Skip to main content
POST
/
api
/
v2
/
runGetMethod
Run get method
curl --request POST \
  --url https://toncenter.com/api/v2/runGetMethod \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "address": "<string>",
  "method": "<string>",
  "stack": [
    [
      "<string>"
    ]
  ],
  "seqno": 123
}
'
{
  "ok": true,
  "result": {
    "@type": "smc.runResult",
    "gas_used": 123,
    "stack": [
      [
        "<string>"
      ]
    ],
    "exit_code": 123,
    "block_id": {
      "@type": "ton.blockIdExt",
      "workchain": 123,
      "shard": "<string>",
      "seqno": 123,
      "root_hash": "<string>",
      "file_hash": "<string>"
    },
    "last_transaction_id": {
      "@type": "internal.transactionId",
      "lt": "<string>",
      "hash": "<string>"
    }
  },
  "@extra": "<string>"
}

Authorizations

X-API-Key
string
header
required

Body

application/json

Request to execute a smart contract get method. Specify address, method name/ID, and input stack.

address
string
required

The account address in user-friendly format.

method
required

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

stack
string · integer<int64> · object · object · object[][]
required

Input arguments or output values as a TVM stack. Each entry has a type and value.

Required array length: 2 elements
seqno
integer<int32>

Block or wallet sequence number. For blocks, this is the block height. For wallets, increment this for each outgoing transaction.

Response

OK

Response containing get method execution results.

ok
boolean
default:true
required

Indicates if the request succeeded. If false, check the error field for details.

result
object
required

The response data. Only present when ok is true.

@extra
string

Optional request ID that you can pass in the request and receive back in the response. Useful for matching async responses.