[GNC] Importing stock splits via csv

Marcus Pemer marcus at pemer.com
Wed Oct 26 05:40:53 EDT 2022


Hello everyone!

I have recently run into a conundrum that I hope someone would be able to help me with.

I am importing transactions from a CSV file into a brokerage account. The CSV data containing the split looks like this:  

date,transactionid,description,account,credit,debit,action, price2022-08-25,44689940965,STOCK SPLIT (TSLA),tda_2061:TSLA,203,0,Split, 0.0
,44689940965,,Trading:Tradeables:TSLA,0,203,, 0.0

In other words, I have formatted the data as a multi-line split file for the importer. I am setting the action to Split and attempting to set the commodity price to 0.0 in both split lines.

I have modeled the above import data based on what I see gets created if I manually create a stock split in GnuCash. Using the Stock Split tool in its simplest version creates a transaction with two splits: the first has action set to "Split" and the second split goes to the trading account. Prices are empty/null when the tool is used.

I have turned off all Bayesian matching for the importer, if that matters.

The problem I am facing is that when imported, the above transaction is not recognized as a stock split by the importer. Rather, the commodity price is overridden to 1.0 USD for both splits and my "Trading:Tradeables:TSLA: account gets switched out for "Imbalance-TSLA".

Would anyone know how I should format the CSV import data so that the stock split gets recognized? Is it even possible/supported? I have so far not been able to find answers in the official documentation.


Thank you!
Marcus Pemer
PGP: CC9E1BAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 855 bytes
Desc: OpenPGP digital signature
URL: <http://lists.gnucash.org/pipermail/gnucash-user/attachments/20221026/4b6b2e1d/attachment.sig>


More information about the gnucash-user mailing list