Feature Request
Description of Problem:
When I select a trading account, I want to see a high-level summary of the account's trading activity (total trades, settled vs. pending, buy vs. sell volume) displayed prominently on the dashboard, so I can quickly assess the account's status without manually counting rows in the trade blotter.
Currently the stat cards at the top of the dashboard show basic derived values (e.g. tradeRowData.length). There is no dedicated API endpoint that returns aggregated account statistics, even though the backend already has a get_account_portfolio_summary() function in trade_processor.py that computes this data.
Potential Solutions:
- Add a new API endpoint
GET /account/{account_id}/summary that returns aggregated trade statistics (total trades, trades by state, buy/sell quantities, net quantity)
- The endpoint should leverage the existing
get_account_portfolio_summary() function in trade_processor.py rather than duplicating query logic
- Create a new React hook (
GetAccountSummary) to fetch the summary data
- Update the stat cards in the
Datatable component to display live data from the summary endpoint — replacing the current static/derived values
- Data should refresh when the user switches accounts
Acceptance Criteria:
Feature Request
Description of Problem:
When I select a trading account, I want to see a high-level summary of the account's trading activity (total trades, settled vs. pending, buy vs. sell volume) displayed prominently on the dashboard, so I can quickly assess the account's status without manually counting rows in the trade blotter.
Currently the stat cards at the top of the dashboard show basic derived values (e.g.
tradeRowData.length). There is no dedicated API endpoint that returns aggregated account statistics, even though the backend already has aget_account_portfolio_summary()function intrade_processor.pythat computes this data.Potential Solutions:
GET /account/{account_id}/summarythat returns aggregated trade statistics (total trades, trades by state, buy/sell quantities, net quantity)get_account_portfolio_summary()function intrade_processor.pyrather than duplicating query logicGetAccountSummary) to fetch the summary dataDatatablecomponent to display live data from the summary endpoint — replacing the current static/derived valuesAcceptance Criteria:
GET /account/{account_id}/summaryendpoint returns trade statistics JSON