diff --git a/monarchmoney/monarchmoney.py b/monarchmoney/monarchmoney.py index d69b280..9ffa606 100644 --- a/monarchmoney/monarchmoney.py +++ b/monarchmoney/monarchmoney.py @@ -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]: """