Movement Labs LogoMovement Docs
Node API

Execute view function of a module

Execute the Move function with the given parameters and return its execution result.

The Aptos nodes prune account state history, via a configurable time window. If the requested ledger version has been pruned, the server responds with a 410.

POST
/view

Query Parameters

ledger_version?string

Ledger version to get state of account

If not provided, it will be the latest version

Formatuint64
functionEntryFunctionId

Entry function id is string representation of a entry function defined on-chain.

Format: {address}::{module name}::{function name}

Both module name and function name are case-sensitive.

type_argumentsarray<MoveType>

Type arguments of the function

argumentsarray<unknown>

Arguments of the function

Response Body

curl -X POST "https://mainnet.movementnetwork.xyz/v1/view?ledger_version=32425224034" \
  -H "Content-Type: application/json" \
  -d '{
    "function": "0x1::aptos_coin::transfer",
    "type_arguments": [
      "string"
    ],
    "arguments": [
      null
    ]
  }'
[
  0
]
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}
{
  "message": "string",
  "error_code": "account_not_found",
  "vm_error_code": 0
}