Investors & landlords

Did you initiate the stock purchases in the HE HSA account? In that case, you should have the paperwork for what the cost was (which becomes the basis for sale). Note that HE is not a normal financial institution in that their customers in 47 states do not have this problem (of tracking capital gains) because all gain is deferred and then when spent on qualified medical expenses, it's tax-free anyway.

But if you invested in a mutual-fund-like-thing inside the HSA, then it is the mutual fund manager who tracks cost and sales price. 

In the latter case, I would expect the fund to report the net capital gain to you so you won't have any record-keeping to keep. I see that HE allows you to invest in mutual funds; surely the fund is reporting the net capital gains to HE to pass to you.