Get Historical Public Chain Statistics#
Returns daily historical statistics for the specified chain, including daily new addresses, transaction count, contract calls, transaction fees, and network utilization, sorted by time in descending order with cursor-based pagination. Only supported on selected major chains.
Supported chains: see Get Chain Info API Supported Chains (apiName: stats).
Request URL#
GET
https://web3.okx.com/api/v6/explorer/info/statsRequest 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. |
| startTime | String | No | Query start time in Unix timestamp milliseconds, e.g., 1597026383085. The span between startTime and endTime cannot exceed 1 year. |
| endTime | String | No | Query end time. Returns statistics earlier than this date, in Unix timestamp milliseconds, e.g., 1597026383085. |
| cursor | String | No | Pagination cursor. Omit for the first page; pass back the cursor from the previous response unchanged when paginating. |
| limit | String | No | Number of results per page. Default 20, maximum 100. |
Response Parameters#
| Parameter | Type | Description |
|---|---|---|
| limit | String | Maximum number of results per page. |
| cursor | String | Cursor for the next page; an empty string means no more pages. Pass it back unchanged — clients should not parse or construct it. |
| statsHistoryList | Array | List of historical statistics. |
| > time | String | Date at daily granularity, in Unix timestamp milliseconds, e.g., 1597026383085. |
| > newAddressCount | String | Number of new addresses per day. |
| > totalTransactionCount | String | Total number of transactions per day. |
| > totalContractCalls | String | Total number of onchain contract calls per day. |
| > transactionFee | String | Daily transaction fees paid to validators, denominated in the native token. |
| > networkUtilization | String | Daily network utilization, i.e., total gas used / total gas limit per day. |
Request Example#
shell
curl --location --request GET 'https://web3.okx.com/api/v6/explorer/info/stats?chainIndex=1&limit=2' \
--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": [
{
"limit": "2",
"cursor": "1753545600000",
"statsHistoryList": [
{
"time": "1753632000000",
"newAddressCount": "95321",
"totalTransactionCount": "1345678",
"totalContractCalls": "2456789",
"transactionFee": "1023.45",
"networkUtilization": "0.5234"
},
{
"time": "1753545600000",
"newAddressCount": "92104",
"totalTransactionCount": "1312456",
"totalContractCalls": "2401233",
"transactionFee": "987.12",
"networkUtilization": "0.5108"
}
]
}
]
}
