eth_protocolVersion
Last updated:
eth_protocolVersion reports the version of the Ethereum wire (devp2p eth)
protocol the underlying node implements. It is a connectivity- and
capability-probe method: use it to confirm your endpoint is reachable and
authenticated before issuing heavier calls, or to record which protocol
generation served a request.
The result is a string containing a hex-encoded integer (for example "0x41"
= 65, the eth/65 wire protocol). It is not the chain ID, the client
version, or the EVM/network version — for those see
net_version, eth_chainId, and
web3_clientVersion.
This method takes no parameters and is available on the free tier.
Parameters
This method takes no parameters.
Returns
| Field | Type |
|---|---|
| result | object |
Examples
curl https://triport.io/eth \
-X POST -H 'Content-Type: application/json' \
-H 'Authorization: Bearer <api-key>' \
-d '{"id":1,"method":"eth_protocolVersion","params":[],"jsonrpc":"2.0"}'const res = await fetch("https://triport.io/eth", {
method: "POST",
headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
body: JSON.stringify({
"id": 1,
"method": "eth_protocolVersion",
"params": [],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post(
"https://triport.io/eth",
headers={"Authorization": "Bearer <api-key>"},
json={"id":1,"method":"eth_protocolVersion","params":[],"jsonrpc":"2.0"},
)
print(resp.json()){
"id": 1,
"result": "0x5",
"jsonrpc": "2.0"
}Usage
- Transport: HTTP (JSON-RPC).
- Networks: mainnet.
- Credit cost: 1 per call.
FAQ
- What does eth_protocolVersion do?
- Returns the Ethereum wire protocol version the node speaks, as a hex-encoded integer.
- How many credits does eth_protocolVersion cost?
- eth_protocolVersion costs 1 credit(s) per call on Triport by default.
- Is eth_protocolVersion available over WebSocket?
- eth_protocolVersion is an HTTP JSON-RPC method.