Node API introduction

Introduction

In this document you'll find all the relevant information to use the Radix Node API in your development projects.

Before you start using the JSON-RPC and REST methods, please review the details regarding authentication and rate limits.

Note: the API endpoints are exposed by all the Nodes of the Radix Universe.

Node API vs. Radix libraries

The Node API allows a client to interact directly with a Node connected to the Radix Universe. As seen in the next diagram, a Node API client is connected directly to a specific Node, and can request any of the REST, JSON-PRC or Websockets API methods.

Node API diagram

On the other hand, the Radix client libraries are a layer on top of the Node API. These libraries connect to any number of Nodes as needed, and talk to the API on the client's behalf. They process the low-level data (like Atoms) into high-level abstractions, as token transfers and messages.

Radix Library diagram

Tip: if you're looking to develop DApps on the Radix Network, we recommend you to check our Java, JavaScript and Kotlin libraries.

Features

Note: API responses can be cached by the web server for up to 10 seconds.

About DSON encoding

The initial DSON library was put together to satisfy some interoperability issues with JavaScript that other serialization frameworks did not adequately address.

The DSON encoding was defined and built to meet these requirements:

  • must have the ability to encode/decode both byte-stream and JSON encoded data.

  • serialization needs to have a well-defined serialized form that can be implemented reasonably easily in other languages. (multi-language support)

Radix nodes and client libraries use JSON encoded DSON for an exchange of data between client and server. Also, clients need to be able to serialize DSON into a byte array to correctly calculate hashes.

Tip: to learn how DSON values are encoded into JSON check this section.

Rate limits

For security reasons, the API requests should comply with the following rate limits:

Traffic source

Rate limit

localhost

100 req/s

remote IPs

10 req/s

Note: the values shown above are the default rate limits. These limits can be customized by the Node administrator.

Node Finder service

The Node Finder is a node discovery micro-service built in JavaScript using Node.js.

The service crawls the Radix network, verifies the nodes using the Get Network API method, and checks for connected live nodes every minute. On request, the Node Finder will answer with a randomly-selected live node discovered while crawling the network.

This service is not decentralized, and is meant for testing purposes only. It will become a fallback option when the Radix network goes public.

Note: Radix will provide a better and decentralized network discovery option in the future.

Examples

Node finder call
Example response
curl https://alphanet2.radixdlt.com/node-finder
54.207.126.201
Node list call
Example response
curl https://alphanet2.radixdlt.com/node-finder/list
168.61.34.193
168.62.51.26
13.66.168.246
13.66.213.50
40.91.210.108
104.45.18.105
13.67.77.243
13.67.90.17
191.239.255.182
191.239.245.47
54.232.208.92
18.231.180.237
18.231.160.125
3.8.1.151
35.178.245.184
18.228.232.29
18.130.14.41
18.130.107.105
54.233.178.98
3.8.139.54
18.228.19.241
34.217.100.74
35.211.243.202
110.232.118.57
35.240.236.142