Gainbasis

Import

Upload your exchange’s file. We find the columns.

Export your history from any exchange and upload the file exactly as it is. If we know the format, we read it at once. If we do not, we work out what each column is, show you the first rows, and you confirm the columns in a minute. No retyping.

How it works

  1. Export from your exchange

    Download the history as CSV, the original file, in whatever language and layout the platform uses. Do not edit it.

  2. Upload it

    If we know the format (Kraken, Coinbase and others) we read it at once and tell you which source it is and whether that source is supported or beta.

  3. Confirm the columns once

    If we do not know it, we guess the columns and show your first rows with our reading next to them: the date, the type of each row, the asset, the quantity and the fee. Correct what is wrong; the preview updates as you go.

  4. Import

    The whole file is checked first and every problem is named by row and column. Then it is imported, and the columns you confirmed are remembered for your next file from the same place.

Coinbase: connect with a read-only API key

Optional. A file always works, but for Coinbase you can instead give Gainbasis a key that can only view. These are Coinbase’s own steps for a personal account; their screens may change, so follow the labels.

  1. Open Coinbase’s key page

    Go to the Secret API keys page of the Coinbase Developer Platform and sign in with your Coinbase account. Click Create API key.

  2. Allow viewing only

    Give the key a name, then open API restrictions and Advanced settings. Pick the portfolio whose history you want to read, and allow viewing only: leave Trade and Transfer off.

  3. Choose ECDSA, no IP list

    If it asks for a signature algorithm, choose ECDSA; Coinbase says Ed25519 is not supported by its app APIs. Leave the IP allowlist empty: our server has no fixed address, so a list would block it.

  4. Copy the key name and private key

    Click Create API key and copy the key name (it looks like organizations/…/apiKeys/…) and the private key from the window right away. Coinbase may not show them again.

  5. Paste them in Gainbasis

    Open Sources, choose Connect with an API key and paste both. We check the key with Coinbase first and refuse one that can trade or move money. Press Read now; your transactions appear under Transactions, and anything we could not decide goes to Review.

The key is stored encrypted and only reads your accounts and transactions. To revoke it, press Disconnect in Gainbasis and delete the key in Coinbase.

Kraken: connect with a read-only API key

Optional. A file always works, but for Kraken you can instead give Gainbasis a key that can only read your ledger. These are Kraken’s own steps; their screens may change, so follow the labels, and see Kraken’s guide to creating a key.

  1. Create the key in Kraken

    In Kraken open your profile menu (top right), then Security & Access. Scroll down to API Keys and click Create API Keys. Name it, for example Gainbasis.

  2. Tick only four boxes

    Under Permissions tick only Query (Funds permissions), Query open orders & trades and Query closed orders & trades (Orders and trades), and Query ledger entries (Data). Leave everything else unticked: Deposit, Withdraw, Add withdrawal addresses, Earn, Create & modify orders, Cancel & close orders, Query affiliate participants and Export data.

  3. Leave every switch Off

    Leave WebSocket interface, IP address restriction (our server has no fixed address, so a restriction would block it), Key expiration, Query start date, Query end date and Custom number only used once window Off.

  4. Copy the API key and private key

    Click Generate key and copy the API key and the private key right away. Kraken may not show the private key again.

  5. Paste them in Gainbasis

    Open Sources, choose Connect with an API key under Kraken and paste both. We test the key with calls that cannot place an order or move funds, and refuse one that is allowed to. Press Read now; your transactions appear under Transactions, and anything we could not decide goes to Review. If you already uploaded a Kraken ledger file, the same entries are not counted twice.

The key is stored encrypted and only reads your ledger. To revoke it, press Disconnect in Gainbasis and delete the key in Kraken.

NDAX: connect with a read-only API key

Optional. For NDAX you can give Gainbasis a key that can only read your account. These are the labels on NDAX’s own site; their screens may change. NDAX’s API only returns about 3 months of trades and does not include staked assets, so for older history upload NDAX’s Ledgers file on this page (we read it as a beta source: its header is confirmed, its row types and dates are not).

  1. Open Settings in NDAX

    Sign in to NDAX, open the user menu (the person icon, top right) and choose Settings (portal.ndax.io/console/settings). In the section Api Key, click Generate New Key.

  2. Allow reading only

    In the New API key window (“Please specify the permission of this key”) select only ALLOW READ ONLY. Leave ALLOW DEPOSITS, ALLOW WITHDRAWS and ALLOW TRADING off, then click Generate. We test the key and refuse one that can do any of them.

  3. Copy the API key, the secret and your User ID

    Copy the API key and the secret key right away: NDAX shows the secret once. Then, on the same Settings page, copy your User ID (a number) from Personal User Info.

  4. Paste them in Gainbasis

    Open Sources, choose Connect with an API key under NDAX and paste the three values. We test the key with calls that cannot place an order or move funds, and refuse one that is allowed to. Press Read now; your transactions appear under Transactions, and anything we could not decide goes to Review.

  5. Add the file for older history

    In NDAX open Reports and click Create Report. Choose REPORT TYPE Ledgers, set DATE RANGE to your whole history (it starts at the last 3 months), click Create Report, then use the download icon on the report’s row. Upload the file on this page: we recognise it by its header, and you should compare the totals with your NDAX balances.

The key is stored encrypted and only reads your account history. To revoke it, press Disconnect in Gainbasis and delete the key in NDAX.

What we work out for you

  • Delimiter (comma, semicolon or tab), text encoding, where the header row is, even when the file starts with a few lines of preamble.
  • Column names in English, Portuguese, Spanish and French, and what the values look like when the names say nothing.
  • Date formats, including day-first dates, 12-hour clocks, epoch times, and whether the time zone is in the file; decimal commas and thousands separators.
  • The layout: one row per movement of one asset, separate sent and received columns, or one row per trade with a quantity, a side and a total.
  • What each type of row means (buy, sell, deposit, withdrawal, staking, interest, reward, fee...), with a confidence for each. A value we cannot place is never guessed: you choose, or it is refused.

What you confirm, and what we never guess

You confirm the columns, how dates are written and what each type of row means. Until the whole file reads without a single unreadable cell, nothing is imported.

A format read from a platform’s public documentation is labelled beta; a format you confirmed yourself is labelled as yours. Both come with the same advice: compare the result with your balance on the platform. A format is called supported once a real example export of the platform’s current layout reads without a single bad row, every type of row is understood and our tests pass. After you import, we ask whether the balance matches the platform; repeated “no” answers move a source back to beta.

Trades that need two rows are tied by an operation id or by sharing the same second. If neither holds, those rows are skipped and listed, never dropped quietly.

What we cannot read yet

If the file has any of these, the page tells you which and what to change in a spreadsheet first, or you can use the template below:

  • Both assets of a trade in one column, such as BTC/CAD.
  • The date in one column and the time of day in another.
  • Numbers written with currency symbols, such as $1,234.00.
  • A file with no header row, or two columns with the same name.
  • Files that must be joined with another file from the same platform.

Dedicated importers for more exchanges keep arriving, and every format you confirm once is remembered for your next file.

Your file stays private

The file is read on our servers and by nothing else: it is not sent to any AI service, any other company or any outside tool, and its contents are never written to a log. Column recognition is plain arithmetic on your own file. You can delete a confirmed mapping at any time.

Only a few manual records? Use the template

For a handful of rows you would rather type than export, such as a private sale, a gift or a platform that closed and left you a list, there is one documented spreadsheet layout. It is a second option; for a whole exchange history, upload the original file above.

A header and six example rows that import cleanly. Delete them and add yours.

When the template is the right tool

Use it for a few records that no export covers, or when your history only exists as a spreadsheet you built yourself.

If your platform is in the supported sources, or you can export its file, upload that instead: it keeps the platform’s own ids and quirks, and the template does not.

How to use the template

  1. Download the template

    Open it in any spreadsheet app. The first row is the header: keep it. Column order and capitalisation do not matter.

  2. One row per movement

    Copy your platform’s history in, one row per trade, deposit, withdrawal or reward. Newest first or oldest first, the order does not matter.

  3. Save as CSV UTF-8

    Use “CSV UTF-8” with commas. A semicolon-separated file, common in some regions, is not read.

  4. Add it as a source

    Choose Universal CSV and name the account, for example the platform. The whole file is checked first and you see every problem at once.

A filled example

Invented rows that cover the usual cases. Columns that stay empty here (fiat_value, fiat_currency, external_id, note) are left out, and the hashes are shortened; the downloadable file has every column.

date_timetypesent_assetsent_quantityreceived_assetreceived_quantityfee_assetfee_quantitytx_hashaccount
2025-03-04T15:20:00ZbuyCAD1500BTC0.015CAD7.50Example Exchange
2025-04-02T09:30:00-04:00sellBTC0.005CAD520CAD2.60Example Exchange
2025-05-12T18:05:00ZswapBTC0.004ETH0.15ETH0.0004Example Exchange
2025-06-01T12:00:00ZwithdrawalETH0.1ETH0.0017d1f…c0a2Example Exchange
2025-06-01T12:25:00ZdepositETH0.17d1f…c0a2My Wallet
2025-06-30T00:05:00ZstakingETH0.0012Example Exchange
  • buy: CAD out, BTC in, and a fee in CAD. Buying crypto with money is a trade like any other.
  • sell: BTC out, CAD in. The time has an offset (-04:00), which is fine.
  • swap: BTC for ETH with the fee paid in ETH. A crypto-to-crypto swap is a disposal, and the fee goes on the row in any asset.
  • withdrawal and deposit: moving your own coins between two of your accounts is two rows with the same tx_hash. Gainbasis links them, and the move is not a sale.
  • staking: received only, counted as income when it arrives.

Every column

Only date_time and type are always needed. Extra columns are ignored and kept.

ColumnNeededWhat goes in it
date_timeAlwaysWhen it happened, with the time. See the date rules below.
typeAlwaysWhat kind of row it is. See the types below.
sent_asset, sent_quantityBy typeWhat left your balance: BTC and 0.015.
received_asset, received_quantityBy typeWhat arrived in your balance.
fee_asset, fee_quantityOptionalA fee charged on this row, in any asset.
fiat_value, fiat_currencyOptionalWhat the platform says the row was worth, with a currency code like CAD. Both or neither. It is only a hint: prices still come from the price source.
tx_hashOptionalThe blockchain transaction id. It lets Gainbasis link a withdrawal from here with the deposit in your wallet.
external_idOptionalThe platform’s own id for the row.
noteOptionalAnything you want to remember. Never used to tell rows apart.
accountOptionalPlatform or wallet name. Empty means the account you name when you add the file.

The types

typeMeansFill
trade, buy, sell, swapOne asset exchanged for another.sent and received
depositAssets arrive from outside: a bank transfer in, coins sent to you by someone else.received only
withdrawalAssets leave: coins sent out, a bank transfer out.sent only
spendPaid for something, or gave it away.sent only
staking, interest, airdrop, reward, cashback, mining, lp_fees, incomeReceived as income. income is “other income”.received only
feeA fee with no other movement.fee only

A fee can be added to any row. Not sure of a type? Use the closest one and say what it was in note. A wrong deposit shows up on the review list when a matching withdrawal exists somewhere else.

Dates, times and timezones

  • date_time always carries the time: 2025-03-01T14:30:00Z is UTC, and 2025-03-01T09:30:00-05:00 is the same instant with an offset.
  • Without an offset the time is read as UTC, and the import tells you how many rows were read that way. If your platform shows local time, add your offset for that date or convert to UTC.
  • A date alone is refused: the time matters for the price Gainbasis looks up.
  • The tax day and year a row belongs to come from the timezone of your tax profile, not from the file, so a late-evening trade lands in the right year.

Writing the numbers

  • Plain positive numbers with a dot: 0.015, 1500, 0.00000042. Scientific notation such as 4.2E-7, which spreadsheets write for tiny amounts, is accepted.
  • No thousands separator (1,500 is refused), no currency symbol and no minus sign. The direction comes from the column you use, never from a sign.
  • Assets are tickers (BTC, ETH, USDC) or currency codes (CAD, USD). Use the same ticker for the same coin everywhere in the file; upper or lower case does not matter.

Common errors, and how the importer reports them

The whole file is checked before anything is saved. If any row has a problem, nothing is imported, and you get every problem at once: the row as it appears in the spreadsheet (the header is row 1), the column and the reason. Fix the file and add it again. Messages are in English.

Import failed: universal CSV: 2 errors, nothing imported
  row 4, column sent_quantity: must be positive, got '-5'; direction comes from the column, not a sign
  row 9, column received_asset: a trade needs what was received (received_asset and received_quantity)

What usually goes wrong

  • A minus sign on a quantity. Remove it and put the amount in the column that matches the direction.
  • A thousands separator, as in 1,500. Write 1500.
  • A trade with only one side. A trade, buy, sell or swap needs what was sent and what was received.
  • A date with no time. Add the time, with an offset if you know it.
  • Only one of fiat_value and fiat_currency. Fill both or neither.
  • A semicolon-separated file. Save as comma-separated CSV UTF-8.

Adding the same rows twice is safe

Adding the same file again, an overlapping export or the same rows in another order adds nothing: each row has an id built from its account, time, type, assets, quantities and tx_hash, or from your external_id when you fill it. Two completely identical rows are both kept, because two equal purchases in the same second do happen. Keep one convention per platform: if you fill external_id in one export and leave it empty in the next, the same rows count twice.

See what you owe for free. Pay only when you file.

Free: every source read, every transaction listed, everything that needs your attention, and your result: the tax you are likely to owe, the taxable amount and the net gain. Pay once per tax year for the detail of every sale, its audit trail and the report files. Full refund within 30 days, no questions.