eth_protocolVersion — Polygon JSON-RPC

Status: Available

Returns the current EVM protocol version of the Polygon node as a hex string constant.

POSThttps://triport.io/polygon
Network
Polygon
Scope
polygon_read_rpc
Auth
x-token: $TRIPORT_API_KEY (or Authorization: Bearer)
Rate limit
free — 15 rps · basic — 20 rps · pro — 100 rps · business — 250 rps

Endpoint and plans: Polygon RPC endpoint.

eth_protocolVersion returns the protocol version advertised by the Polygon execution layer. On Polygon mainnet (chain ID 0x89 / 137) the underlying client is Bor, which reports a small hex constant — typically 0x42 (66) or 0x41 (65).

The value is effectively static: it only changes across a node software upgrade, so clients may cache it indefinitely after the first successful response. It is most often used as a lightweight capability/identity check during connection setup, not on a hot path.

This is a read method included in the Free trial (polygon_read_rpc) and takes no parameters. One quirk worth knowing: this method is noticeably slower than its sibling network-state reads (eth_chainId, net_version) — the backend recomputes the value rather than serving it from cache — so prefer to call it once and reuse the result.

Parameters

eth_protocolVersion takes no parameters. Pass an empty params array.

——optional
This method accepts no parameters.

Response

Response fields

FieldTypeDescription
jsonrpcstringJSON-RPC version, always "2.0".
idnumber | stringEchoes the id from the request.
resultstringEVM protocol version as a hex-encoded integer (e.g. 0x42).

Errors

Errors use the standard JSON-RPC envelope; see errors.md for the full shape and handling guidance.

CodeMeaningWhen it happens
401trial_expiredThe trial window for the API key has ended.
403tier_insufficientThe key's tier is below what this method requires.
429rate_limitedThe tier's RPS limit (with burst) was exceeded.
401subscription_expiredThe key's paid subscription has lapsed.
401unauthorizedMissing or invalid Authorization bearer token.
HTTP 403method_unknownMethod not found / not enabled for this key.

Examples

JavaScript (fetch)

const res = await fetch("https://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: "eth_protocolVersion",
    params: [],
  }),
});


const { result } = await res.json();
console.log(result); // "0x42"

Notes

  • Cache indefinitely. The value only changes on a node upgrade. Fetch it once per connection and reuse it; avoid calling it in a loop.
  • Not cached. The backend does not serve this from cache — one more reason to call it once and reuse it.
  • Related methods: eth_chainId (0x89 for Polygon mainnet) and net_version ("137" as a decimal string) are the better choices for chain-identity checks.
  • Decoding: parse with parseInt(result, 16) in JS or int(result, 16) in Python.