Creates an instance of StatisticsModule.
Configuration object for the statistics module
Protected
baseBase URL for the API endpoints
Protected
Optional
apiOptional API key for authenticated requests
Protected
loggerLogger instance for statistics operations
Protected
fetchProtected
Makes an API request with the given parameters. Handles parameter sanitization, API key inclusion, and error handling.
API endpoint to call
Query parameters
Promise resolving to the API response
Get current network supply statistics. Retrieves information about the current CFX token supply.
Current supply statistics
Get mining statistics over time. Retrieves mining-related metrics for specified time intervals.
Parameters for mining statistics query
Parameters for mining statistics
MiningParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Optional
intervalType?: StatsIntervalTypeInterval for data aggregation
Mining statistics
Get transactions per second (TPS) statistics. Retrieves TPS metrics for specified time intervals.
Parameters for TPS statistics query
Parameters for TPS (Transactions Per Second) statistics
TpsParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Optional
intervalType?: StatsIntervalTypeInterval for data aggregation
TPS statistics
Get contract deployment and interaction statistics. Retrieves metrics about smart contract usage on the network.
Parameters for contract statistics query
Parameters for contract statistics
ContractParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Contract statistics
Get CFX token holder statistics. Retrieves information about CFX token holders and distribution.
Parameters for CFX holder statistics query
Parameters for CFX holder statistics
CfxHolderParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
CFX holder statistics
Get account growth statistics. Retrieves metrics about new account creation and network growth.
Parameters for account growth statistics query
Parameters for account growth statistics
AccountGrowthParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Account growth statistics
Get active account statistics. Retrieves metrics about account activity on the network.
Parameters for active account statistics query
Parameters for account activity statistics
AccountActiveParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Active account statistics
Get overall active account statistics. Retrieves comprehensive metrics about account activity across the network.
Parameters for overall active account statistics query
Parameters for overall account activity statistics
ActiveOverallParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Overall active account statistics
Get transaction statistics. Retrieves metrics about transaction activity on the network.
Parameters for transaction statistics query
Parameters for transaction statistics
TransactionParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Transaction statistics
Get CFX transfer statistics. Retrieves metrics about CFX token transfers on the network.
Parameters for CFX transfer statistics query
Parameters for CFX transfer statistics
CfxTransferParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
CFX transfer statistics
Get token transfer statistics. Retrieves metrics about token transfers (excluding CFX) on the network.
Parameters for token transfer statistics query
Parameters for token transfer statistics
TokenTransferParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Optional
contract?: stringToken contract address
Token transfer statistics
Get top gas users statistics. Retrieves statistics about accounts with highest gas consumption.
Parameters for top gas users query
Parameters for top gas used statistics
TopGasUsedParams
Optional
spanType?: StatsPeriodTime span for ranking calculation
Top gas users statistics
Get top miners statistics. Retrieves statistics about the most active miners on the network.
Parameters for top miners query
Parameters for top miner statistics
TopMinerParams
Optional
spanType?: StatsPeriodTime span for ranking calculation
Top miners statistics
Get top transaction senders statistics. Retrieves statistics about accounts that send the most transactions.
Parameters for top senders query
Parameters for top transaction sender statistics
TopTransactionSenderParams
Optional
spanType?: StatsPeriodTime span for ranking calculation
Top transaction senders statistics
Get top transaction receivers statistics. Retrieves statistics about accounts that receive the most transactions.
Parameters for top receivers query
Parameters for top transaction receiver statistics
TopTransactionReceiverParams
Optional
spanType?: StatsPeriodTime span for ranking calculation
Top transaction receivers statistics
Get top CFX senders statistics. Retrieves statistics about accounts that send the most CFX tokens.
Parameters for top CFX senders query
Parameters for top CFX sender statistics
TopCfxSenderParams
Optional
spanType?: StatsPeriodTime span for ranking calculation
Top CFX senders statistics
Get top CFX receivers statistics. Retrieves statistics about accounts that receive the most CFX tokens.
Parameters for top CFX receivers query
Parameters for top CFX receiver statistics
TopCfxReceiverParams
Optional
spanType?: StatsPeriodTime span for ranking calculation
Top CFX receivers statistics
Get top token transfer statistics. Retrieves statistics about the most frequently transferred tokens.
Parameters for top token transfers query
Parameters for top token transfer statistics
TopTokenTransferParams
Optional
spanType?: StatsPeriodTime span for ranking calculation
Top token transfer statistics
Get top token receivers statistics. Retrieves statistics about accounts that receive the most tokens.
Parameters for top token receivers query
Parameters for top token receiver statistics
TopTokenReceiverParams
Optional
spanType?: StatsPeriodTime span for ranking calculation
Top token receivers statistics
Get top token participant statistics. Retrieves statistics about the most active participants in token transfers.
Parameters for top token participants query
Parameters for top token participant statistics
TopTokenParticipantParams
Optional
spanType?: StatsPeriodTime span for ranking calculation
Top token participant statistics
Get token holder statistics. Retrieves statistics about token holders and distribution.
Parameters for token holder statistics query
Parameters for token holder statistics
TokenHolderParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Token contract address
Token holder statistics
Get unique sender statistics. Retrieves statistics about unique transaction senders.
Parameters for unique senders query
Parameters for unique token sender statistics
UniqueSenderParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Token contract address
Unique sender statistics
Get unique receiver statistics. Retrieves statistics about unique transaction receivers.
Parameters for unique receivers query
Parameters for unique token receiver statistics
UniqueReceiverParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Token contract address
Unique receiver statistics
Get unique participant statistics. Retrieves statistics about unique participants in transactions.
Parameters for unique participants query
Parameters for unique token participant statistics
UniqueParticipantParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Token contract address
Unique participant statistics
Get block base fee statistics. Retrieves statistics about block base fees over time.
Parameters for block base fee statistics query
Parameters for block base fee statistics
BlockBasefeeParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Block base fee statistics
Get block average priority fee statistics. Retrieves statistics about average priority fees in blocks.
Parameters for block priority fee statistics query
Parameters for block average priority fee statistics
BlockAvgpriorityfeeParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Block average priority fee statistics
Get block gas used statistics. Retrieves statistics about gas usage in blocks.
Parameters for block gas usage statistics query
Parameters for block gas used statistics
BlockGasusedParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Block gas usage statistics
Get block transactions by type statistics. Retrieves statistics about different types of transactions in blocks.
Parameters for block transaction types statistics query
Parameters for block transactions by type statistics
BlockTxsbytypeParams
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Block transactions by type statistics
Module for handling statistics and analytics operations on Conflux Core. Provides methods for querying network metrics, account statistics, transaction data, and various other blockchain analytics.
StatisticsModule