Hello Everyone. Excited to be here and see how this grows. I stumbled upon hledger in late 2022, and it has become a fun rabbit hole.
Hledger has been phenomenal for my banking purposes, but I am trying to find a good workflow for cryptocurrency.
I tried hledger-lots but stumbled upon installation/configuration (which is upon myself as recently switching to linux) but also see that it is based on FIFO, and I would also like LIFO and HIFO
My main work flow is that I record each purchase made into its own asset category based on date purchase with a note of the cost basis.
Upon selling I just take from the available assets/date category until it zeros out and then I move onto the next.
I don’t actively day trade so this is manageable for myself, yet reaching out here as always looking for more efficient ways.
I currently keep three separate journals for FIFO, LIFO and HIFO (US tax reporting) to decide which will be best for my reporting at end of year. After I report end of year, I disregard the other two and build upon the one used to keep an accurate record of cryptocurrency available.
Welcome @ralf! What you describe is pretty much how I have done it in my experiments: using per-lot subaccounts. Which then must be carefully preserved - including costs and balance assertions - through transfers and file end/starts. That could get quite challenging if you have many lots, eg from recurring rewards or similar. Especially when you want to fix an error or improve the bookkeeping a few years back. hledger close --show-costs, hledger-move.hs, and emacs power tools (search/replace, macros, align-regexp, ledger-mode’s M-q…) can be helpful.
I don’t see much explicit @ COST in your example, I guess you track it in comments more than I.
I have never experimented with anything other than FIFO, I like that you can compare the different strategies.
I was going to try with the @COST again as this might be easier going forward. I still have much to learn on reporting and such. Yes emacs, I have been wanting to learn this specifically for org mode, but can see now the other useful benefits I can get from here. The rewards, and costs moving in/out exchanges/wallets is challenging for keeping accurate. The formatting happened as I was watching and the page refreshed, I was like, ah cool, but how did I do that
Hi ralf! From what I understand, docker-finance may be exactly what you’re looking for:
I don’t know what wallet/chain/exchange you’re using but, with docker-finance and bitcoin.tax (not direct linking but they provide a service that calculates the FIFO/LIFO/etc. for you), you may be able to automate almost everything you’re trying to do (checkout the “Taxes” section in “Screenshots”).