Network Events API

nano.community watches the Nano network and records what changes about representatives: a representative going offline, falling behind on cementing, running an outdated node version, and more. Every change is a network event. Two public endpoints serve them, so a wallet, bot or app can build alerts without running its own monitoring.

  • GET https://nano.community/api/network/events — every event, in the order it was recorded.
  • GET https://nano.community/api/network/conditions — every condition that holds right now.

Both are free, need no key and cache for 60 seconds. Poll no more than once a minute.

Event Shape

{
  "network_event_sequence": 48211,
  "network_event_id": "6f1c…",
  "network_event_condition_id": "6f1c…",
  "network_event_type": "representative_offline",
  "network_event_phase": "began",
  "severity": "warning",
  "representative_account": "nano_3…",
  "peer_address": null,
  "node_id": null,
  "evidence": { "began_at": 1764370800 },
  "observed_at": 1764371100,
  "recorded_at": 1764371281
}
  • network_event_sequence is the cursor. It increases in the order events are written.
  • network_event_id is stable: the same event always has the same id.
  • network_event_phase is began or ended for a condition, and occurred for a one-off occurrence.
  • network_event_condition_id pairs a condition's began and ended rows. It is the network_event_id of the began row, on both rows, and null on occurrences.
  • severity is info, warning or critical.
  • evidence holds the details for the type. A condition's began_at is in its evidence.
  • observed_at and recorded_at are Unix seconds. observed_at is when the network was seen in that state, and recorded_at is when the row was written.
  • A began row with "first_observation": true in its evidence was already true when monitoring of that type started. It is not news, so skip it when alerting.

Reading the Event Feed

GET /api/network/events takes these query parameters, all optional:

ParameterMeaning
afterReturn events with a sequence above this one, oldest first.
beforeReturn events with a sequence below this one, newest first.
limitPage size, 50 by default and 100 at most.
network_event_typeOne type from the list below.
representative_accountOne nano_ account.
severityinfo, warning or critical.

With neither after nor before, the feed returns the newest events first. Use only one of after and before. An invalid parameter returns 400 with an error message.

To follow the feed, keep the network_event_sequence of the last event you processed and ask for the events after it:

GET /api/network/events?after=48211&limit=100
  • Events arrive in sequence order, and reading by after never skips one.
  • The sequence has gaps, so never treat a missing number as a lost event.
  • When a page comes back full, ask again straight away from its last sequence. When it comes back short, you are caught up.
  • Store your cursor only after you have handled the page, so a crash replays events rather than losing them. Dedupe on network_event_id.

GET /api/network/events/<network_event_id> returns one event.

Reading Current Conditions

GET /api/network/conditions returns every open condition, optionally for one representative_account:

{
  "network_conditions": [
    {
      "network_event_type": "representative_offline",
      "network_event_phase": "began",
      "...": "..."
    }
  ],
  "producer_coverage": [
    { "producer": "network_observer", "coverage_ended_at": 1764371400 },
    { "producer": "telemetry_detector", "coverage_ended_at": 1764371100 },
    { "producer": "uptime_detector", "coverage_ended_at": 1764371400 }
  ]
}

A condition is open while it has a began row and no ended row with the same network_event_condition_id.

producer_coverage tells you how current each monitor is. coverage_ended_at is the latest time the monitor has fully processed: every event it observed at that time is written. If it is more than a few minutes old, the monitor is behind or down. A representative with no open condition is then unknown, not healthy. representative_offline comes from uptime_detector.

Public Event Types

TypeKindSeverityMeaning
representative_offlineconditionwarningNo monitored node lists the representative online.
representative_not_votingconditionwarningA principal representative has not voted for over 5 minutes.
representative_cemented_behindconditionwarningThe node is more than 1000 blocks behind on cementing.
representative_version_outdatedconditionwarningThe node runs an older major version than most nodes of its kind.
representative_multiple_peer_addressesconditioninfoThe representative is reachable at more than one address.
node_hosts_multiple_representativesconditioninfoOne node votes for more than one representative.
representative_peer_address_changedoccurrenceinfoThe representative moved to a new address.
representative_node_changedoccurrenceinfoThe representative moved to a new node.
block_fork_detectedoccurrencewarningTwo blocks were published for the same root.
representative_votes_conflictingoccurrencewarning, critical when both votes are finalA representative voted for two blocks on the same root.

Representative Offline

nano.community asks several Nano nodes every 5 minutes which representatives are online. Representatives above the tracking weight that no node lists are offline in that sample.

  • A began row is written once a representative is offline in two samples in a row, so a single missed sample never alerts. Its evidence.began_at is the first offline sample, and its observed_at is the second.
  • An ended row is written at the first sample that shows it online again. Its evidence.ended_at is that sample.
  • Only representatives that have been seen online are tracked, so one that first appears offline does not alert.
  • If the monitoring nodes themselves fail, so that few of them answer and they list far fewer representatives than were online in the last day, the sample is skipped. That shows as a stale uptime_detector coverage rather than every representative going offline. A real outage that the nodes report is recorded straight away.

Recipe: Alert When a Representative Goes Offline

  1. On start, read /api/network/events?limit=1 and keep its network_event_sequence as your cursor. Then read /api/network/conditions?representative_account=<account> for the current state. Take the cursor first: an event written between the two reads then arrives through the feed rather than falling between them.
  2. Once a minute, read /api/network/events?network_event_type=representative_offline&after=<cursor>, page until a short page, and advance the cursor.
  3. For each began row without first_observation on an account you watch, send an offline alert. For each ended row, send a recovery alert. Key your alert state by network_event_condition_id, so a condition seen in both the start-up read and the feed alerts once.
  4. If uptime_detector coverage in /api/network/conditions is more than 15 minutes old, tell your users that offline monitoring is paused.

Data is provided as is, with no guarantee of uptime.