You need some sort of data source for what prices were at various points. This could be offline, but is likely to be big. Still, substantially easier problem than a lot of tax-related reporting.
IANA Accountant, but I would guess until/unless the IRS has blessed some particular entity, you can use any public-facing exchange but you should probably be consistent.