banking-ibcloud: add epoch_start and store raw row data

This commit is contained in:
informatic 2019-11-08 20:32:36 +01:00
parent 342489c1c3
commit 3c322569f2

View file

@ -106,6 +106,7 @@ class IBRow(RawTransfer):
def __init__(self, row, own_account):
self.date = datetime.strptime(row['date'], '%d.%m.%Y').date()
self.index = 1
self.raw = json.dumps(row)
self.uid = row['id']
self.title = row['title']
@ -286,10 +287,14 @@ class IBFetcher(object):
return wallet
def fetch_account_history(self, account_id, start=None, end=None):
epoch_start = date(2019, 10, 20)
if end is None:
end = date.today()
if start is None:
start = date.today() - timedelta(days=30)
if start < epoch_start:
start = epoch_start
total_pages = 1
page = 0
history = []