Crates.io | ibflex |
lib.rs | ibflex |
version | 1.3.0 |
source | src |
created_at | 2022-12-26 19:01:49.142449 |
updated_at | 2023-09-22 15:42:47.885321 |
description | A library and a CLI for reading Interactive Brokers Flex reports and comparing to Ledger-cli transactions |
homepage | |
repository | https://github.com/alensiljak/interactive-brokers-flex-rs |
max_upload_size | |
id | 745903 |
size | 182,093 |
Tools to assist with IB Flex reports and Ledger-cli comparison
This crate contains a CLI application and is also a library which assists working with Flex Reports from Interactive Brokers. It simplifies the Flex Query download and compares the downloaded transactions (distributions and tax) to the records in Ledger, identifying missing ones.
There are several components in the package:
ibflex
, provides all the features of the ibflex
libraryibflex
library exposes the following functionality:
as-symbols
crate provides the Symbol mapping between IB Flex report and Ledger. I.e. symbol VHYL
in the report is VHYL_AS
in Ledger.The project started as a rewrite of my Python scripts and is intended to be expanded as needed, to parse Flex Queries.
To view the current configuration, run
ibflex cfg
The config file will be created automatically if it does not exist.
To edit the values, use any text editor.
See as-symbols
crate for instructions on how to set up the symbols data file.
At the moment this is required for the symbol mapping. The symbols in IB (i.e. VHYL) may be mapped to a different symbol in Ledger (i.e. VHYL_AS).
Downloading the Flex Query report requires Query Id and the Token. These can be passed in several ways:
--queryid
and --token
.The application will read the values from environment variables:
IBFLEX_TOKEN
IBFLEX_QUERYID
ibflex.toml
, which is located in the current directory. See the section below.The required parameters for downloading the Flex report are:
flex_query_id
ib_token
Once this is set up, invoke the CLI:
ifblex dl
This will save the report in the current directory. The filename will contain today's date.
To compare the transactions, run
ibflex cmp
This will compare the downloaded IB transactions to the transactions in Ledger. The new Dividend and Tax transactions will be reported as New. The other transactions will be reported as Skipped.
See Changelog
See LICENSE file.