TriportRPC

eth_getTransactionCount

BNB Smart Chain / https://triport.io/rpc/bsc

Minimum tier: Free

BNB Smart Chain method guide

Last updated:

eth_getTransactionCount returns the transaction count, commonly called the account nonce, for an address at a selected BNB Smart Chain block.

The result is an EVM hex quantity. Use pending when an upstream node's pending-state view is required, or a mined block tag/number for confirmed state; availability of old state depends on archive capability.

This is account-scoped and differs from eth_getBlockTransactionCountByNumber, which counts transactions inside a block. Historical reads depend on the two confirmed archive-state pool nodes.

Parameters

eth_getTransactionCount parameters
NameTypeRequiredDescription
addressAddressYes
blockBlockTagYes

Returns

eth_getTransactionCount return value
FieldType
transactionCountQuantity

Examples

curl https://triport.io/rpc/bsc \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionCount","params":["<address>","<block>"]}'
const res = await fetch("https://triport.io/rpc/bsc", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getTransactionCount",
  "params": [
    "<address>",
    "<block>"
  ]
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/rpc/bsc",
    headers={"Authorization": "Bearer <api-key>"},
    json={"jsonrpc":"2.0","id":1,"method":"eth_getTransactionCount","params":["<address>","<block>"]},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Chain: BNB Smart Chain.
  3. Clusters: mainnet.
  4. Credit cost: 1 per call.

FAQ

What does eth_getTransactionCount do?
Return an account nonce at a block.
How many credits does eth_getTransactionCount cost?
eth_getTransactionCount costs 1 credit(s) per call on Triport by default.
Is eth_getTransactionCount available over WebSocket?
eth_getTransactionCount is an HTTP JSON-RPC method.