Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: obtain an account's history for a specific asset and operation #413

Closed
derofim opened this issue Oct 8, 2017 · 5 comments
Closed

Comments

@derofim
Copy link

derofim commented Oct 8, 2017

Can we please have a call that returns asset activity history for account.

Example:

get_account_history_asset_operations(account_id, asset_id, operation_id, start, stop, limit)

where:
start, stop, limit are for pagination
account_id identifies an account
asset_id identifies an asset
operation_id filters the account history for only operations of this paticular type (e.g. transfer, limit_order_create but also virtual operations like order_filled)

@derofim derofim changed the title api: obtain an account's history for a specific asset api: obtain an account's history for a specific asset and operation Oct 8, 2017
@oxarbitrage
Copy link
Member

similar to what was requested initially here: #358

i had made the api call to get history by date several using different approaches, the last can be found at: #405

but it has been hard to get developer community approbation to include it. i will have no problem on make the exact call you need but the approach in bitshares is more generic and it will not include new calls that can be made by other ways.

in your case you can use get_relative_account_history and filter client side. get_history_by_date will probably be added and the operation_type filter can be included but we are probably going to find resistance to add a filter by asset as it only applies to a few operations, this was discarded.

the last proposition i made to include get_history_by_date is to have a separated explorer_api with this and other calls like yours disabled by default so only the nodes that want this calls will allow them.

if i get enough support for that i will be happy to make your calls, i have the conviction that more api calls is better but other devs think the opposite so is hard to get consensus.

@abitmore
Copy link
Member

@derofim: technically this is not hard to implement. Just make a new plugin by copying the account_history plugin and add asset_id and perhaps op_id everywhere. You can try to write one. I can help review.

@oxarbitrage
Copy link
Member

@derofim if you want to hold a bit i am working on a plugin that will move history into a database(elasticsearch). plugin purpose is to reduce ram while having all the history available and also be a general solution for this and other relational issues that are hard to do right now. stay tuned, i'll update on this on the next days.

@abitmore
Copy link
Member

I guess it can be done with ES now. Won't implement it in core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants