Skip to content

Create an endpoint to fetch all account transactions at once with no query limit so we can give users there STX txs for tax reporting #1862

Open
@BLuEScioN

Description

@BLuEScioN

Context: https://hiropbc.slack.com/archives/C03UFUA5Q65/p1707775272136679

Trust Machines is trying to use the "Export as CSV" feature on the explorer to get a CSV of their transactions to use in filing their taxes. There are a couple issues they are running into:

The one that concerns the API is

The button only returns max 30 txs (the latest ones) because the endpoint has a query limit. In order to fetch all the transactions, the explorer would have to query for account txs in a loop until all ts have been fetched. The issue here is that would potentially cause rate limit issues, cause load issues on the API, and make bloat the FE with logic to handle all these concerns and the edge cases.

As it currently stands, I consider the "Export as CSV" button broken as it not only does not return all the txs but it misleadingly does so since it does not inform the user of the trnsaction cap or error out.

Can we create an endpoint that returns all of an account's txs with one query?

@rafaelcr pointed out there is a lot of data returned but the current endpoint (https://docs.hiro.so/api/get-account-transactions) that can be stripped out to make the page size smaller and the memory load on the server more maneagable.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

📋 Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions