frontend-monorepo
frontend-monorepo copied to clipboard
Account history
Depends on https://github.com/vegaprotocol/pennant/issues/625
Story
As a user I want to be able to inspect my account history So that I can understand the value of my portfolio over time
This would use the balanceChanges api, no subscription required
Acceptance Criteria
- [ ] I can see my account balance for an asset over time on a chart
- [ ] I can select a different asset
- [ ] I can multi select different account types
- [ ] Default account type is General
- [ ] Default asset is whatever is first when listed alphabetically
- [ ] I can select different time ranges
- 1D, 7D, 1M, 3M, 1Y, YTD, ALL
Sketch

Tasks
- [ ] Add a sketch of what we talked about to help illustrate what needs to be done
- [ ] Link to coin market cap example for reference
So I've been looking into this today, there isn't really a specific API for historical positions. The positionsConnection query is historical in the sense that it will show all positions regardless of state. However what we can do is show account history over time via the balanceChanges query and allow for filtering by asset, account type, date and market
I've updated this ticket accordingly and deleted comments for clarity
Opportunity for later... could link this up with ledger entries to be able to identify where spikes and dips are just due to you depositing/ withdrawing etc.
AND select multiple accounts to show