Docs

Modules — View Functions (Move REST)

Execute Move view (read-only) functions.

Overview

Execute read-only Move view functions without submitting a transaction.

Endpoint

POST /v1/view

Movement-Specific Notes

  • Provide the fully-qualified function 0x...::module::fn.

Request

Body Schema

JSON
{
  "function": "0x1::chain_id::get",
  "type_arguments": [],
  "arguments": []
}

Response

Success Response (200)

JSON
["0x..."]

Code Examples

Bash
curl -X POST https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1/view \
  -H "Content-Type: application/json" \
  -d '{"function":"0x1::chain_id::get","type_arguments":[],"arguments":[]}'
Python
# Use aptos_sdk view helpers (or direct REST call)
TypeScript
import { Aptos, AptosConfig, Network } from '@aptos-labs/ts-sdk';
const cfg = new AptosConfig({ network: Network.CUSTOM, fullnode: 'https://api-movement-mainnet.n.dwellir.com/YOUR_API_KEY/v1' });
const aptos = new Aptos(cfg);
const res = await aptos.view({ function: '0x1::chain_id::get', typeArguments: [], functionArguments: [] });
console.log(res);