account_history_api

Module Group: Accounts
Parsing Order: 310
Database Size: 14.715 GB

The account_history_api provides access to account operation history. It stores the last 90 days of operations starting from block 70,000,000.


Configuration

{
   "db_path": "~/sds_data1",
   "store_days": 90,
   "from_block": 70000000,
   "id": "account_history_api",
   "group_id": "accounts",
   "parsing_order": 310,
   "required_modules": ["chain_api"],
   "accounts_filter": [],
   "parse_reversible": true,
   "parsed_virtual_ops": true,
   "parsed_ops": true
}

Key Settings:

Setting Value Description
store_days 90 Days of history retained
from_block 70000000 Starting block number
parsed_virtual_ops true Includes virtual operations
parsed_ops true Includes regular operations

Endpoints

getConfig

Returns this module's active configuration.

Endpoint

/account_history_api/getConfig

History Data

getHistoryByTime

Returns account history for a specific time range.

Endpoint

/account_history_api/getHistoryByTime/:account/:fromTime-:toTime/:limit?/:offset?

Example

/account_history_api/getHistoryByTime/steemchiller/1767000000-1767630000/10

Parameters

Name Type Optional Default Description
:account string No - Account name
:fromTime int No - Start time (Unix timestamp)
:toTime int No - End time (Unix timestamp)
:limit int Yes 100 Max results
:offset int Yes 0 Result offset

Example Response:

{
   "code": 0,
   "result": {
      "cols": {"id": 0, "time": 1, "block_num": 2, "trans_index": 3, "op_index": 4, "virtual": 5, "op": 6},
      "rows": [
         [265381895, 1767000048, 102135392, -1, 0, 1, 
            ["producer_reward", {"producer": "steemchiller", "vesting_shares": "447.380794 VESTS"}]
         ],
         [265382084, 1767000159, 102135429, -1, 0, 1, 
            ["producer_reward", {"producer": "steemchiller", "vesting_shares": "447.380753 VESTS"}]
         ],
         [265382680, 1767000603, 102135578, 0, 0, 0, 
            ["witness_set_properties", {"owner": "steemchiller", "props": [...]}]
         ]
      ]
   }
}

Column Definitions:

Column Description
id Operation ID
time Unix timestamp
block_num Block number
trans_index Transaction index (-1 for virtual ops)
op_index Operation index within transaction
virtual 1 = virtual op, 0 = regular op
op Operation array [type, data]

getHistoryByOpTypesTime

Returns account history filtered by operation types and time range.

Endpoint

/account_history_api/getHistoryByOpTypesTime/:account/:opTypes/:fromTime-:toTime/:limit?/:offset?

Example

/account_history_api/getHistoryByOpTypesTime/steemchiller/vote,transfer/1767000000-1767630000/10

Parameters

Name Type Optional Description
:account string No Account name
:opTypes csv No Comma-separated operation types
:fromTime int No Start time (Unix)
:toTime int No End time (Unix)
:limit int Yes Max results
:offset int Yes Result offset

Example Response:

{
   "code": 0,
   "result": {
      "cols": {"id": 0, "time": 1, "block_num": 2, "trans_index": 3, "op_index": 4, "virtual": 5, "op": 6},
      "rows": [
         [265392977, 1767006663, 102137593, 0, 0, 0, 
            ["transfer", {
               "from": "boylikegirl.wit", 
               "to": "steemchiller", 
               "amount": "0.196 STEEM", 
               "memo": "Witness vote rewards..."
            }]
         ],
         [265415214, 1767017925, 102141338, 3, 0, 0, 
            ["vote", {
               "voter": "steemchiller", 
               "author": "eka99", 
               "permlink": "always-be-productive-cleaning-the-office-area-with-friends", 
               "weight": 10000
            }]
         ],
         [265425954, 1767022584, 102142886, 0, 0, 0, 
            ["vote", {
               "voter": "steemchiller", 
               "author": "tangmo", 
               "permlink": "beautiful-flowers-in-chatuchak-park-bangkok", 
               "weight": 7500
            }]
         ]
      ]
   }
}

Available Operation Types:


author_reward Operation Details

The author_reward is a virtual operation generated when a post/comment pays out (7 days after creation).

Example Request:

https://sds.steemworld.org/account_history_api/getHistoryByOpTypesTime/steemchiller/author_reward/1766326934-1766931734

Example Response:

{
  "code": 0,
  "result": {
    "cols": {
      "id": 0,
      "time": 1,
      "block_num": 2,
      "trans_index": 3,
      "op_index": 4,
      "virtual": 5,
      "op": 6
    },
    "rows": [
      [264390750, 1766414589, 101940974, -1, 7, 1, [
        "author_reward", {
          "author": "steemchiller",
          "permlink": "t7bfjx",
          "sbd_payout": "0.000 SBD",
          "steem_payout": "0.306 STEEM",
          "vesting_payout": "503.686359 VESTS"
        }
      ]],
      [265106636, 1766834457, 102080319, -1, 8, 1, [
        "author_reward", {
          "author": "steemchiller",
          "permlink": "t7kfix",
          "sbd_payout": "0.000 SBD",
          "steem_payout": "0.494 STEEM",
          "vesting_payout": "814.504710 VESTS"
        }
      ]]
    ]
  }
}

author_reward Fields:

Field Type Description
author string Post/comment author username
permlink string Post/comment permlink
sbd_payout string SBD amount received (e.g., "1.234 SBD")
steem_payout string STEEM amount received (e.g., "0.306 STEEM")
vesting_payout string Steem Power in VESTS (e.g., "503.686359 VESTS")

Payout Rules (based on SBD debt ratio):

Debt Ratio sbd_payout steem_payout vesting_payout
≤ 9% SBD amount 0.000 STEEM VESTS (SP)
9% - 10% Partial SBD Partial STEEM VESTS (SP)
> 10% 0.000 SBD Full STEEM VESTS (SP)

Note: When SBD debt ratio exceeds 10%, no SBD is printed and the liquid reward is paid entirely in STEEM. The vesting_payout (SP) is always locked and cannot be transferred.


getHistoryFromStartId

Returns account history starting from a specific operation ID.

Endpoint

/account_history_api/getHistoryFromStartId/:account/:startId/:limit?/:offset?

Example

/account_history_api/getHistoryFromStartId/steemchiller/265400000/10

Parameters

Name Type Optional Description
:account string No Account name
:startId int No Starting operation ID
:limit int Yes Max results
:offset int Yes Result offset

Result: JSON Object with operation history


History State

getLastOpId

Returns the last (most recent) operation ID for an account.

Endpoint

/account_history_api/getLastOpId/:account

Example

/account_history_api/getLastOpId/steemchiller

Example Response:

{
   "code": 0,
   "result": 266465074
}

getLastOpIds

Returns both the last virtual operation ID and last regular operation ID for an account.

Endpoint

/account_history_api/getLastOpIds/:account

Example

/account_history_api/getLastOpIds/steemchiller

Example Response:

{
   "code": 0,
   "result": {
      "last_vop_id": 266465074,
      "last_op_id": 266462785
   }
}

Fields:

Field Description
last_vop_id Last virtual operation ID (rewards, etc.)
last_op_id Last regular operation ID (votes, transfers, etc.)

Back to Main Index