Interactive Brokers (IBKR) Report Parser for MyTax (vero.fi)
Project description
ibkr-report-parser
Interactive Brokers (IBKR) Report Parser for MyTax (vero.fi) - not affiliated with either service
Example
How to run locally
Option 1: pip
pip install ibkr-report-parser
ibkr-report-parser
Option 2: Docker
docker pull ghcr.io/oittaa/ibkr-report-parser
docker run --rm -d -p 8080:8080 --name ibkr-report-parser ghcr.io/oittaa/ibkr-report-parser
Option 3: Build yourself
Python
git clone https://github.com/oittaa/ibkr-report-parser.git
cd ibkr-report-parser
pip install -r requirements.txt
python main.py
Docker
git clone https://github.com/oittaa/ibkr-report-parser.git
cd ibkr-report-parser
docker build -t ibkr-report-parser:latest .
docker run --rm -d -p 8080:8080 --name ibkr-report-parser ibkr-report-parser
Use the app
Browse to http://127.0.0.1:8080/
Python API
from ibkr_report import Report
FILE_1 = "test-data/data_single_account.csv"
FILE_2 = "test-data/data_multi_account.csv"
with open(FILE_1, "rb") as file:
report = Report(file=file, report_currency="EUR", use_deemed_acquisition_cost=True)
with open(FILE_2, "rb") as file:
report.add_trades(file=file)
print(f"Total selling prices: {report.prices}")
print(f"Total capital gains: {report.gains}")
print(f"Total capital losses: {report.losses}")
for item in report.details:
print(
f"{item.symbol=}, {item.quantity=}, {item.buy_date=}, "
f"{item.sell_date=}, {item.price=}, {item.realized=}"
)
from ibkr_report import ExchangeRates
rates = ExchangeRates()
print(rates.get_rate("EUR", "USD", "2020-06-20"))
print(rates.get_rate("GBP", "SEK", "2015-12-31"))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ibkr-report-parser-2021.11.19.tar.gz
(186.4 kB
view hashes)
Built Distribution
Close
Hashes for ibkr-report-parser-2021.11.19.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d71efa0f0403415b48d8f3206f81eee2418c0fc1b97213cccf3f4478f69ceaf |
|
MD5 | 420a163ced27fa7225825db54a841fd3 |
|
BLAKE2b-256 | c65a0696b06f4173983b14faf529a602dd105a27ecfe2ed18acf140be35ef15a |
Close
Hashes for ibkr_report_parser-2021.11.19-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8b9ea4562aafd9421fc3070205d3e6e993d3fc480ea6a77a00eefdcc34a51ba |
|
MD5 | ce5f56f8de7dd578c2e7671bdfe3e90e |
|
BLAKE2b-256 | 0f01890790ea2a00889c035cb7afdf365089865475248012b2479d69ae754682 |