Koinly does a pretty good job of automatically detecting and merging your trades and transfers. There are however edge cases where Koinly does not merge your transactions so in these cases you will need to merge the transactions manually.
Merging two transactions into one is quite simple. You just need to select both transactions by ticking the little checkbox on the left and then you can click on the Merge button at the bottom of your screen:
What kind of transactions can be merged?
If you have a withdrawal in one of your wallets and a deposit of the same currency in another wallet then these can usually be merged into a single transfer. There are a few possible reasons why Koinly doesn't always merge transfers but it might indicate some underlying issue with your data. See this article for more info
If you have a trade that is being displayed as 2 separate transactions (a withdrawal of the spent currency and a deposit of the received currency) then you can merge these into a single trade.
It is also possible to include a Cost transaction when merging a trade or you can merge a Cost transaction directly with a Trade transaction.
Multiple deposits / withdrawals
If you have multiple deposits taking place on the same day (for example staking rewards paid out every hour) then you can merge these into a single deposit.
The same applies to withdrawals - if you have multiple withdrawals (such as fees) on the same day then you can merge them into a single transaction.
It is possible to merge up to 9 transactions at a time but all of the transactions need to have the same label and take place on the same day.
Splitting transaction (un-merging):
If you have accidentally merged transactions incorrectly or if Koinly has automatically merged a transfer incorrectly then you can split this transaction into separate entries.
You can do this by expanding the transaction and looking at the Ledgers tab. There you will see an option to Split entries:
What kind of transactions can be split up?
You can split up a transfer that has been incorrectly matched. This will result in 2 separate transactions, one deposit and one withdrawal. You can then merge these transactions into different transfers if applicable.
It is very rare that Koinly merges transfers incorrectly but it can happen if you have multiple transfers of the same coin in a short period of time.
You can split trades into separate entries as well. This will result in one withdrawal of the spent currency and one deposit of the received currency. If the trade includes a separate fee then you will see a separate Cost transaction for the fee as well