NIP-66 defines three event kinds that together describe the relay monitoring lifecycle. Monitors announce themselves with kind 10166, report per-relay status with kind 30166, and record state changes over time with kind 1066. These events are signed by the monitor’s private key, giving consumers cryptographic proof of who observed what and when.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sandwichfarm/nostr-watch/llms.txt
Use this file to discover all available pages before exploring further.
| Kind | NIP-01 type | Purpose | d tag |
|---|---|---|---|
| 10166 | Replaceable | Monitor announcement — declares a monitor’s existence and capabilities | monitor pubkey |
| 30166 | Parameterized replaceable | Relay status — current health and metadata for one relay | relay URL |
| 1066 | Regular | Relay status delta — append-only history entry | none |
Kind 10166 — Monitor Announcement
A monitor publishes kind 10166 to announce itself on the Nostr network. It declares which checks it performs, how often, and on which networks. This event is replaceable — a monitor publishes one event and updates it when its configuration changes. Only the latest version per monitor pubkey is kept.content field is always an empty string for kind 10166.
Tags
| Tag | Example value | Description |
|---|---|---|
frequency | 3600 | Check interval in seconds |
n | clearnet | Network covered — clearnet, tor, or i2p (one tag per network) |
c | open | Check type performed — open, read, write, ssl, dns, geo, info (one tag per type) |
timeout | open, 5000 | Timeout in ms for the named check (multi-value tag) |
k | 30166 | Event kinds published by this monitor |
g | u4pruyd | Geohash of the monitor’s physical location |
When to use it
Query kind 10166 events to discover active monitors and understand their coverage. Thefrequency tag tells you how often to expect fresh data. Compare multiple monitors’ c tag sets to understand which check types are covered.
Kind 30166 — Relay Status
A monitor publishes kind 30166 to report the current status of a specific relay. One event exists per (relay URL, monitor pubkey) pair — thed tag is the relay URL, making this a parameterized replaceable event. When a monitor publishes a new status check for a relay, it replaces the previous one for that relay/monitor pair.
The content field contains the relay’s NIP-11 info document as a JSON string (if the relay supports NIP-11). Always parse and validate this separately — it is self-reported by the relay operator, not verified by the monitor.
Tags
| Tag | Example value | Description |
|---|---|---|
d | wss://relay.damus.io | Relay URL — addressable identifier for parameterized replaceability |
r | wss://relay.damus.io | Relay URL (queryable via #r tag filter) |
n | clearnet | Network type: clearnet, tor, or i2p |
R | !auth | Relay capability/requirement flag (see R tag convention below) |
rtt-open | 120 | Round-trip time in ms for WebSocket open check |
rtt-read | 85 | Round-trip time in ms for read check |
rtt-write | 95 | Round-trip time in ms for write check |
N | 42 | Supported NIP number — one tag per NIP |
k | 1 | Supported event kind — one tag per kind, maximum 21 |
p | <hex-pubkey> | Relay operator pubkey (from NIP-11 pubkey field) |
s | strfry | Relay software name (from NIP-11 software field) |
L | ISO-639-1 | Label namespace declaration (NIP-32) |
l | en, ISO-639-1 | Label value in the declared namespace |
l | draft7, nip66.draft | NIP-66 draft version label |
The R tag convention
TheR tag encodes relay capability flags. A value without a ! prefix means the flag is active; a value with a ! prefix means it is not active.
| Value | Meaning |
|---|---|
open | Relay accepted a WebSocket connection |
read | Relay responded to a REQ subscription |
write | Relay accepted an EVENT message |
ssl | TLS certificate is valid |
auth | Relay requires NIP-42 authentication |
payment | Relay requires payment to use |
pow | Relay requires proof of work |
!auth | Relay does not require authentication |
!payment | Relay does not require payment |
!pow | Relay does not require proof of work |
When to use it
Kind 30166 is the primary event kind for relay intelligence. Query it filtered by relay URL, network, or supported NIPs to build relay selection logic.Tag filters use string values in REQ messages, even for numeric tags. Use
'#N': ['42'] (string) to match ["N", "42"], not '#N': [42] (number).Kind 1066 — Relay Status Delta
Kind 1066 is an append-only log recording relay status changes over time. Unlike kind 30166 (which replaces the previous event for each relay/monitor pair), kind 1066 events accumulate and are used for historical analysis and trend detection. Kind 1066 uses a subset of kind 30166 tags. Only the tags that changed since the last status event are included — it is a diff, not a snapshot.Tags used in kind 1066
| Tag | Description |
|---|---|
r | The relay URL this delta applies to |
R | Changed requirement/capability flags |
rtt-open | Changed open RTT |
rtt-read | Changed read RTT |
rtt-write | Changed write RTT |
N | Changed NIP support |
When to use it
Query kind 1066 events to build historical timelines: when relays went offline, latency trends over time, software version changes, and NIP support changes. Combine with kind 30166 for a complete picture — use 30166 for current state and 1066 for history.How the kinds relate to each other
Kind 10166
Monitor announces itself. Published once per monitor, updated when configuration changes. Tells you who is watching.
Kind 30166
Relay status snapshot. One event per (relay, monitor) pair, replaced on every check. Tells you the current state.
Kind 1066
State change delta. Append-only, accumulates over time. Tells you what changed and when.
- Query kind 10166 to discover which monitors are active and how often they check
- Query kind 30166 for current relay status, filtered by relay URL, network, or NIP support
- Aggregate kind 30166 events across multiple monitors to get consensus values (or use the REST API / CVM which does this for you)
- Query kind 1066 to build history charts or detect degradation patterns