get_account_history

Api.get_account_history(account: str, op_limit: Union[list, str] = 'all', **kwargs) → List[dict][source]

Get the account history for a given account as a List[dict].

Optionally you can filter the operations returned using op_limit, as well as limit the number of operations with start_limit, and maximum operation age with age.

Basic usage:

>>> g = Api()
>>> # Return a list of 'transfer' operations for the account 'someguy123'
>>> hist = g.get_account_history('someguy123', op_limit='transfer')
>>> h[0]
{'from': 'someguy123', 'to': 'someguy123', 'amount': '0.100 GOLOS', 'memo': 'testing', 'number': 127290,
 'block': 30908474, 'timestamp': '2019-10-01T23:41:18', 'type_op': 'transfer',
 'trx_id': '80c7e0f7444f63074a52a8ba44cf066551706588'}
Parameters
  • account (str) – The username to load account history for, e.g. 'someguy123'

  • op_limit (list) – Only return operations of these types. Specify either as a list: ['transfer', 'vote'], or as a string, e.g. 'transfer' (only transfers) or 'all' (no filter)

  • kwargs – See below

Key int start_limit

Load at most this many history items (Default: 1000 items)

Key int age

Skip history items older than this many seconds (Default: 604800 seconds / 7 days)

Return List[dict] history

A list of dict history ops (see below for format)

dict(from, to, amount: str, memo, number, block, timestamp: str, type_op, trx_id)