> ## Documentation Index
> Fetch the complete documentation index at: https://chainstack-docs-polygon-erigon-trace-deprecation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# runGetMethod | TON v3

> The runGetMethod endpoint allows you to execute a get method on a smart contract in the TON blockchain. Chainstack TON v3 reference.

The `runGetMethod` endpoint allows you to execute a get method on a smart contract in the TON blockchain. This is useful for retrieving data from smart contracts without modifying their state.

<Note>
  **TON billing: full (1 RU)**

  This method is always billed as full. See [Request units — TON method scope](/docs/request-units#ton-method-scope).
</Note>

## Request Body

* `address` (string, required) — The address of the smart contract to interact with.
* `method` (string, required) — The name of the get method to execute on the smart contract.
* `stack` (array, optional) — An array of stack items to pass as parameters to the method. Each item is an object with:
  * `type` (string) — The type of the stack item (e.g., "num", "cell", "slice").
  * `value` (string) — The value of the stack item.

## Response

* `exitCode` (integer) — The exit code of the method execution. 0 typically indicates success.
* `gasUsed` (integer) — The amount of gas used for the execution.
* `stack` (array) — The resulting stack after method execution. Each item is an object with:
  * `type` (string) — The type of the stack item.
  * `value` (string) — The value of the stack item.

## Use case

The `runGetMethod` endpoint is crucial for interacting with smart contracts on the TON blockchain:

1. Developers can use this to test and debug their smart contracts by calling get methods.
2. dApps can retrieve data from smart contracts to display information to users.
3. Wallets can use this to fetch account balances or other relevant data from custom contracts.
4. Analytical tools can gather data from multiple contracts to provide insights into the blockchain state.
5. Automated systems can periodically check contract states without initiating transactions.

## Example

Here's an example of how to use the `runGetMethod` endpoint:


## OpenAPI

````yaml openapi/ton_node_api/v3/runGetMethod.json POST /runGetMethod
openapi: 3.0.0
info:
  title: TON API
  version: 3.0.0
  description: API for interacting with The Open Network (TON) blockchain
servers:
  - url: >-
      https://ton-mainnet.core.chainstack.com/f2a2411bce1e54a2658f2710cd7969c3/api/v3
security: []
paths:
  /runGetMethod:
    post:
      tags:
        - SmartContract
      summary: Run Get Method
      description: Executes a get method on a smart contract in the TON blockchain
      operationId: runGetMethod
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                address:
                  type: string
                  description: The address of the smart contract
                  default: EQBSzBN6cnxDwDjn_IQXqgU8OJXUMcol9pxyL-yLkpKzYs9U
                method:
                  type: string
                  description: The name of the get method to execute
                  default: seqno
                stack:
                  type: array
                  description: The stack of parameters for the method
                  default:
                    - type: num
                      value: '0x12a'
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        description: The type of the stack item
                      value:
                        type: string
                        description: The value of the stack item
              required:
                - address
                - method
            example:
              address: EQBSzBN6cnxDwDjn_IQXqgU8OJXUMcol9pxyL-yLkpKzYs9U
              method: seqno
              stack:
                - type: num
                  value: '0x12a'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  exitCode:
                    type: integer
                    description: The exit code of the method execution
                  gasUsed:
                    type: integer
                    description: The amount of gas used for the execution
                  stack:
                    type: array
                    description: The resulting stack after method execution
                    items:
                      type: object
                      properties:
                        type:
                          type: string
                          description: The type of the stack item
                        value:
                          type: string
                          description: The value of the stack item

````