Hi all,
I’d like to give back to the community before my free trial expires, so here’s a tutorial on how to import manual trades from Interactive Brokers into Live Book transactions.
- Go into IB account management
- Navigate to Reports → Trade Confirmations → Flex Queries → Create New Flex Query
- Set query name to portfolio123, output to Text, output format as Comma, include column headers checked
- Set period to Last N Calendar Days 2 or whatever period you want to import
- Set date format to MM/dd/yyyy
- Set fields included to ReportDate, Symbol, Buy/Sell, Quantity, Price, Commission - in that order.
- Set Level of Detail to Order
- Save the query and run it. Open the CSV file in Excel
- Copy and paste the non-header rows into the Transactions / Import function of Live BOOK
Note: for BUY and SELL transactions of a single stock, the BUY transactions have to be imported in a separate import prior to the SELL transactions, otherwise the following error will be thrown by the import function - Line 4: Error inserting transaction: No position for SYMBOL
P.S.: The Rebalance Portfolio window in IB TWS under New Window → More Advanced Tools can be used to calculate quantities for manual rebalance orders in the case that one no longer has access to the Live Book rebalance function.