Nano Node RPC icon

Nano Node RPC

Interact with Nano cryptocurrency network

Actions111

Network → Get Representatives Online

AI-generated

Summary

Retrieves the set of representatives that are currently online on the Nano network. Optionally filters the results to a supplied list of accounts and can include each representative's voting weight.

Inputs

  • includeWeight — Whether to include voting weight for each representative in the response. When false only the representative accounts are returned. When true the response also contains a weight map where the key is the representative account and the value is its current voting weight as a raw string (nanoseconds?). Note: The underlying RPC call expects the boolean flag "include_weight". Default is false, meaning weight is omitted by default.
  • filterAccounts — A comma‑separated list of Nano accounts (e.g. nano_1abc...,nano_2def...). Only representatives that appear both online and in this list will be returned. If the field is left empty the operation returns all online representatives. The node parses the string with a simple CSV split and trim operation before sending it to the RPC layer.
  • options — Advanced RPC call settings that affect how the request is transmitted to the node. It is a collection with two sub‑fields.
  • options.timeout — Request timeout in milliseconds. The node will abort the RPC call if no response is received within this period. Default: 15000 (15 s). Valid range: 1 000‑600 000 ms.
  • options.maxRetries — How many times the node should automatically retry a transient RPC failure (e.g. network timeout) before propagating the error. Default: 2 attempts. Valid range: 0‑10.

Output shape

object

The RPC method representatives_online returns a JSON object. When includeWeight is false the payload is { "representatives": [ "nano_...", ... ] }. When includeWeight is true the payload also contains a weight field: { "representatives": [ ... ], "weight": { "nano_...": "12345...", ... } }. The node forwards this object unchanged as the step’s output data.

Examples

Example 1: Get all online representatives without weight

{ includeWeight: false, filterAccounts: '' }

Example 2: Get online representatives for a specific set of accounts and include their weight

{ includeWeight: true, filterAccounts: 'nano_1abc...,nano_2def...' }

Links

Discussion