Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Algod Daemon

The main daemon running in an Algorand Node is called algod.

It is responsible for providing access to core blockchain data and functionality. This includes transaction details, account balances, smart contract state, and other node-level information.

The algod REST API is used to GET:

  • Node info (e.g., /genesis, /health, /ready, /status, etc.),

  • Account info (e.g., /accounts/{address}, etc.),

  • App info (e.g., /applications/{application-id}, etc.),

  • ASA info (e.g., /assets/{asset-id}, etc.),

  • Blocks info (e.g., /blocks/{round}, etc.),

  • Other ancillary information about the Ledger and pending transactions in the Transaction Pool.

The algod REST API is used to POST:

  • Synchronization commands (e.g., /ledger/sync/{round}, /catchup/{catchpoint}, etc.),

  • Transactions (e.g., /transactions, /transactions/simulate, etc.),

  • Consensus commands (e.g., /participation, /participation/generate/{address}, etc.),

  • AVM Compiler commands (e.g., /teal/compile, /teal/disassemble, etc.),

  • Other ancillary dev commands.

Tasks involving the management and the usage of private keys are handled by a separate daemon, called Key Management Daemon (kmd).

Authorization

Some algod endpoints perform sensitive actions that require authorization.

The X-Algo-API-Token header is used to authenticate requests to the private algod endpoints.

By default, the API can be configured with two separate X-Algo-API-Token values:

  • The algod.token is used to access public algod endpoints.

  • The admin.algod.token is used to access private algod endpoints.

Endpoints

Each algod endpoint path has two tags to separate endpoints into groups:

  • Tag 1: public (use the algod.token) or private (use algod.admin.token),

  • Tag 2: participating, nonparticipating, data, or experimental.

⚙️ IMPLEMENTATION

Each endpoint implements a Handler and a Client.

Constants

The following constants define key limits and default behaviors for various algod API endpoints.

These values serve as practical defaults for most use cases. Developers implementing their own tooling or integrations can use these as general guidelines.

ConstantValueDescription
MaxTealSourceBytes524,288 bytesMaximum allowed size for TEAL source code in API requests.
MaxTealDryrunBytes1,000,000 bytesMaximum allowed size for dryrun simulation requests.
MaxAssetResults1,000Maximum number of assets returned in a single call to /v2/accounts/{address}/assets.
DefaultAssetResults1,000Default number of assets returned if no explicit limit is provided (up to MaxAssetResults).
WaitForBlockTimeout1e+10 nanoseconds (1 min.)Timeout duration for the WaitForBlock endpoint when waiting for the next block to be generated.