Why get transactions only for the last year?
kaztechSolutions opened this issue ยท 9 comments
Hi,
in dkb_robo.py, inside the get_transactions function you call validate_dates and pass the value 3 in case of legacy_login, and value 1 in case of new login to the min_year parameter. Can you explain why?
if self.legacy_login:
(date_from, date_to) = validate_dates(self.logger, date_from, date_to, 3, self.legacy_login)
transaction_list = self._legacy_get_transactions(transaction_url, atype, date_from, date_to, transaction_type)
else:
(date_from, date_to) = validate_dates(self.logger, date_from, date_to, 1, self.legacy_login)
transaction_list = self._get_transactions(transaction_url, atype, date_from, date_to, transaction_type)
I need to retrieve more than just one year, and if I change that parameter to a higher value, more that just one year is retrieved, meaning the API is supporting that. So, why do you limit that in the first place?
Regards
Hi,
the limitation does also exist in the new DKB-API (see below screenshot from the bottom of the transaction list)
The corresponding rest call 'https://banking.dkb.de/api/accounts/accounts/<uid>/transactions
does always fetch the full transactions list of the last 360days and I use the date_from
/ date_to
values for filtering only .
So the value 1 is mainly there for compatibility reasons and to auto-adjust date_from
in case its are outside of the 1Y range.
If you need to retrieve more than just one year you have to use the legacy mode.
HTH
G.
@BroderPeters are you still interested in submitting the PR you mentioned?
Now that the old UI is gone (see #58), there is no way to fetch more than 1 year in the past with the current dkb-robo version 0.26.
Let me know if I can help in any way.
I can look into it but not before the weekend.
Sorry
/G
as @BroderPeters indicated the code changes are rather simple and much easier than I thought. I pushed a couple of changes into the devel branch and got it working on my side. Feel free to try and let me know if it works for you.
I will take a look. Thank you!
It works!
Sorry for not getting back to it by the time, but great efforts from your side!