BitShares Forum

Main => General Discussion => Topic started by: Nesh on January 05, 2020, 11:05:28 pm

Title: Getting full account history
Post by: Nesh on January 05, 2020, 11:05:28 pm
Hi.
I'm trying to get my full account history (trades / filled orders specifically) for tax reasons, but I fail to find a service providing this.

In the past I have used bitsharescan.com but it now only shows the history for the past 12 months or so, for my account at least.

I have also found https://open-explorer.io/bitshares-account-exporter/ but I always end up getting an empty CSV file, and yes I am using the account ID and not the account name.
It is also strange because the open-explorer.io dashboard actually shows the full history, so I think just the CSV exporter is not working (see e.g. https://open-explorer.io/#/accounts/1.2.509850 - not my account). Who is running that website? I didn't find any way to contact them to potentially fix the exporter.

Is there any other website allowing to download the full account history (as CSV)?
Title: Re: Getting full account history
Post by: binggo on January 06, 2020, 12:40:11 am
https://bitshares-explorer.io (https://bitshares-explorer.io)

You can check all your account history, maybe you need to copy all of it.
Title: Re: Getting full account history
Post by: Nesh on January 06, 2020, 02:41:18 am
https://bitshares-explorer.io (https://bitshares-explorer.io)

You can check all your account history, maybe you need to copy all of it.

Thanks, but this links to the same CSV exporter which only creates an empty file. Manually copying from the website isn't an option as I have thousands of pages.

Title: Re: Getting full account history
Post by: abit on January 07, 2020, 03:09:37 am
Try https://wallet.bitshares.org ? There is a "download" button in the Dashboard-Activity page.
Title: Re: Getting full account history
Post by: startail on January 07, 2020, 08:45:03 pm
You can also use https://github.com/bitshares/bitshares-report to generate the same report as the one in the UI wallet.

The code can't export more than 10,000 rows at the moment, due to a limitation in the API call. There is a fix done to this that I will submit to the repository in a week or two, together with some more changes.

The UI wallet does the same thing (and has same limitations), so there's no real difference.
Title: Re: Getting full account history
Post by: Nesh on January 08, 2020, 06:30:48 pm
Getting "Failed to download the account history, please try again" for every of the available nodes on wallet.bitshares.org

I guess I will wait for the improved/fixed script as 10k rows isn't suitable for me anyway.
Title: Re: Getting full account history
Post by: Nesh on January 08, 2020, 07:48:53 pm
@startail
Not sure if you already know this or if my info is wrong(I couldn't find a proper documentation anywhere), but following REST call allows me to get the full account history (past 10k operations):
https://explorer.bitshares-kibana.info/es/account_history?account_id=${account_id}&search_after=${start}&size=${limit}&sort_by=-account_history.sequence

With ${start} being index of the last to-be-fetched operation + 1.

E.g. to fetch the first 10 operations of an account:
https://explorer.bitshares-kibana.info/es/account_history?account_id=${account_id}&search_after=11&size=10&sort_by=-account_history.sequence
Title: Re: Getting full account history
Post by: startail on January 23, 2020, 04:17:48 pm
@Nesh, that is indeed the way you have to do to resolve more than 10,000 OPs. This will be supplied as a patch to the UI and Bitshares-report.
Title: Re: Getting full account history
Post by: Nesh on January 23, 2020, 10:02:58 pm
Thanks, I have already patched bitshares-ui myself and it worked like a charm for 800k+ operations :)
Title: Re: Getting full account history
Post by: BitsharesLabs on January 24, 2020, 10:19:46 am
Nice Nesh!

Is that on current wallet deployment or staging?
Title: Re: Getting full account history
Post by: sschiessl on January 24, 2020, 10:26:51 am
Thanks, I have already patched bitshares-ui myself and it worked like a charm for 800k+ operations :)

Would be awesome if you open a PR with your fix :)