Get aggregated EL peer-graph snapshot
https://api.triport.io/v1/eth/intel/peer-graph?depth=2Returns a cross-host view of the Ethereum execution-layer (EL) peer graph — which nodes are peering with which, annotated with client, latency, and direction.
This endpoint returns a snapshot of the observed execution-layer peer graph: a list of directed edges between EL hosts, each carrying the remote client identification, the measured link latency, and the peering direction. Use it to visualize network topology, detect clustering or partitions, and correlate client diversity with connectivity across the hosts Triport observes.
The data is derived intelligence aggregated across many hosts, so it is gated to
the enterprise tier. For the neighbor list of a single host, use the
companion endpoint GET /v1/eth/intel/peer-graph/host/{host}.
The optional depth parameter controls how many peering hops are traversed
outward from the observed seed set (1–3, default 1). Higher depths return more
edges and take longer to compute.
Parameters
Query parameters
depthintegeroptional1–3. Default 1. Higher values walk further out across peering hops and return more edges.Response
Response fields
| Field | Type | Description |
|---|---|---|
observed_at | string (date-time) | When the snapshot was captured (RFC 3339 / ISO 8601). |
edges | array<EthPeerEdge> | The observed peer-graph edges. |
edges[].from_host | string | Source host of the peering edge. Required. |
edges[].to_host | string | Destination host of the peering edge. Required. |
edges[].client | string | Remote client identification string, e.g. geth/v1.13.14 or nethermind/v1.25. |
edges[].latency_ms | number (double) | Measured link latency in milliseconds. |
edges[].direction | string | Peering direction: inbound, outbound, or bidirectional. |
Errors
| Code | Meaning | When it happens |
|---|---|---|
401 | unauthorized / trial_expired / subscription_expired | Missing or invalid credentials, or the trial/subscription has lapsed. |
403 | tier_insufficient | The API key's tier is below enterprise. Response carries current_tier, required_tier, and the X-Required-Tier header. |
429 | rate_limited | Sustained RPS exceeded. Response carries retry_after_sec, limit_rps, and the Retry-After / X-RateLimit-* headers. |
All error bodies use the shared envelope (error, message, request_id).
See errors.md for the full envelope and per-code fields.
Examples
JavaScript (fetch)
const res = await fetch(
"https://api.triport.io/v1/eth/intel/peer-graph?depth=2",
{
headers: {
Authorization: `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
}
);
if (!res.ok) {
const err = await res.json();
throw new Error(`${res.status} ${err.error}: ${err.message}`);
}
const { observed_at, edges } = await res.json();
console.log(`snapshot @ ${observed_at} — ${edges.length} edges`);TypeScript SDK (@triport/sdk)
import { TriportClient } from "@triport/sdk";
const client = new TriportClient({ apiKey: process.env.TRIPORT_API_KEY! });
const graph = await client.eth.intel.peerGraph({ depth: 2 });
for (const edge of graph.edges) {
console.log(`${edge.from_host} -> ${edge.to_host} (${edge.direction}, ${edge.latency_ms} ms)`);
}Python (triport-sdk)
import os
from triport import TriportClient
client = TriportClient(api_key=os.environ["TRIPORT_API_KEY"])
graph = client.eth.intel.peer_graph(depth=2)
print(f"snapshot @ {graph.observed_at} — {len(graph.edges)} edges")
for edge in graph.edges:
print(f"{edge.from_host} -> {edge.to_host} ({edge.direction}, {edge.latency_ms} ms)")Notes
- Depth trade-off:
depth=1(default) returns only the directly observed peering edges;depth=2–3walk further across the graph and return progressively larger result sets at higher compute cost. - Direction semantics:
inboundandoutboundare relative tofrom_host;bidirectionalindicates the peering was observed in both directions. - Related: to retrieve the neighbor list (with
enodeand per-peer client/latency/direction) for a single host, useGET /v1/eth/intel/peer-graph/host/{host}.