GETGet ledger info

Retrieves the latest ledger information. Includes data such as chain ID, role type, ledger version, and epoch.

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

Body
chain_idintegerrequired

Identifier of the current chain.

epochstringrequired

Current consensus epoch number, based on the validator set for that period.

ledger_versionstringrequired

Ledger version of the latest transaction.

oldest_ledger_versionstringrequired

Ledger version of the oldest transaction.

ledger_timestampstringrequired

Ledger timestamp indicating when the current ledger was created.

node_rolestringrequired

Role of the node (full_node, validator).

oldest_block_heightstringrequired

Oldest block height.

block_heightstringrequired

Latest block height.

git_hashstring

Git hash of the built API endpoint. Used to identify the exact software version used by the API endpoint.

X-API-KEY
RequestCU13
cURL
curl -X GET "https://aptos-mainnet.nodit.io/v1/" \
  -H "X-API-KEY: {YOUR_API_KEY}"
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
{
  "chain_id": 1,
  "epoch": "3671",
  "ledger_version": "223505345",
  "oldest_ledger_version": "0",
  "ledger_timestamp": "1691977290941952",
  "node_role": "full_node",
  "oldest_block_height": "0",
  "block_height": "80602020",
  "git_hash": "ebfec6c8296848d00b69cc7bfa284d820a3c3566"
}