> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ton.org/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.ton.org/feedback

```json
{
  "path": "/ecosystem/api/toncenter/v2/run-method/run-get-method-standard",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Run get method (standard)

> Executes a read-only method on a smart contract using typed stack entries. Input and output stack entries use explicit types (`TvmStackEntryNumber`, `TvmStackEntryCell`, etc.) for structured input/output handling. Common methods: `seqno` (wallet sequence number), `get_wallet_data` (wallet info), `get_jetton_data` (token info).



## OpenAPI

````yaml post /api/v2/runGetMethodStd
openapi: 3.1.1
info:
  title: TON HTTP API C++
  description: >
    This API enables HTTP access to TON blockchain - getting accounts and
    wallets information, looking up blocks and transactions, sending messages to
    the blockchain, calling get methods of smart contracts, and more.


    In addition to REST API, all methods are available through a JSON-RPC
    endpoint  with `method` equal to method name and `params` passed as a
    dictionary.


    The response contains a JSON object, which always has a boolean field `ok`
    and either `error` or `result`. If `ok` equals true, the request was
    successful and the result of the query can be found in the `result` field.
    In case of an unsuccessful request, `ok` equals false and the error is
    explained in the `error`.


    API Key should be sent either as `api_key` query parameter or `X-API-Key`
    header
  version: 2.1.1
servers:
  - url: https://toncenter.com
    description: TON Mainnet
  - url: https://testnet.toncenter.com
    description: TON Testnet
security: []
tags:
  - name: Accounts
    description: Information about accounts
  - name: Transactions
    description: Fetching and locating transactions
  - name: Blocks
    description: Information about blocks
  - name: Run method
    description: Run get-method of smart contracts
  - name: Send
    description: Send data to blockchain
  - name: Utils
    description: Some useful methods
  - name: Configuration
    description: Information about blockchain config
  - name: RPC
    description: JSON-RPC and POST endpoints
paths:
  /api/v2/runGetMethodStd:
    post:
      tags:
        - Run method
      summary: Run get method (standard)
      description: >-
        Executes a read-only method on a smart contract using typed stack
        entries. Input and output stack entries use explicit types
        (`TvmStackEntryNumber`, `TvmStackEntryCell`, etc.) for structured
        input/output handling. Common methods: `seqno` (wallet sequence number),
        `get_wallet_data` (wallet info), `get_jetton_data` (token info).
      operationId: runGetMethodStd_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunGetMethodStdRequest'
        required: true
      responses:
        '200':
          description: Returns the get method result in standardized stack format.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RunGetMethodStdResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
        '422':
          $ref: '#/components/responses/422_run'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500_execution'
        '504':
          $ref: '#/components/responses/504'
        '542':
          $ref: '#/components/responses/542'
      security:
        - APIKeyHeader: []
        - APIKeyQuery: []
components:
  schemas:
    RunGetMethodStdRequest:
      type: object
      additionalProperties: false
      required:
        - address
        - method
        - stack
      properties:
        address:
          $ref: '#/components/schemas/TonAddr'
        method:
          oneOf:
            - type: string
            - type: integer
              format: int32
          description: >-
            The get method name (e.g., "`seqno`", "get_wallet_data") or its
            numeric ID.
        stack:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/TvmStackEntrySlice'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryCell'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryNumber'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryTuple'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryList'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryUnsupported'
                x-usrv-cpp-indirect: true
            discriminator:
              propertyName: '@type'
              mapping:
                tvm.stackEntrySlice:
                  $ref: '#/components/schemas/TvmStackEntrySlice'
                tvm.stackEntryCell:
                  $ref: '#/components/schemas/TvmStackEntryCell'
                tvm.stackEntryNumber:
                  $ref: '#/components/schemas/TvmStackEntryNumber'
                tvm.stackEntryTuple:
                  $ref: '#/components/schemas/TvmStackEntryTuple'
                tvm.stackEntryList:
                  $ref: '#/components/schemas/TvmStackEntryList'
                tvm.stackEntryUnsupported:
                  $ref: '#/components/schemas/TvmStackEntryUnsupported'
          description: >-
            Input arguments as a TVM stack. Each entry is a typed object with
            `@type` discriminator: `tvm.stackEntryNumber` (decimal string),
            `tvm.stackEntryCell` (base64 BoC), `tvm.stackEntrySlice` (base64
            BoC), `tvm.stackEntryTuple`, or `tvm.stackEntryList`.
        seqno:
          type: integer
          description: >-
            Masterchain block sequence number. Run the get method against the
            contract state at this specific block height. If omitted, uses the
            current state.
    RunGetMethodStdResponse:
      type: object
      additionalProperties: false
      required:
        - ok
        - result
      properties:
        ok:
          type: boolean
          default: true
          description: >-
            Returns `true` if the request succeeded; otherwise `false`. See the
            `error` field for details.
        result:
          $ref: '#/components/schemas/RunGetMethodStdResult'
          description: Response data. Present only when `ok` is `true`.
        '@extra':
          type: string
          description: >-
            Optional request ID that can be passed in the request and received
            back in the response. Useful for matching async responses.
    TonAddr:
      type: string
      x-usrv-cpp-type: ton_http::types::ton_addr
      description: >-
        Account address in [raw](/foundations/addresses/formats#raw-format)
        format (e.g., `0:ca6e321c...`) or
        [user-friendly](/foundations/addresses/formats#user-friendly-format)
        format (e.g., `EQDKbjIcfM...`). All formats are automatically detected.
    TvmStackEntrySlice:
      type: object
      additionalProperties: false
      required:
        - '@type'
        - slice
      properties:
        '@type':
          type: string
          enum:
            - tvm.stackEntrySlice
          default: tvm.stackEntrySlice
          description: >-
            TonLib type identifier for slice-typed stack entries. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        slice:
          $ref: '#/components/schemas/TvmSlice'
          description: The TVM slice value.
    TvmStackEntryCell:
      type: object
      additionalProperties: false
      required:
        - '@type'
        - cell
      properties:
        '@type':
          type: string
          enum:
            - tvm.stackEntryCell
          default: tvm.stackEntryCell
          description: >-
            TonLib type identifier for cell-typed stack entries. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        cell:
          $ref: '#/components/schemas/TvmCell'
          description: The TVM cell value.
    TvmStackEntryNumber:
      type: object
      additionalProperties: false
      required:
        - '@type'
        - number
      properties:
        '@type':
          type: string
          enum:
            - tvm.stackEntryNumber
          default: tvm.stackEntryNumber
          description: >-
            TonLib type identifier for number-typed stack entries. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        number:
          $ref: '#/components/schemas/TvmNumberDecimal'
          description: The TVM number value (arbitrary-precision decimal).
    TvmStackEntryTuple:
      type: object
      additionalProperties: false
      required:
        - '@type'
        - tuple
      properties:
        '@type':
          type: string
          enum:
            - tvm.stackEntryTuple
          default: tvm.stackEntryTuple
          description: >-
            TonLib type identifier for tuple-typed stack entries. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        tuple:
          $ref: '#/components/schemas/TvmTuple'
          description: The TVM tuple value.
    TvmStackEntryList:
      type: object
      additionalProperties: false
      required:
        - '@type'
        - list
      properties:
        '@type':
          type: string
          enum:
            - tvm.stackEntryList
          default: tvm.stackEntryList
          description: >-
            TonLib type identifier for list-typed stack entries. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        list:
          $ref: '#/components/schemas/TvmList'
          description: The TVM list value.
    TvmStackEntryUnsupported:
      type: object
      additionalProperties: false
      required:
        - '@type'
      properties:
        '@type':
          type: string
          enum:
            - tvm.stackEntryUnsupported
          default: tvm.stackEntryUnsupported
          description: >-
            TonLib type identifier for stack entries with unsupported types.
            Refer to the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
    RunGetMethodStdResult:
      type: object
      additionalProperties: false
      required:
        - '@type'
        - gas_used
        - stack
        - exit_code
      properties:
        '@type':
          type: string
          enum:
            - smc.runResult
          default: smc.runResult
          description: >-
            TonLib type identifier for standardized get method execution
            results. Refer to the [TonLib type
            reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        gas_used:
          type: integer
          format: int64
          description: Gas consumed during execution. Useful for cost estimation.
        stack:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/TvmStackEntrySlice'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryCell'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryNumber'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryTuple'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryList'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryUnsupported'
                x-usrv-cpp-indirect: true
            discriminator:
              propertyName: '@type'
              mapping:
                tvm.stackEntrySlice:
                  $ref: '#/components/schemas/TvmStackEntrySlice'
                tvm.stackEntryCell:
                  $ref: '#/components/schemas/TvmStackEntryCell'
                tvm.stackEntryNumber:
                  $ref: '#/components/schemas/TvmStackEntryNumber'
                tvm.stackEntryTuple:
                  $ref: '#/components/schemas/TvmStackEntryTuple'
                tvm.stackEntryList:
                  $ref: '#/components/schemas/TvmStackEntryList'
                tvm.stackEntryUnsupported:
                  $ref: '#/components/schemas/TvmStackEntryUnsupported'
          description: >-
            Output values as a TVM stack. Each entry is a typed object with
            `@type` discriminator: `tvm.stackEntryNumber` (decimal string),
            `tvm.stackEntryCell` (base64 BoC), `tvm.stackEntrySlice` (base64
            BoC), `tvm.stackEntryTuple`, or `tvm.stackEntryList`.
        exit_code:
          type: integer
          format: int32
          description: >-
            TVM exit code. `0` or `1` means success; other values indicate
            errors. Refer to the [TVM exit code
            reference](/tvm/exit-codes#exit-codes) for all values.
      description: >-
        Result of executing a smart contract get method. Contains the TVM exit
        code (0 or 1 means success), gas consumed, and the output stack with
        typed return values.
    TvmSlice:
      type: object
      additionalProperties: false
      required:
        - '@type'
        - bytes
      properties:
        '@type':
          type: string
          enum:
            - tvm.slice
          default: tvm.slice
          description: >-
            TonLib type identifier for TVM slice values. Refer to the [TonLib
            type reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        bytes:
          $ref: '#/components/schemas/Bytes'
          description: TVM slice data serialized as base64.
    TvmCell:
      type: object
      additionalProperties: false
      required:
        - '@type'
        - bytes
      properties:
        '@type':
          type: string
          enum:
            - tvm.cell
          default: tvm.cell
          description: >-
            TonLib type identifier for TVM cell values. Refer to the [TonLib
            type reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        bytes:
          $ref: '#/components/schemas/Bytes'
          description: TVM cell data serialized as base64.
    TvmNumberDecimal:
      type: object
      additionalProperties: false
      required:
        - '@type'
        - number
      properties:
        '@type':
          type: string
          enum:
            - tvm.numberDecimal
          default: tvm.numberDecimal
          description: >-
            TonLib type identifier for TVM decimal number values. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        number:
          $ref: '#/components/schemas/Int256'
          description: >-
            Integer value as a decimal string (supports arbitrarily large
            numbers).
    TvmTuple:
      type: object
      additionalProperties: false
      required:
        - '@type'
        - elements
      properties:
        '@type':
          type: string
          enum:
            - tvm.tuple
          default: tvm.tuple
          description: >-
            TonLib type identifier for TVM tuple structures. Refer to the
            [TonLib type reference](/ecosystem/api/toncenter/v2-tonlib-types)
            for a full list.
        elements:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/TvmStackEntrySlice'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryCell'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryNumber'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryTuple'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryList'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryUnsupported'
                x-usrv-cpp-indirect: true
            discriminator:
              propertyName: '@type'
              mapping:
                tvm.stackEntrySlice:
                  $ref: '#/components/schemas/TvmStackEntrySlice'
                tvm.stackEntryCell:
                  $ref: '#/components/schemas/TvmStackEntryCell'
                tvm.stackEntryNumber:
                  $ref: '#/components/schemas/TvmStackEntryNumber'
                tvm.stackEntryTuple:
                  $ref: '#/components/schemas/TvmStackEntryTuple'
                tvm.stackEntryList:
                  $ref: '#/components/schemas/TvmStackEntryList'
                tvm.stackEntryUnsupported:
                  $ref: '#/components/schemas/TvmStackEntryUnsupported'
          description: >-
            Ordered tuple of TVM stack entries. Each element is a typed object
            with `@type` discriminator (`tvm.stackEntryNumber`,
            `tvm.stackEntryCell`, `tvm.stackEntrySlice`, `tvm.stackEntryTuple`,
            or `tvm.stackEntryList`).
    TvmList:
      type: object
      additionalProperties: false
      required:
        - '@type'
        - elements
      properties:
        '@type':
          type: string
          enum:
            - tvm.list
          default: tvm.list
          description: >-
            TonLib type identifier for TVM list structures. Refer to the [TonLib
            type reference](/ecosystem/api/toncenter/v2-tonlib-types) for a full
            list.
        elements:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/TvmStackEntrySlice'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryCell'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryNumber'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryTuple'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryList'
                x-usrv-cpp-indirect: true
              - $ref: '#/components/schemas/TvmStackEntryUnsupported'
                x-usrv-cpp-indirect: true
            discriminator:
              propertyName: '@type'
              mapping:
                tvm.stackEntrySlice:
                  $ref: '#/components/schemas/TvmStackEntrySlice'
                tvm.stackEntryCell:
                  $ref: '#/components/schemas/TvmStackEntryCell'
                tvm.stackEntryNumber:
                  $ref: '#/components/schemas/TvmStackEntryNumber'
                tvm.stackEntryTuple:
                  $ref: '#/components/schemas/TvmStackEntryTuple'
                tvm.stackEntryList:
                  $ref: '#/components/schemas/TvmStackEntryList'
                tvm.stackEntryUnsupported:
                  $ref: '#/components/schemas/TvmStackEntryUnsupported'
          description: >-
            Ordered list of TVM stack entries. Each element is a typed object
            with `@type` discriminator (`tvm.stackEntryNumber`,
            `tvm.stackEntryCell`, `tvm.stackEntrySlice`, `tvm.stackEntryTuple`,
            or `tvm.stackEntryList`).
    Bytes:
      type: string
      x-usrv-cpp-type: ton_http::types::bytes
      description: >-
        Binary data encoded as base64. Used for serialized cells (BoC format),
        message bodies, and smart contract code/data.
    Int256:
      type: string
      x-usrv-cpp-type: ton_http::types::int256
      description: >-
        A large integer represented as a string to avoid precision loss. Used
        for balances and other values that may exceed JavaScript's safe integer
        limit.
  responses:
    '401':
      description: API key does not exist. Check for typos or generate a new key.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 401
                description: HTTP status code `401`.
              error:
                type: string
                enum:
                  - API key does not exist
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 401
            error: API key does not exist
    '403':
      description: >-
        API key is not allowed for this network (e.g. testnet key used on
        mainnet).
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 403
                description: HTTP status code `403`.
              error:
                type: string
                enum:
                  - Network not allowed
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 403
            error: Network not allowed
    '429':
      description: >-
        Rate limit exceeded. Back off and retry, or use an API key for higher
        limits.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 429
                description: HTTP status code `429`.
              error:
                type: string
                enum:
                  - Ratelimit exceeded
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 429
            error: Ratelimit exceeded
    '504':
      description: Timeout waiting for liteserver response.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 504
                description: HTTP status code `504`.
              error:
                type: string
                enum:
                  - LITE_SERVER_NETWORK timeout
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 504
            error: LITE_SERVER_NETWORK timeout
    '542':
      description: Liteserver-specific error or unsupported stack type.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 542
                description: HTTP status code `542`.
              error:
                type: string
                enum:
                  - 'Unsupported stack entry type: <type>'
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 542
            error: 'Unsupported stack entry type: <type>'
    422_run:
      description: Invalid get method or stack parameters.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 422
                description: HTTP status code `422`.
              error:
                type: string
                enum:
                  - Stack should be array
                  - 'Invalid stack format: array expected'
                  - >-
                    Invalid stack entry format: array of exact 2 elements
                    expected
                  - Expected string as first element in stack entry
                  - Wrong type of number in stack entry
                  - Invalid tvm.Cell, base64 string expected
                  - Invalid tvm.Slice, base64 string expected
                  - Empty tvm.Cell
                  - Empty tvm.Slice
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 422
            error: Stack should be array
    500_execution:
      description: Get method or simulation execution failed.
      content:
        application/json:
          schema:
            type: object
            additionalProperties: false
            required:
              - ok
              - code
              - error
            properties:
              ok:
                type: boolean
                const: false
                description: Always `false` for error responses.
              code:
                type: integer
                const: 500
                description: HTTP status code `500`.
              error:
                type: string
                enum:
                  - Exit code <N> != 0
                  - Stack size <N> < 5
                  - 'Failed to parse int: <value>'
                  - stackEntryNumber expected
                  - stackEntryCell expected at <N> position
                  - stackEntryCell or stackEntrySlice expected
                  - addr_ext is not supported
                  - addr_var is not supported
                  - anycast is not supported
              '@extra':
                type: string
                description: Extra data passed through from the request.
          example:
            ok: false
            code: 500
            error: Exit code <N> != 0
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        API key header of the form `X-API-Key: <token>`, where `<token>` is the
        API key. Requests without a key are limited to 1 RPS. Refer to the
        [authentication guide](/ecosystem/api/toncenter/v2-authentication) for
        details.
    APIKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: >-
        API key query parameter of the form `?api_key=<token>`, where `<token>`
        is the API key. Equivalent to the header method. Refer to the
        [authentication guide](/ecosystem/api/toncenter/v2-authentication) for
        details.

````