Script to add stock splits and bonuses from Zerodha #151
plibither8
started this conversation in
Show and tell
Replies: 1 comment 3 replies
-
Very nice. I noticed the usage of Equity account |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've created a small script that parses the Corporate Actions Google Sheet provided by Zerodha, takes as input your Zerodha tradebook (downloaded as a CSV), and outputs to the console/STDOUT the various stock splits and bonuses that occurred while you had those shares in your balance, as ledger transactions.
Script files
Steps:
bun
input/
andoutput/
. Place the CSV file intoinput/
. Rename the CSV astradebook.csv
..env
file and add the following keys:GOOGLE_SERVICE_ACCOUNT_EMAIL
andGOOGLE_PRIVATE_KEY
.bun install
bun run ./corporate-actions.ts
I know that the steps I included seem really convoluted and complicated, but it was worth the effort!
Let me know if anyone has any questions, I'd be happy to answer! :)
Beta Was this translation helpful? Give feedback.
All reactions