Feat/portfolio pnl 2#1125
Merged
w84april merged 30 commits intofeat/portfolio-history-apifrom Apr 6, 2026
Merged
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
|
When visiting the portfolio page, I get 502 errors on the api/holdings endpoint for multiple wallets (although one worked, but was not showing the correct balance) Is there a way to test the PNL endpoint from the UI or does it need to be called from a CLI? |
Collaborator
Author
|
@rossgalloway my bad, this should have been drafted instead. this pr focuses on pnl api and likely breaks related stuff |
* feat: init excessive * chore: naming * feat: actually add drilldown * fix: v2/v3 filter * fix: version * fix: env * feat: cover crvusd rewards * feat: vault to vault migrate via enso * feat: init katana rewards * chore: upd receiver address * feat: fix bold * feat: add fetchType + paginationMode * feat: support fetchtype + pagination on vercel
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a new holdings PnL engine for
GET /api/holdings/pnl.It adds:
strict,zero_basis, andwindfallstatus,costBasisStatus,isComplete) so the API makes uncertainty explicitapi/lib/holdings/PNL.mdHow Has This Been Tested?
Automated:
api/lib/holdings/services/pnl.test.tsapi/lib/holdings/services/defillama.test.tsbun run tslintbun run lint:fixManual:
GET /api/holdings/pnlagainst real wallets with deposits, withdrawals, staking wrappers, and transfer-heavy histories