A realized gains report for stocks and crypto
Sonar matches every sale and swap on record to the units it closed, across brokerages, exchanges and wallets, and exports the result as CSV files. It is a record of your transactions, not tax advice.
Updated November 28, 2026
Selling shares at a brokerage and swapping a coin in a wallet both close a position, but no single statement lists the two together. Sonar's realized gains report does: one list of what you sold, what it cost and the result, for a year or any dates you pick.
What the report contains
- Realized gains. One row per matched lot: asset, quantity, date acquired, date disposed, proceeds, cost basis, gain or loss, days held, whether it was held over one year, the account and the method.
- Income. Dividends, reinvested dividends, staking rewards, interest and airdrops received in the period, each at its value when received.
- Needs review. Everything the record can't account for, with the transaction and the reason, and a link to where a missing purchase, transfer or cost can be logged.
- Summary. Proceeds, cost basis and the net result, with the method, period and currency the report was built with.
How sales are matched
- Method. First in, first out (FIFO) or average cost. FIFO closes the oldest units first, each at what it cost. Average cost gives every unit the pool's total cost divided by its units at the moment of the sale. Which method applies to you depends on your country; your tax authority or an adviser can tell you.
- Scope. Across all accounts, or within each account.
- Period. A calendar year or custom dates, for tax years that run on other dates.
- Currency. Your display currency, with each amount converted at the rate on its own transaction's date. If a date has no rate, the whole report is built in US dollars and says so.
What counts as a sale
- A sell, and the outgoing side of a swap. The coin received in a swap is an acquisition at the same value.
- A transfer between two of your own accounts is not a sale. The units keep their cost and their date.
- A transfer out that arrives in none of your accounts is listed for review. It is never turned into a sale.
- A cost that isn't on record stays blank. The row is left out of the totals and listed for review; it is never counted as zero.
The files
Four CSV files: realized gains, income, needs review and a summary. Headers are in English, dates are ISO days and numbers are unrounded, so the files open in a spreadsheet or tax software without cleanup. The method, period and currency are in the summary and in each file's name.
Where the transactions come from
The report reads the same record as the rest of your portfolio: wallets added by public address, brokerages and crypto exchanges connected through Plaid on a paid plan, positions logged by hand, and imported files, including the histories that Koinly, CoinTracker and Delta export. The more of your history is on record, the less lands under "needs review".
What it can't account for
- Anything that isn't on record: history from before a wallet or account was added, and accounts that aren't connected.
- DeFi activity is read as plain swaps and transfers. A deposit into a pool, a loan or a wrapped token shows as a swap or a transfer.
- Margin, futures, options and NFTs are not covered.
- Fees in imported CSV files are not applied, and a coin-for-coin trade from an imported file records only the coin received.
- Cash and currency balances.
When anything is listed for review, the report says it is incomplete.
Plans
The summary and the needs-review list are on every account. The CSV files and the row-by-row list are on Starter ($7 a month), Standard and Premium, and in the 14-day free trial of each. The plain transactions export is open to every account. See pricing.
FAQ
Is this a tax report?
No. It is a record of your transactions as Sonar has them, for your own files, an accountant or tax software. It is not tax advice and not a tax return, and it names no country's rules. Check it against your own records.
Does it cover stocks and crypto in the same report?
Yes. Shares, ETFs and coins are matched the same way and listed together, with the account on every row.
Which cost basis methods are there?
First in, first out (FIFO), which is the report's default, and average cost. You pick one on the page, and the file name carries it.
Why are some cells blank?
A blank cell means that side of the row isn't on record: a purchase from before the account was added, or a transfer in with no cost. The row is listed under "needs review" and left out of the totals until the missing transaction is logged.
Is the report in the API or the MCP server?
No. It is on the website, under Export, then Realized gains. The MCP server, the REST API and the CLI cover holdings, performance, allocation and income.
Related pages
- What is cost basis, and how do you track it across exchanges?Cost basis is what you paid for an investment, fees included. Learn how it is calculated, why transfers break it, and how to keep it right across accounts.
- How to export transactions from Coinbase and Kraken to CSVStep by step exports of your trade and transaction history from Coinbase, Kraken and stock brokers, what a good CSV contains, and how to keep the file clean.
- Portfolio performance tracker with TWR, IRR and a benchmarkTrack portfolio performance across brokerages and wallets. Time-weighted and money-weighted return (IRR), an S&P 500 or Bitcoin comparison, and exposure.
- Import a Koinly transaction history into a trackerDownload the Transaction history report from Koinly and import it into Sonar. Every trade, transfer and reward from all your wallets becomes today's holdings.
- CoinTracker alternative for portfolio trackingCoinTracker is crypto tax software. Sonar is a portfolio tracker for crypto and stocks, with social data on what you hold. Sonar has no tax forms.