-
-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add queries for net value, recent daily account values #93
Conversation
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.
Thanks, @keegandahm ! I completely agree with you on using the date
type for a function param. However, as of now, the rest of the library is using str
. I'd like to keep it consistent, even if not ideal.
It's worth starting a discussion, if you'd like, to see if it's worth migrating the whole library over to using date
types. It would give us some more guarantees and is probably the better long-term way to go.
monarchmoney/monarchmoney.py
Outdated
Note, `month` is not a full ISO datestring, as it doesn't include the day. | ||
Instead it looks like, e.g., 2023-01 |
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.
wow, that's fun. thanks, Monarch!
monarchmoney/monarchmoney.py
Outdated
@@ -248,6 +248,112 @@ async def get_account_type_options(self) -> Dict[str, Any]: | |||
graphql_query=query, | |||
) | |||
|
|||
async def get_recent_account_balances( | |||
self, start_date: Optional[date] = None |
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.
For now, please change the start_date
param and others in this PR to str
.
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.
Changed this to a str
@keegandahm , if you'd like this included in the next PyPI version, please update with requested changes and I'll merge it in. Thanks! |
Hey @hammem, just give me a bit and I'll add these changes today |
Hey @hammem, I've made the changes you requested. Regarding moving the library over to That said, consistency is also very important. One way I can think of to softly transition existing functions to Let me know if there are any other changes you want, thanks! |
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.
Thanks, @keegandahm !
This PR adds 3 queries, for retrieving
aggregateSnapshots
,snapshotsByAccountType
, andaccounts.recentBalances
.recentBalances
is used by the web app to retrieve the daily value of a given account, primarily to generate the sparklines seen on the Accounts page.snapshotsByAccountType
is used by the web app to generate the bar charts showing different account types' contributions to your net worth, on the Accounts page.aggregateSnapshots
is used by the mobile app to show your historical daily net worth, or to see the historical value of certain account types, e.g. cash, loans, brokerage, etc..