Account History API

The history API is available from the full node via websockets.

If you have not set up your websockets connection, please read this article.


Account History

get_account_history

vector<operation_history_object> graphene::app::history_api::get_account_history(const std::string account_id_or_name, operation_history_id_type stop = operation_history_id_type(), unsigned limit = 100, operation_history_id_type start = operation_history_id_type()) const

Get operations relevant to the specificed account.

Return

A list of operations performed by account, ordered from most recent to oldest.

Parameters
  • account_id_or_name: The account ID or name whose history should be queried

  • stop: ID of the earliest operation to retrieve

  • limit: Maximum number of operations to retrieve (must not exceed 100)

  • start: ID of the most recent operation to retrieve

get_account_history_operations

vector<operation_history_object> graphene::app::history_api::get_account_history_operations(const std::string account_id_or_name, int operation_id, operation_history_id_type start = operation_history_id_type(), operation_history_id_type stop = operation_history_id_type(), unsigned limit = 100) const

Get only asked operations relevant to the specified account.

Return

A list of operations performed by account, ordered from most recent to oldest.

Parameters
  • account_id_or_name: The account ID or name whose history should be queried

  • operation_id: The ID of the operation we want to get operations in the account( 0 = transfer , 1 = limit order create, …)

  • stop: ID of the earliest operation to retrieve

  • limit: Maximum number of operations to retrieve (must not exceed 100)

  • start: ID of the most recent operation to retrieve

get_relative_account_history

vector<operation_history_object> graphene::app::history_api::get_relative_account_history(const std::string account_id_or_name, uint32_t stop = 0, unsigned limit = 100, uint32_t start = 0) const

Get operations relevant to the specified account referenced by an event numbering specific to the account. The current number of operations for the account can be found in the account statistics (or use 0 for start).

Return

A list of operations performed by account, ordered from most recent to oldest.

Parameters
  • account_id_or_name: The account ID or name whose history should be queried

  • stop: Sequence number of earliest operation. 0 is default and will query ‘limit’ number of operations.

  • limit: Maximum number of operations to retrieve (must not exceed 100)

  • start: Sequence number of the most recent operation to retrieve. 0 is default, which will start querying from the most recent operation.



Market History

get_fill_order_history

vector<order_history_object> graphene::app::history_api::get_fill_order_history(asset_id_type a, asset_id_type b, uint32_t limit) const

get_market_history

vector<bucket_object> graphene::app::history_api::get_market_history(asset_id_type a, asset_id_type b, uint32_t bucket_seconds, fc::time_point_sec start, fc::time_point_sec end) const

get_market_history_buckets

flat_set<uint32_t> graphene::app::history_api::get_market_history_buckets() const