-
Couldn't load subscription status.
- Fork 98
fix: new pnl endpoint #1937
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: new pnl endpoint #1937
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| const [daily, hourly] = await Promise.all([dailyResults, hourlyResults]); | ||
| return orderBy([...daily, ...hourly], [(p) => p.createdAtMilliseconds], ['asc']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qq: how come we combine daily + hourly responses into a single array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's basically the same thing we do for megavault pnl - it means the most recent end of the line is high resolution and the further from now you go you get lower res. I know it doesn't look perfect but I find it is an elegant solution and looks okay.
| const [daily, hourly] = await Promise.all([dailyResults, hourlyResults]); | ||
| return orderBy([...daily, ...hourly], [(p) => p.createdAtMilliseconds], ['asc']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's basically the same thing we do for megavault pnl - it means the most recent end of the line is high resolution and the further from now you go you get lower res. I know it doesn't look perfect but I find it is an elegant solution and looks okay.
| }, 'parentSubaccountHistoricalPnls'), | ||
| const [daily, hourly] = await Promise.all([dailyResults, hourlyResults]); | ||
| return orderBy([...daily, ...hourly], [(p) => p.createdAtMilliseconds], ['asc']); | ||
| }, 'parentSubaccountHistoricalPnlsV2'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
log id is here
|
gonna hold off on deploying while david makes sure this endpoint isn't totally broken |
Should be much faster now