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
Use the app
Browse to http://127.0.0.1:8080/
How to build yourself
Python
git clone https://github.com/oittaa/ibkr-report-parser.git
cd ibkr-report-parser
pip install .
ibkr-report-parser
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
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
from ibkr_report.definitions import StorageType
rates = ExchangeRates(storage_type=StorageType.LOCAL, storage_dir="/tmp/my_storage")
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.24.tar.gz
(188.0 kB
view hashes)
Built Distribution
Close
Hashes for ibkr-report-parser-2021.11.24.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32c8a41f5553ff3ec3caa2725ac990446ac99b081f3b73a784a228c00f9137cf |
|
MD5 | 04577000f334596401cc214d9dd1df00 |
|
BLAKE2b-256 | f66a28382df7326f26aa90fbdc03a5be6e6d73a2a02b05230eb5464e592ad8d5 |
Close
Hashes for ibkr_report_parser-2021.11.24-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4116e4eb5834b15dd05a89f286721af14d718548897e5e45565bdb7ed8eec10 |
|
MD5 | f15db7f87e5481caff574844384e075b |
|
BLAKE2b-256 | 84564c20a0542ed72787ed37f3e8aee10596edcae5a32c810f10a4252242b3b2 |