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.21.tar.gz
(187.6 kB
view hashes)
Built Distribution
Close
Hashes for ibkr-report-parser-2021.11.21.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b6bb3450e7ef99cfbdb57bf76b86b3c752c6851e19259e3f66d7282c6549beb |
|
MD5 | 6e057916bf3aadf15035229dcbbb24af |
|
BLAKE2b-256 | a10135a8158131295c7a788341063ef81b996bb68b232d1136bcd8dd397a0d7c |
Close
Hashes for ibkr_report_parser-2021.11.21-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f371ca3e68878370011c57ee594958cd6d7e85ef507302fc3cbbd4251c4fdf1 |
|
MD5 | e247254c200d39568bd6ef183760ceed |
|
BLAKE2b-256 | f6add3df23047622b13423650bf551a538adcbf07ad174eb1282b6d3486c9c34 |