InteractiveBrokers

515 views
Skip to first unread message

Martin Blais

unread,
Dec 30, 2020, 12:56:38 AM12/30/20
to Beancount
Does anyone here have an importer for Interactive Brokers?

They don't seem to have any way to download a single table report of all balance-affecting transactions.
Best I can find is their "activity report" which has the information scattered over multiple subtables embedded in a single table.
Writing an importer for this now... feels really quite silly.
Looking into their API actually, not sure it's any better.

Martin Michlmayr

unread,
Dec 30, 2020, 1:10:05 AM12/30/20
to bean...@googlegroups.com
* Martin Blais <bl...@furius.ca> [2020-12-30 00:56]:
> Does anyone here have an importer for Interactive Brokers?

https://github.com/tarioch/beancounttools

--
Martin Michlmayr
https://www.cyrius.com/

Martin Blais

unread,
Dec 30, 2020, 1:17:24 AM12/30/20
to Beancount
Thx Martin.
I was hoping to find something that works without having to access the API.


--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20201230060958.GA31091%40jirafa.cyrius.com.

Martin Blais

unread,
Dec 30, 2020, 1:49:58 AM12/30/20
to Beancount
FWIW, it's buried under a custom report, you have to select "Statement of Funds."
That generates a single table including a balance column.

nug get

unread,
Dec 30, 2020, 2:42:38 AM12/30/20
to Beancount
I also made a IB importer, based on the FLex Query API:
https://github.com/Dr-Nuke/drnuke-bean

https://www.interactivebrokers.com/en/software/singlefunds/topics/flexqueries.htm


>> report of all balance-affecting transactions.
without looking it up, i believe the flex query allows this.

Hope this is of help to you.
Best,
nugget

Martin Blais

unread,
Dec 30, 2020, 3:12:24 AM12/30/20
to Beancount
Thank you!

And actually, for the record, the statement of funds from the custom reports doesn't provide any trade data.
The statement of funds from the flex queries is the only one that outputs a single table with all one needs.


Ben Blount

unread,
Dec 30, 2020, 3:26:53 AM12/30/20
to Beancount
Are these apis only available for IBKR Pro?

Martin Blais

unread,
Dec 30, 2020, 3:47:57 AM12/30/20
to Beancount
No idea.

Happy to share this importer if anyone cares.



Adrian Utrilla

unread,
Dec 30, 2020, 4:11:26 AM12/30/20
to bean...@googlegroups.com

nug get

unread,
Dec 30, 2020, 4:20:41 AM12/30/20
to Beancount
>>Are these apis only available for IBKR Pro?
no, should be available for all.
i use IBKR in it's basic product, no pro version or such. this report API is not a premium service. there is anotehr API that allows you to programmatically trade, but i have not looked into it thus far. i am planning on....
Best,
nugget

Patrick Ruckstuhl

unread,
Dec 30, 2020, 4:27:17 AM12/30/20
to nug get, Beancount
The other api is connecting to a locally running ib client, so that's a bit more setup.

Martin Blais

unread,
Dec 30, 2020, 12:57:58 PM12/30/20
to Beancount

booster...@gmail.com

unread,
Dec 30, 2020, 5:43:24 PM12/30/20
to Beancount
Hi,

How do I use this importer ? from terminal I've tried this

bean-extract ibkr_flex_reports_csv_test.py ibkr.csv

the output is

ModuleNotFoundError: No module named 'beanlabs'

Martin Blais

unread,
Dec 30, 2020, 5:53:28 PM12/30/20
to Beancount
Message has been deleted

booster...@gmail.com

unread,
Dec 31, 2020, 8:43:01 PM12/31/20
to Beancount
I manage for the path of the beanlabs, but what is import beangrind ? searching all repository and documentation, not result for beangrind?

Martin Blais

unread,
Dec 31, 2020, 11:40:21 PM12/31/20
to Beancount
That's just for the test; I need to remove it. I have a private repository with a bunch of importers, with some custom code for testing against real files. Doesn't matter it's just for testing. 

On Thu, Dec 31, 2020 at 8:42 PM a a <qoyy...@gmail.com> wrote:
I manage for the path of the beanlabs, but what is import beangrind ? searching all repository and documentation, not result for beangrind?

On Thursday, December 31, 2020 at 5:53:28 AM UTC+7 bl...@furius.ca wrote:

booster...@gmail.com

unread,
Jan 1, 2021, 2:36:47 AM1/1/21
to Beancount
kindly, any guide/references how to use importer ? I've already read the ingest, I'm at loss, thank you.
Reply all
Reply to author
Forward
0 new messages