Update: I’ve published the tool described below as lotter, a
companion tool to ledger. Source code and instructions:
https://src.d10.dev/lotter.
Tracking cost basis for crypto trades is a huge pain. I’ve been experimenting with ledger-cli to track trading history. It works well, so I’m sharing some notes here.