web3_clientVersion
https://api.triport.io/polygonReturns the version string of the client software backing the Polygon node, as a single string.
web3_clientVersion returns a free-form string identifying the client
implementation and version serving the request. On Polygon mainnet
(chainId 0x89 / 137) the network is secured by Bor, Polygon's fork of
Geth, so the value typically begins with bor/v.... Depending on which backend
serves a given request you may instead see a Geth/v... or erigon/v...
string — the format is the client's own, not a Triport-defined schema.
Use this method as a cheap liveness ping or to record which client family is answering. Because the string reveals the client type and version, it can be used to fingerprint the backend; treat any client/version details as informational and do not branch critical logic on the exact string, since the serving node can change between requests.
This method takes no parameters and is available on every tier starting at free.
Parameters
This method takes no parameters.
——optional[] as params.Response
Response fields
| Field | Type | Description |
|---|---|---|
result | string | The backing client's self-reported version string. On Polygon this is usually a bor/v... value (Bor, Polygon's Geth fork); a Geth/v... string indicates a standard Geth/Erigon backend. |
Errors
| Code | Meaning | When it happens |
|---|---|---|
-32001 | trial_expired | The API key's trial period has ended; upgrade to a paid tier to continue. |
-32002 | tier_insufficient | Your tier is below the minimum required for this method's category. |
-32003 | rate_limited | You exceeded the requests-per-second limit for your tier. Back off and retry. |
-32004 | subscription_expired | The paid subscription tied to the key has lapsed. |
-32005 | unauthorized | The API key is missing, malformed, or invalid. |
-32601 | method_unknown | The method is not recognized or not enabled for this chain/key. |
Errors are returned in the standard JSON-RPC envelope. See the shared errors reference for the full error object shape and handling guidance.
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/polygon", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "web3_clientVersion",
params: [],
}),
});
const { result } = await res.json();
console.log(result); // "bor/v1.5.7-stable/linux-amd64/go1.22.4"
console.log(result.startsWith("bor/")); // true on a Bor backendTypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const client = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
const version = await client.polygon.rpc<string>("web3_clientVersion", []);
console.log(version); // "bor/v1.5.7-stable/linux-amd64/go1.22.4"Python (triport-sdk)
import os
from triport import Triport
client = Triport(api_key=os.environ["TRIPORT_API_KEY"])
version = client.polygon.rpc("web3_clientVersion", [])
print(version) # "bor/v1.5.7-stable/linux-amd64/go1.22.4"
print(version.startswith("bor/")) # True on a Bor backendNotes
- The string format is defined by the client, not by Triport. Parse it
defensively (e.g. split on
/) and never assume a fixed shape. - The value can differ between requests if more than one backend serves your traffic, so it is not a stable identifier — cache it only for short-lived, informational use.
- Related utility and network-state methods on Polygon:
web3_sha3(server-side keccak256),net_version(network ID as a decimal string), andeth_chainId(chain ID as a hex quantity).