Skip to content

Commit

Permalink
added account ID and name descriptors to returned json
Browse files Browse the repository at this point in the history
  • Loading branch information
pazwicker committed Jan 13, 2024
1 parent 7189700 commit e4a1e7a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions monarchmoney/monarchmoney.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,9 +711,16 @@ async def get_account_history(self, account_id: int) -> Dict[str, Any]:
variables=variables,
)

balance_history = account_details["snapshots"]
# Parse JSON
account_name = account_details["account"]["displayName"]
account_balance_history = account_details["snapshots"]

return balance_history
# Append account identification data to account balance history
for i in account_balance_history:
i.update(dict(accountId=str(account_id)))
i.update(dict(accountName=account_name))

return account_balance_history

async def get_institutions(self) -> Dict[str, Any]:
"""
Expand Down

0 comments on commit e4a1e7a

Please sign in to comment.