Skip to content
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

Missing transactions #46

Closed
emann3 opened this issue Nov 20, 2023 · 2 comments · Fixed by #41
Closed

Missing transactions #46

emann3 opened this issue Nov 20, 2023 · 2 comments · Fixed by #41
Labels
bug Something isn't working

Comments

@emann3
Copy link

emann3 commented Nov 20, 2023

if MonarchMoney marks a transaction as Recurring, it does not come down as part of the get_transactions function and you have to call get_transactions twice: once with is_recurring=true and once with it as false in order to get all transactions.

Is there a way to make get_transactions NOT filter on recurring if thats what the user wants?

Similar issue on all of the Boolean parameters to get_transactions: has_attachments, has_notes, hidden_from_reports, is_split

But only recurring seems to be something that MonarchMoney sets by itself on a transaction, the rest get downloaded unless I have done something to the transaction, so I can control that.

@grablair
Copy link
Collaborator

Hmm, IMO the default get_transactions (i.e. with no filter args) should return all transactions, so this sounds like unintended behavior.

We default to False for a number of filters:

async def get_transactions(
self,
limit: int = 1000,
offset: Optional[int] = 0,
start_date: Optional[str] = None,
end_date: Optional[str] = None,
search: str = "",
category_ids: List[str] = [],
account_ids: List[str] = [],
tag_ids: List[str] = [],
has_attachments: bool = False,
has_notes: bool = False,
hidden_from_reports: bool = False,
is_split: bool = False,
is_recurring: bool = False,
) -> Dict[str, Any]:

And always add them as filters in the API call variables:

variables = {
"offset": offset,
"limit": limit,
"orderBy": "date",
"filters": {
"search": search,
"categories": category_ids,
"accounts": account_ids,
"tags": tag_ids,
"hasAttachments": has_attachments,
"hasNotes": has_notes,
"hideFromReports": hidden_from_reports,
"isRecurring": is_recurring,
"isSplit": is_split,
},
}

These should probably be None and then we should not add them as filters in the API call variables if they aren't specified by the user.

@hammem
Copy link
Owner

hammem commented Nov 22, 2023

This was fixed in #41 and with the v0.1.5 release, it's available in pypi. Just pip install --update monarchmoney to get the latest!

@hammem hammem closed this as completed Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants