Module Group: Base
Parsing Order: 100
Database Size: 24.289 GB
The chain_api provides access to chain statistics, account names, post links, and general blockchain information.
{
"id": "chain_api",
"group_id": "base",
"parsing_order": 100,
"referenced_modules": ["communities_api"],
"parse_reversible": true,
"parsed_virtual_ops": true,
"parsed_ops": true,
"available_events": [
"onCreateAccount",
"onCreatePost",
"onUpdatePost",
"onRemovePost",
"onVote",
"onAuthorReward"
]
}
Returns this module's active configuration.
Endpoint
/chain_api/getConfig
Result: JSON Object
Returns general chain statistics.
Endpoint
/chain_api/getChainStats
Example Response:
{
"code": 0,
"result": {
"count_transactions": 1535263458,
"count_operations": 1629165053,
"count_virtual_operations": 380362149,
"count_accounts": 1947317,
"count_witnesses": 1764,
"count_posts": 26471971,
"count_comments": 86383190,
"count_deleted_posts": 268485,
"count_deleted_comments": 506037
}
}
Returns statistics about all parsed Steem operations.
Endpoint
/chain_api/getOperationStats
Example Response (partial):
{
"code": 0,
"result": {
"cols": {"id": 0, "name": 1, "is_virtual": 2, "first_block": 3, "total_count": 4},
"rows": [
[1, "producer_reward", 1, 1, 101492798],
[3, "transfer", 0, 25502, 82804808],
[7, "comment", 0, 174444, 126550802],
[8, "vote", 0, 176493, 930187613],
[19, "custom_json", 0, 2022313, 354766783],
[22, "curation_reward", 1, 2889020, 273484265],
[23, "author_reward", 1, 2889020, 26880571],
[43, "delegate_vesting_shares", 0, 10630195, 19758375],
[45, "claim_reward_balance", 0, 10635691, 54486556]
]
}
}
Top Operations by Count:
| Operation | Count |
|---|---|
| vote | 930,187,613 |
| custom_json | 354,766,783 |
| curation_reward | 273,484,265 |
| comment | 126,550,802 |
| producer_reward | 101,492,798 |
| transfer | 82,804,808 |
| claim_reward_balance | 54,486,556 |
Returns general block information for the nearest block to the given timestamp.
Endpoint
/chain_api/getBlockInfoByTime/:blockTime
Example
/chain_api/getBlockInfoByTime/1766931734
Parameters
| Name | Type | Optional |
|---|---|---|
:blockTime |
int (Unix timestamp) | No |
Result: JSON Object
Returns a list of all account names.
Endpoint
/chain_api/getAccountNames/:limit?/:offset?
Parameters
| Name | Type | Optional | Default | Min | Max |
|---|---|---|---|---|---|
:limit |
int | Yes | 1000 | 1 | 10000 |
:offset |
int | Yes | 0 | 0 | - |
Max Limit: 10000
Result: JSON Array
Returns a list of all account names starting with the given prefix.
Endpoint
/chain_api/getAccountNamesByPrefix/:prefix/:limit?/:offset?
Example
/chain_api/getAccountNamesByPrefix/steem/10
Example Response:
{
"code": 0,
"result": [
"steem",
"steem--cn",
"steem-01",
"steem-1",
"steem-111",
"steem-123",
"steem-1up",
"steem-2018",
"steem-22-sarx",
"steem-39"
]
}
Parameters
| Name | Type | Optional | Default | Min | Max |
|---|---|---|---|---|---|
:prefix |
string | No | - | - | - |
:limit |
int | Yes | 100 | 1 | 1000 |
:offset |
int | Yes | 0 | 0 | - |
Returns general link information for an author/permlink combination.
Endpoint
/chain_api/getLink/:author/:permlink
Example
/chain_api/getLink/steemit/firstpost
Example Response:
{
"code": 0,
"result": {
"id": 1,
"created": 1459362618,
"updated": 1459362618,
"root_id": 0,
"parent_id": 0,
"category_id": 15,
"community_id": 0,
"depth": 0,
"children": 441,
"status_id": 0,
"author_id": 29,
"url": "firstpost"
}
}
Returns general link information for a given link ID.
Endpoint
/chain_api/getLinkById/:linkId
Example
/chain_api/getLinkById/1
Example Response:
{
"code": 0,
"result": {
"id": 1,
"created": 1459362618,
"updated": 1459362618,
"depth": 0,
"children": 441,
"author_id": 29,
"url": "firstpost"
}
}
Returns a list of all used posting platforms (e.g., steemit, peakd, ecency).
Endpoint
/chain_api/getPostingPlatforms/:limit?/:offset?
Example
/chain_api/getPostingPlatforms/20/0
Example Response:
{
"code": 0,
"result": {
"cols": {"id": 0, "name": 1},
"rows": [
[1, "steemit/0.1"],
[2, "steemit/0.2"],
[3, "esteem/undefined"],
[10, "busy/0.0.1"],
[11, "steemsports/0.1"],
[15, "steepshot/0.0.1"],
[18, "steemdb/0.1"]
]
}
}
Max Limit: 10000
Returns a list of all historical vesting share rates (daily average STEEM per VEST), grouped by day.
Endpoint
/chain_api/getDailyAverageShareRates
Result: JSON Array
The chain_api supports special comment commands for administrative actions:
| Command | Description | Allowed Accounts |
|---|---|---|
SDS.setAccountStatus |
Set account status (normal, hidden, spammer, phisher) | steemchiller |
SDS.activateAccountContentHistory |
Activate content history for an account | Creator, steemchiller |
SDS.deactivateAccountContentHistory |
Deactivate content history for an account | Creator, steemchiller |
SDS.setPostStatus |
Set post status (normal, hidden, deleted) | steemchiller |
SDS.activatePostContentHistory |
Activate content history for a post | Creator, steemchiller |
SDS.deactivatePostContentHistory |
Deactivate content history for a post | Creator, steemchiller |