feat(portfolio): expose corporate actions in unified ledger

This commit is contained in:
2026-09-13 13:52:50 +09:00
parent 77468631b1
commit a4664f5991
7 changed files with 96 additions and 8 deletions
+4 -1
View File
@@ -437,7 +437,10 @@
- Auth: same owner-scoped user/session token policy as manual write.
- Query: `limit` 1..200, default 50.
- Response: `ManualLedgerHistoryResponse {"items": [ManualLedgerResponse], "total": <int>}` ordered newest first.
- `GET /v1/portfolios/{id}/ledger` returns corporate-action events as a distinct `CorporateActionLedgerHistoryItem` with event ID/type, effective date, before/after quantity and WAC, total cost basis, cash/profit buffer, evidence, actor, and recorded time. These events are never represented as BUY/SELL trades.
- `GET /v1/portfolios/{id}/trades` remains restricted to BUY/SELL history.
- `portfolio corporate-action` is the operator command; it requires an idempotency key and confirmation unless `--force` is supplied.
### Endpoint: `GET /v1/portfolios/{portfolio_id}/returns/summary` (REQ-056, BAT-024)