import csv
from pymonzo import MonzoAPI
if __name__ == '__main__':
monzo_api = MonzoAPI()
monzo_transactions = monzo_api.transactions()
with open('monzo_transactions.csv', 'w') as csvfile:
writer = csv.writer(csvfile)
writer.writerow([
'transaction.amount', 'transaction.description', 'transaction.created',
])
for transaction in monzo_transactions:
writer.writerow([
transaction.amount, transaction.description, transaction.created,
])
print('MONZO DATA SAVED!')
I also want to get my balance at the date of the transaction. Really for the purposes of this project all I need are [DATE] and [BALANCE] columns.
I can see that balance is part of the transaction information under 'account_balance' but I can't seem to just add it like with the others in the code.
Any ideas?
I apologise if I should not be putting these questions in the issues section.
I have this code to export a CSV:
I also want to get my balance at the date of the transaction. Really for the purposes of this project all I need are [DATE] and [BALANCE] columns.
I can see that balance is part of the transaction information under 'account_balance' but I can't seem to just add it like with the others in the code.
Any ideas?
I apologise if I should not be putting these questions in the issues section.
Thanks.