Skip to main content

Get ledger info

GET

Retrieves the latest ledger information. Includes data such as chain ID, role type, ledger version, and epoch.
Path Parameters
chainstringrequired
Parameter specifying the target chain to query.
networkstringrequired
Parameter specifying the network of the target chain.
Responses
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.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Bad Request"
}
cURL
curl -X GET 'https://aptos-mainnet.nodit.io/v1/' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo'