Transfers
Overview of supported kinds of position transfers.
Cross-account transfers
Cross-account position transfers are supported when they are present in flex reports. When transfer is detected the outstanding position in the given security is moved from one account to another.
INFO
Note that for historic reasons same account(s) transfers across different branches of Interactive Brokers are inferred automatically. The summary of these actions is displayed in the program output for each account ledger.
Cross-brokerage transfers
The app offers a way to enter trades manually for smooth transition from other brokerage to Interactive Brokers.
Create a file named transferred-positions.json
in the working directory. This is a JSON file with the top element being array containing position entries. Add as many positions as needed, for example:
[{
"account_id": "U3012345",
"contract_id": "313130367",
"symbol": "AVGO",
"isin": "US11135F1012",
"date": "2019-12-19",
"asset_category": "STK",
"quantity": "70",
"trade_price": "324.92",
"currency": "USD"
},
{
"account_id": "U3012345",
"contract_id": "8823",
"symbol": "KGC",
"isin": "CA4969024047",
"date": "2019-12-26",
"asset_category": "STK",
"quantity": "300",
"trade_price": "4.75",
"currency": "USD"
}]
Currently supported currencies: GBP, USD, EUR, CAD, AUD, CNH.
Only stock assets (STK) are supported for the time being.
Use
.
as decimal separator,trade_price
is a string, so make sure to enclose it in the double quotes.Date is in
YYYY-MM-DD
format (4 digits year, 2 digits month, 2 digit day, hyphen separated)Use flex explorer to find the contract ID and ISIN closest to the date of transferred position. This is important because contract IDs and ISINs can change over time. For example:
shportfelj flex search -s <SYMBOL>
Replace
<SYMBOL>
with the symbol you look for.If you don't have any follow up transactions in the same security, then look up the most recent metadata by symbol using IB contract lookup:
shportfelj ib-contract <SYMBOL>
Replace
<SYMBOL>
with the symbol you look for.Please pay attention to the "Security type" and "Exchange" in the output when picking the right security ISIN and contract ID.