The Radix Node API

Introduction

The recommended method of programmatic interaction with the Radix Public Network is through the Radix Node API. This API provides a structured, standardized way of sending requests from a client application to the network using JSON-RPC[1].

The advantage of using RPC calls over language-specific libraries is that it makes interacting with the Radix network language agnostic: you can use any tool, any framework, or any language as long as it supports the HTTP protocol. You can even make API calls in the URL bar of a web browser or using curl.

Node API Endpoints

The Node API is made of several endpoints that are offered by different types of Radix nodes for different purposes. Each endpoint offers a variety of methods for specific queries or actions.

If you are running a node yourself, the different endpoints use different usernames, passwords, and ports (more on Radix Node ports here). This is so you can separate critical node operations from informational endpoints or endpoints intended to offer public services.

Of particular note for developers are the /archive and /construction API endpoints that are offered by archive nodes. Archive nodes heavily index ledger state so that they may provide these endpoints as a simple way to query the Radix ledger and construct and submit transactions. The Radix Desktop Wallet and Radix Explorer both use these endpoints. To learn to use them, see our pages detailing Making API Calls.

Other API endpoints intended primarily for node-runners are mostly easily used via the radixnode CLI tool.

Here is a summary of the different endpoints of the Node API:

Table 1. Radix Node API endpoints
Endpoint Purpose Node types User

/archive

Used for retrieving general ledger state information about accounts, transactions, tokens, validators, stakes and more. Useful for explorers, dashboards, and general ledger state lookup

archive

[public]

/construction

Used for constructing, signing, and submitting transactions to the network for an arbitrary Radix account. Most commonly used for wallets and similar functionality

archive

[public]

/validation

For validator node-runners, provides information relevant to validator status and epochs

validator

admin

/account

Provides information about the node’s own internal "wallet" account, as well as ability to submit transactions from this account

full validator archive

superadmin

/health

Provides the node-runner with a convenient snapshot of the node’s operating status

full validator archive

admin

/system

Provides a variety of detailed information about the network and its nodes

full validator archive

admin

/version

Provides the node’s current software version

full validator archive

admin

/metrics

Provides node and network operation metrics data in the Prometheus text format

full validator archive

metrics

For a more complete rundown of the Node API, its endpoints, and their respective methods, see the specification of the Radix Node API.


1. You can find a good introduction to the JSON-RPC specification on Wikipedia