Get Public Chain Transaction Statistics#
Query on-chain transaction statistics for a specific chain, including pending transaction count, 24-hour transaction volume, total transaction count, and average TPS.
Supported chains: see Get Chain Info API Supported Chains (apiName: transaction).
Request URL#
GET
https://web3.okx.com/api/v6/explorer/info/transactionRequest Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
| chainIndex | String | Yes | Unique identifier of the chain, e.g., 1 for ETH, 0 for BTC. See Get Chain Info API Supported Chains for supported values. |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| chainIndex | String | Unique identifier of the chain. |
| symbol | String | Native token of the chain. |
| pendingTransactionCount | String | Number of pending transactions. |
| transactionValue24h | String | 24-hour on-chain transaction volume. |
| totalTransactionCount | String | Total on-chain transaction count. |
| tranRate | String | Average TPS over the last 50 blocks. |
| avgTransactionCount24h | String | 24-hour average transaction count. |
| avgTransactionCount24hPercent | String | Change in the 24-hour average transaction count. |
| pendingTransactionSize | String | Size of pending transactions. |
Request Example#
shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/info/transaction?chainIndex=1' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'
Response Example#
json
{
"code": "0",
"msg": "",
"data": [
{
"chainIndex": "1",
"symbol": "ETH",
"pendingTransactionCount": "147583",
"transactionValue24h": "2412345.8",
"totalTransactionCount": "2915678123",
"tranRate": "14.2",
"avgTransactionCount24h": "1234567",
"avgTransactionCount24hPercent": "0.023",
"pendingTransactionSize": ""
}
]
}
