TriportRPC

Get a single chain

GEThttps://api.triport.io/v1/chains/eth

Fetch one chain's static descriptor — identity, protocols, required scope, UI hints — plus its latest live health metrics, by chain id.

— (catalogue endpoint; serves every chain Triport supports)— (the descriptor is public; each chain advertises its own required_scope in the body)Standard platform RPS-per-tier with burst. No daily quota.

Returns the ChainDescriptor for a single chain identified by its stable id (eth, polygon, sol, …), wrapped together with the chain's most recent metrics snapshot. Use it to render a single chain's detail page or to confirm a chain id is part of the catalogue before composing endpoint URLs.

The descriptor itself is public: if you know a chain's id you get its descriptor, regardless of authentication or scope. The catalogue is treated as marketing/discovery data — scope gating happens on the list endpoint and on the per-key endpoints surface, not here. The only reason this endpoint returns 404 is an unknown id.

The metrics block is best-effort. It carries the latest health snapshot when the metrics aggregator is wired in; if metrics are unavailable the field is null and the descriptor still returns 200. A chain's runtime health is expressed by metrics.status, a closed union — see Response fields.

scope_missing is a status, not an error. scope_missing is one of the values in the metrics.status union. It marks a chain as visible but permission-gated — your key does not hold the chain's required_scope — rather than hiding it. It describes permission, never upstream health (contrast degraded / down). For a key-specific view of which chains you can actually call, use GET /v1/keys/{id}/endpoints.

Parameters

Path parameters

idstringrequired
Stable chain id. One of: eth, polygon, sol, base, bsc, arbitrum, op, bitcoin, sol-devnet.

Response

200 OK — the descriptor paired with the latest metrics snapshot:

When no metrics aggregator is configured, metrics is null:

{ "chain": { "id": "eth", "...": "..." }, "metrics": null }
chainobject
The static ChainDescriptor. Immutable for the lifetime of a release.
chain.idstring
Stable snake-case id used in URLs and as the metrics key.
chain.namestring
Human-readable display name.
chain.chain_idnumber
EIP-155 chain id where applicable (eth=1, polygon=137). Synthetic for non-EVM (sol=101, sol-devnet=103); -1 for bitcoin (no EIP-155 id).
chain.netstring
Network: mainnet | testnet | devnet.
chain.kindstring
VM family: evm | l2 | non-evm.
chain.symbolstring
Native asset ticker (ETH, POL, SOL, …).
chain.protocolsarray
Access surfaces. Each entry: kind (https | wss | grpc), path, optional note. The path is internal — compose public URLs from your key's endpoints, not from this field.
chain.required_scopestring
Scope a key must hold to call this chain (e.g. eth:rpc).
chain.uiobject
Presentation hints: color, glow, logo_bg, initials.
chain.capabilitiesarray?
Optional feature badges (Archive, Trace API, WebSocket, …). Omitted when empty.
metricsobject | null
Latest health snapshot, or null when metrics are unavailable.
metrics.statusstring
Closed union — see below.
metrics.latency_p50_ms / latency_p95_msnumber | null
Probe latency percentiles in ms. null until samples exist.
metrics.uptime_24h_pct / uptime_7d_pctnumber | null
Success ratio (0–100) over the window. null for empty windows.
metrics.block_height / block_finalizednumber | null
Latest / finalized block height.
metrics.peersnumber | null
Connected peers. EVM/L2 only; null on non-EVM.
metrics.sync_statusboolean | null
Whether the upstream reports fully synced.
metrics.gas_price_nativestring | null
Formatted gas price (e.g. "12.4 Gwei"). EVM/L2 only.
metrics.epochnumber | null
Current epoch. Non-EVM only (e.g. Solana).
metrics.tpsnumber | null
Transactions per second, when computable.
metrics.last_seen_ago_secnumber | null
Seconds since the last successful probe.
metrics.measured_atstring
RFC 3339 timestamp of when the snapshot was assembled.

Errors

The error envelope is { "error": "<code>" }.

CodeHTTPMeaningWhen it happens
chain_not_found404Unknown chain idThe {id} segment is not a registered chain.
method_not_allowed405Wrong HTTP methodAny verb other than GET.

See errors.md for the shared error envelope and conventions.

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io/v1/chains/eth", {
  headers: { Authorization: `Bearer ${process.env.TRIPORT_API_KEY}` },
});
if (!res.ok) {
  const { error } = await res.json();      // e.g. "chain_not_found"
  throw new Error(error);
}
const { chain, metrics } = await res.json();
console.log(chain.name, metrics?.status ?? "no-metrics");

TypeScript SDK (@triport/sdk)

import { Triport } from "@triport/sdk";


const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });


const { chain, metrics } = await triport.chains.get("eth");
//    chain: ChainDescriptor, metrics: ChainMetrics | null
if (metrics && metrics.status === "scope_missing") {
  console.warn(`${chain.name}: key is missing scope ${chain.required_scope}`);
}

Python (triport-sdk)

from triport import Triport


triport = Triport(api_key=os.environ["TRIPORT_API_KEY"])


result = triport.chains.get("eth")
print(result.chain.name)
if result.metrics is not None:
    print(result.metrics.status, result.metrics.latency_p50_ms)

Notes