POSTExecute view function of a module

Call functions defined as view.

Request Body
functionstringrequired

Field for entering the view function defined in the deployed module. Enter in the following format:

  • Format: {address}::{module_name}::{function_name}
type_argumentsstring[]required

Field for entering the function's type arguments. For functions that do not take generic type arguments, enter an empty array.

argumentsstring[]required

Field for entering the function's arguments. For functions that take no arguments, enter an empty array in this field.

Responses
Headers
X-APTOS-BLOCK-HEIGHTintegerrequired

Current block height of the chain

예: 0

X-APTOS-CHAIN-IDintegerrequired

Chain ID of the current chain

예: 0

X-APTOS-EPOCHintegerrequired

Current epoch of the chain

예: 0

X-APTOS-LEDGER-OLDEST-VERSIONintegerrequired

Oldest unpruned ledger version of the chain

예: 0

X-APTOS-LEDGER-TIMESTAMPUSECintegerrequired

Current timestamp of the chain

예: 0

X-APTOS-LEDGER-VERSIONintegerrequired

Current ledger version of the chain

예: 0

X-APTOS-OLDEST-BLOCK-HEIGHTintegerrequired

Oldest unpruned block height of the chain

예: 0

X-APTOS-CURSORstring

Cursor for the next page

예: string

X-APTOS-GAS-USEDinteger

Amount of gas actually used for transaction execution

예: 0

X-API-KEY
RequestCU13
cURL
curl -X POST "https://aptos-mainnet.nodit.io/v1/view" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "function": "0x1::coin::balance",
  "type_arguments": ["0x1::aptos_coin::AptosCoin"],
  "arguments": ["0x1"]
}'
Response
Header · 200
{
  "X-APTOS-BLOCK-HEIGHT": 0,
  "X-APTOS-CHAIN-ID": 0,
  "X-APTOS-EPOCH": 0,
  "X-APTOS-LEDGER-OLDEST-VERSION": 0,
  "X-APTOS-LEDGER-TIMESTAMPUSEC": 0,
  "X-APTOS-LEDGER-VERSION": 0,
  "X-APTOS-OLDEST-BLOCK-HEIGHT": 0,
  "X-APTOS-CURSOR": "string",
  "X-APTOS-GAS-USED": 0
}
Body · 200
[
  4000000000
]