Get Contract Call Statistics
1. Overview & Typical Use
Returns the top caller addresses, top called methods, and cumulative call count summary for a contract.
- Typical use: analyze the main caller distribution of a contract, understand the most frequently called methods, evaluate contract activity.
- When not to use: to view daily unique caller counts by time range use “Get Contract Daily Unique Caller Count”; to see the full caller list use “Get All Contract Callers”.
2. Endpoint & Authentication
GET /api/contracts/top_call
For Base URL and authentication, see Common Network & Authentication.
3. Request
Fields
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
contract_address | string | Yes | — | Contract address (Base58, starts with T) |
4. Response
Fields
Top-level
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
recentCallTimes | integer | Required | Total recent calls | — |
timeLong | integer | Required | Statistics period start | millisecond timestamp |
totalAddress | integer | Required | Cumulative unique caller count | — |
totalCallTimes | integer | Required | Cumulative total call count | — |
topAddress | array | Required | Top caller address list | — |
topMethods | array | Required | Top called method list | — |
contractMap | object | Required | Address → whether it is a contract (may be empty object when querying the contract itself) | — |
contractInfo | object | Required | Contract address → label info (may be empty object when querying the contract itself) | — |
topAddress[] element
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
address | string | Required | Caller address | — |
addressTag | string | Optional | Address label | — |
count | integer | Required | Call count | — |
ratio | number | Required | Call share | — |
topMethods[] element
| Field | Type | Required | Description | Unit/Precision |
|---|---|---|---|---|
methodId | string | Required | Method selector | — |
times | integer | Required | Call count | — |
ratio | number | Required | Call share | — |
5. Errors
For HTTP status codes, see Common Errors. Key points for this endpoint:
- Contract address does not exist: returns
200+ empty arrays and zero counts. - Empty result is not an error: when the contract has no call records, this is a normal response.
Last updated on: