This help page explains how to obtain transaction history.
There are below methods to obtain (prepare) transaction history:
① Exchange file (Refer to How to get trade histories from exchanges)
② API integration (Refer to Exchange API Connection)
③ Wallet address (Refer to How to upload a trade history of Metamask wallet?)
Transaction histories outside supported exchanges, peer-to-peer transactions, or transactions not obtainable through files or APIs may require the manual creation as needed.