Finance Project with API: The program retrieves currency conversion rates with fixer.io API and performs calculations in Excel.
Motivation: I wrote this piece of code to automate some commonly performed tasks in Excel.
- Opens a given Excel file with transactions data (account, security name, security symbol, date, buy/sell, quantity, currency, local price)
- Checks for exceptions, i.e. if 'Quantity' is an integer
- Calculates the Total Amount of transaction in local currency
- Pulls conversion rates using fixer.io API call.
- Calculates Total Amount in EUR (using the retrieved conversion rates)
- Calculates the broker commission based on the Account info
- Creates two output files: Data_copy.xlsx with all the calculated fields populated and SummaryFile.csv.