How to Import a MetaMask Transaction History Without Gaps
Importing a MetaMask transaction history without gaps requires combining the wallet's native CSV export with an Etherscan API pull or a third-party aggregator, because MetaMask's own export omits certain transaction types and older records.
Why gaps occur in metamask exports
MetaMask's built-in CSV export (available via the wallet's "Account Details" menu) only covers transactions visible in the active wallet interface at the time of export. It excludes:
- Failed transactions - MetaMask may not list these in the main activity feed after a period.
- Contract interactions that do not involve a token transfer visible to the wallet UI.
- Internal transactions - For example, a DEX trade that routes through a contract may appear only as a single event, but the actual token movement happens inside the contract.
- Historical limits - The wallet only loads recent activity; if you have never scrolled back to a certain date, that data may not be included in the export.
- Imported accounts - If you added an account via private key or seed phrase, its history may not be fully cached in the MetaMask extension.
These gaps can cause your portfolio tracker to undercount holdings, miscalculate cost basis, or report a lower balance than the blockchain actually shows.
Step 1: Export the Standard MetaMask CSV
Open MetaMask, select the account you want to export, click the three-dot menu, choose "Account Details," then "Export Transactions." Save the CSV file. This gives you a starting set of data, but treat it as incomplete.
Step 2: Cross-Check Against the Blockchain Explorer
The only complete record of any Ethereum-based address is the blockchain itself. For a MetaMask wallet, the canonical source is Etherscan (or the equivalent block explorer for the network you use, such as BscScan or PolygonScan).
Paste your wallet address into Etherscan. Under the "Transactions" tab, you will see every on-chain transaction the address has ever signed. The "Internal Txns" tab shows contract-internal transfers. The "Token Transfers" tab shows ERC-20 movements.
Compare the total number of rows in your MetaMask export against the count on Etherscan for the same date range. If they match, you likely have no gaps. If Etherscan shows more, you need to fill them.
Step 3: Use the Etherscan API to Pull Full History
Manually copying from a block explorer is error-prone for more than a handful of transactions. Use the Etherscan API instead:
- Get an API key - Register at etherscan.io and generate a free API key (rate-limited but sufficient for personal use).
- Choose the right endpoint - Use
txlistfor normal transactions,txlistinternalfor internal transactions, andtokentxfor ERC-20 transfers. - Set the date range - Specify
startblockandendblockparameters. To get everything, setstartblock=0andendblock=99999999. - Handle pagination - The API returns a maximum of 10,000 records per call. If your address has more, loop through
pageparameters. - Export to CSV - Most portfolio tracking tools accept a CSV format. Write a simple script (Python or JavaScript) to convert the API JSON response into a CSV with columns matching your tracker’s import template.
If you do not want to code, tools like Zapper, Zerion, or Rotki can pull the same data via their own API integrations and export a consolidated history.
Step 4: Merge the Exports and Deduplicate
You now have two datasets: the MetaMask CSV (incomplete) and the Etherscan export (complete but may include transactions you already have). Import both into your portfolio tracker, then use its deduplication feature to remove identical rows. Most trackers match on transaction hash and timestamp. If yours does not, sort by hash and delete duplicates manually in a spreadsheet before importing.
Common deduplication pitfalls:
- Same hash, different fee - Some trackers recalculate gas fees. Keep the version from the blockchain explorer, which is the authoritative record.
- Missing token symbols - The MetaMask export may show a token contract address where the Etherscan export shows the symbol. Standardize to the contract address during merge.
- Time zone shifts - Ensure both exports use the same time zone (UTC is safest). MetaMask exports in local time; Etherscan returns UTC.
Step 5: Validate the Final Import
After merging, check that the total transaction count matches Etherscan’s count for the address. Then verify a few specific transactions that you know occurred but might have been missing from MetaMask - such as an airdrop claim, a failed swap, or an internal transfer from a DeFi protocol. If those appear correctly, your history is gap-free.
When Gaps Persist
If your balance still does not match after following these steps, the gap may not be in the transaction history itself. Check for:
- Unclaimed airdrops - The tokens exist on the blockchain but were never sent to your address; they require a claim transaction.
- Staking or lending positions - Your MetaMask address may hold a receipt token (like cDAI or stETH) that represents a claim on another asset. The transaction that created that position appears in your history, but the underlying asset’s yield may not.
- Cross-chain activity - If you bridged assets to another network, the transaction on the source chain appears in MetaMask, but the receiving chain’s activity does not. You need to export history from that chain’s block explorer separately.
In those cases, the fix is not re-importing MetaMask data but adding the correct on-chain positions to your tracker, often by connecting the relevant chain’s API or manually entering the position.
Practical Limits
For a wallet with thousands of transactions, the Etherscan API’s free tier (5 calls per second, 100,000 calls per day) is usually sufficient for a one-time historical pull. If you need continuous gap-free tracking, set up a scheduled script to pull new transactions daily and append them to your tracker, bypassing MetaMask’s export entirely.
Not financial advice. venko.tech publishes market data and general information about digital assets. Crypto assets are volatile and you can lose everything you put in. Nothing here is a recommendation to buy, sell or hold, and we make no price predictions.
Prices are sourced from third parties and may be delayed or wrong. Verify anything you intend to act on against a primary source.