Account admin · RECORDS

Exporting Trade History: Fills, Orders and Ledger Are Three Files

Gateway Guide editors Updated 2026-08-30 9 min read
Comparison diagram of what the fills export, the order-history export and the account ledger each contain
Three files, three different contents. Pick the wrong one and nothing will add up.

There are only a few reasons anyone needs their trading records: checking a fee, handing an accountant something to work from, or finding out what a trade from three months ago actually filled at. So you click export, open the file, and — no deposits, no withdrawals, and the numbers don't reconcile with your balance.

The data isn't wrong. The file you pulled was never meant to hold those things. Exchanges split their records into several exports, each answering a different question. This page separates them, gives you a rule for choosing, covers the limits you'll hit on the way out, and ends with the two fields that quietly ruin totals. The split is the same across mainstream centralised exchanges; the second half gets specific about Gate.

The three files, side by side

Names vary between platforms, but the structure is consistent:

FileWhat it holdsQuestion it answers
Fills / trade historyEvery execution: price, quantity, feeWhat did I actually buy or sell, and at what cost
Order historyEvery order placed, including unfilled and cancelledWhat was I trying to do, and at what price
Account ledger / billingDeposits, withdrawals, transfers, fees, interest, airdropsWhere did the money go, and why is the balance this number

The rule in one line: "what did I get" is the first file, "what did I want" is the second, "where did the money go" is the third.

The most common mistake is reconciling a balance against fills. A fills export contains no deposits, withdrawals or internal transfers — and your balance was moved by all of them. It will never tie out.

Why they aren't one fileDifferent systems write them. Executions come from the matching engine, orders from the order-entry system, the ledger from accounting. Merging them into a single table would make each row's meaning ambiguous, which is why platforms keep them apart.

Picking one by purpose

  • Checking a fee. Fills. It's the only export that shows a fee per execution along with the currency it was charged in. For how the rate itself is set, see Gate fees explained.
  • Giving an accountant a working file. Ledger as the main file, fills as supporting detail. The ledger shows money in and out; the fills give per-trade cost. What you actually have to report depends on where you live, so ask a local professional — this page only covers pulling complete data.
  • Reviewing how you traded. Order history plus fills. Fills alone hide the orders you placed and cancelled, and those decisions are usually the interesting part of a review.
  • Chasing a transfer that never arrived. The deposit and withdrawal rows in the ledger, which give you the status, the timestamp and the transaction hash to check on a block explorer. The full troubleshooting path is in the Gate withdrawal guide.

Where to export from on Gate

Gate keeps the three reasonably well separated. Interfaces change, so treat this as where to look:

  • Fills and order history. On the web, open Orders from the top navigation, go to spot orders and switch to trade history; choose a pair and a date range, and the download control sits at the top right. Gate's own instructions are in how to view trade history.
  • Account ledger. Filed under billing records; the export route is described in Gate's billing history download guide.
  • Older or bulk data. For long periods or backtesting inputs, Gate publishes a separate historical-data route, announced in its historical data availability notice. That one is aimed at quantitative users and is overkill for reconciliation.

Gate's help pages note that exports carry a daily download limit. Numbers like that get adjusted, so we're not copying a figure here; the page states the limit in force when you open it. (Checked against Gate's published help pages on 2026-08-30.)

Four limits that get in the way

  • One date range at a time. The window is capped, so a full year usually takes several exports that you stitch together yourself. Check for overlaps and gaps where the segments meet.
  • A daily download allowance. Don't burn it on exploratory pulls. Decide which file and which period you need before clicking.
  • Often one trading pair at a time. Fills are frequently scoped to a market. Trade a lot of pairs and you'll be exporting one by one.
  • The file may not be instant. Large requests get generated asynchronously and appear in a download list or arrive by email, sometimes password-protected. If you navigate away while it builds, go back and look in the list rather than starting again.

Five fields to understand first

  • Timestamp and time zone. The single biggest cause of reconciliations that won't close. Exports are commonly written in UTC while the interface shows local time; near midnight, trades land on the neighbouring day and every daily total shifts. Normalise the time zone before you calculate anything.
  • Side. Buy or sell. Some files use words, others use the sign on the amount. Don't read one convention as the other.
  • Fill price versus order price. Fills carry what you actually got; order history carries what you asked for. Cost basis uses the fill price.
  • Fee and fee currency. The fee is not always charged in the asset you traded — pay fees in a platform token and the fee column is denominated in something else entirely. Summing that column without reading the currency produces a number that means nothing.
  • Order ID and trade ID. One order can split into several executions; the order ID is what groups them back together. To get that order's average price, weight by quantity rather than averaging the row prices.

Once you have a figure, the site's spot P&L and break-even calculator is a quick way to sanity-check what you derived from the file.

Feeding the file into a tax or portfolio tool

If the export is going into portfolio software or a tax package rather than a spreadsheet, the import is where things break, and it breaks in predictable ways:

  • Column mapping. Importers ask you to match columns to their own schema. Map the fee currency column, not just the fee amount — miss it and every fee is silently treated as the quote currency.
  • Missing transfers. Import fills alone and the tool sees assets appearing from nowhere, then flags them as unexplained. The ledger file is what fills those gaps.
  • Duplicate rows. Stitched date ranges that overlap will double-count. Deduplicate on the trade ID before importing, not after.

Whatever the tool concludes, the reporting rules are set where you live, and this site does not give tax advice. Use the file as the evidence; get the treatment from a professional in your jurisdiction.

What's in the file that shouldn't travel

An export usually carries an account identifier and a complete timeline of your activity. Together those reveal the size of your holdings and the hours you keep. So:

  • don't drop the raw file into a group chat or a public spreadsheet service;
  • don't upload it to an unknown site promising to "calculate your taxes automatically" — that is handing your full ledger to a stranger;
  • if an accountant genuinely needs it, delete the columns they don't need and send it through the channel they specify.

One more: be sceptical of any service that wants an API key in order to "export your history for you." Exporting is a few clicks you can do yourself; it does not require handing over read access to your account. For what to grant and what to refuse, see which account-security settings to switch on.

Editors' check

What the editors checked

Working from Gate's current help pages, two things are worth carrying away. First, decide the purpose before you click export: fees come from fills, balances from the ledger, reviews need order history as well. The daily allowance is finite, so don't use it to guess. Second, time zone and fee currency are the two silent failures — neither throws an error, both produce a plausible wrong answer. Any export limits quoted anywhere should be confirmed on the page itself. To walk the whole trading flow from the start, see the Gate beginner's guide.

FAQ

Why doesn't the export match my balance?
A fills export records executions only. It contains no deposits, withdrawals, internal transfers, interest or airdrops, and your balance is moved by all of those. Reconciling a balance needs the account ledger, not the fills file.
Why does one order appear as several rows?
An order can be matched in several executions, and each execution is written as its own row with its own price and quantity. Group the rows by order ID and weight the prices by quantity to get the real average price for that order.
The timestamps don't match what I saw on screen. Why?
Check which time zone the file uses. Exports are commonly written in UTC while the interface displays your local time, so trades near midnight land on the neighbouring day. Normalise the time zone before summarising by date.
Can I send the exported file to someone?
Not as-is. These files usually carry an account identifier plus a complete timeline of your activity, which together reveal your holdings and your habits. If an accountant needs it, delete the columns they don't need and send it through the channel they specify.

Gateway Guide editors

A small independent editorial team writing under pen names. We check Gate's official material and translate the current process into plain language. We don't give investment advice; dynamic steps follow the official page and account notices and are re-checked regularly. Spot an error? See corrections.