Closed
Conversation
… values are derived from the same trade
Features/account pnls calendar
…turing function parameters
…nts controller tests
Update dependencies
…line visualization of PnL
…vent injection vulnerabilities
…and caching; update AppService to utilize new syncAllFromApi method for initialization and cron job; adjust portfolio service tests to reflect method name changes
… parameters and enhancing error logging; clean up unnecessary whitespace in AppService
…ming logic; ensure rates are only refreshed when null
…rove cache management; streamline price feed controller by removing unused cache manager
…L history with optional date range and interval; enhance portfolio service to support per-token PnL breakdown
…maries and descriptions; update query DTO for clarity on included fields
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
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.

Note
Medium Risk
Introduces new API endpoints and changes how PnL/price data is sourced (more cache-driven), which could affect response contents and freshness; functionality is covered by new unit tests but touches finance-related data paths.
Overview
Adds two new account portfolio endpoints: a dedicated
GET :address/portfolio/tokens/historythat always includes per-tokentokens_pnl, andGET :address/portfolio/pnl-chart.svgthat returns an SVG sparkline of realized PnL (hourly for <=24h ranges, daily otherwise) using a new lightweightPortfolioService.getPnlTimeSeriespath.Refines portfolio history semantics so
/portfolio/historyonly includes aggregate PnL when requested and no longer returns per-token breakdown by default, updates Swagger/DTO documentation accordingly, and extends tests to cover the new chart endpoint and PnL time-series behavior.Reworks CoinGecko usage to be cache/cron-driven (no API calls on service instantiation), simplifies the price-feed history endpoint by dropping “minute” interval/aggregation logic, and updates/removes various dependencies (notably dropping
mysql2,ts-loader, and adjusting Nest/GraphQL/PG and related packages).Written by Cursor Bugbot for commit 033201e. This will update automatically on new commits. Configure here.