eth_getTransactionCount
BNB Smart Chain / https://triport.io/rpc/bsc
Minimum tier: Free
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
| Name | Type | Required | Description |
|---|---|---|---|
| address | Address | Yes | |
| block | BlockTag | Yes |
Returns
| Field | Type |
|---|---|
| transactionCount | Quantity |
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
- Transport: HTTP (JSON-RPC).
- Chain: BNB Smart Chain.
- Clusters: mainnet.
- 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.