Skip to content

add support for historical balances query#11749

Open
prettyirrelevant wants to merge 1 commit intorotki:developfrom
prettyirrelevant:improve-historical-balances
Open

add support for historical balances query#11749
prettyirrelevant wants to merge 1 commit intorotki:developfrom
prettyirrelevant:improve-historical-balances

Conversation

@prettyirrelevant
Copy link
Copy Markdown
Contributor

No description provided.

@prettyirrelevant prettyirrelevant force-pushed the improve-historical-balances branch from 70c4670 to 415a33d Compare February 26, 2026 11:14
)
assets = tuple(Asset(row[0]) for row in cursor)

processing_required, amounts = HistoricalBalancesManager(self.rotkehlchen.data.db).get_assets_amounts_event_metrics( # noqa: E501
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the get_assets_amounts_event_metrics function also needs removed now I guess.

Maybe I missed some of the discussion on this, but it looks like maybe the event_metrics table is not going to be used after all? will it be removed in another pr I guess? or are you still going to use that for something?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed get_assets_amounts_event_metrics. the table will still be useful, but for the reconciliation task, which is separate from what this pr does.

the tldr is that historical balance queries will be done on-demand, and only events matching the provided query will be used in the calculation

@prettyirrelevant prettyirrelevant force-pushed the improve-historical-balances branch from 415a33d to 7398329 Compare February 26, 2026 15:59
@prettyirrelevant prettyirrelevant force-pushed the improve-historical-balances branch from 7398329 to ecd5730 Compare February 26, 2026 16:03
@nicholasyoder nicholasyoder added the ready for final review Backend PR ready to be reviewed by great Lefteris label Feb 26, 2026
@yabirgb yabirgb added considering how to proceed and removed ready for final review Backend PR ready to be reviewed by great Lefteris labels Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment