Skip to main content

How to create a custom CSV file with your data

Learn how to create your own CSV file with your transaction history to import it to Koinly. Download Koinly's custom templates and fill them with your transaction data

Written by Jack

For exchanges or blockchains that do not provide any API or CSV export of your transaction history, you can still import your data to Koinly by creating your own custom CSV. This article explains what template formats are available and how to use them.

If your exchange is not supported by Koinly but it does provide a CSV export of your data, it's usually better to modify the file instead of creating it from scratch:

Koinly's CSV formats

Koinly supports multiple CSV formats to create CSV files with your data - Simple, Trades and Universal template.

You can decide which template to use depending on what transactions you need to import. In short:

  1. 🟩 Simple template

    • Best for "movements" like deposits and withdrawals, mining rewards, etc.

  2. 🟫 Trades template

    • Used to import trades (exchanges) only

  3. 🟦 Universal template

    • Can be used for both deposits/withdrawals and trades

Once you decided which format is most suitable for your transactions, you can download them below so you don't have to add all the columns manually. We also share detailed steps on how to import the template to Google Sheets or Excel:

How to use the templates

Google Sheets

To import one of our templates Google Sheets (requires a Google account):

  1. Click on the link to the template - it will open in Google Sheets

  2. Click File → Make a Copy

  3. Name the new file you created however you want

  4. Delete the sample rows from the template (keep header columns only)

  5. To keep the template simple, it doesn't contain all the available optional columns - you can add any column you might need

  6. Fill the rows with your data

  7. Once done, click File → Download → Comma-separated values (CSV) to download your file and import it to Koinly

    • You can also import the file directly from your Google Drive

Excel

To use our templates with Excel, Numbers or Libre Office:

  1. Click on the link to the template - it will open in Google Sheets

  2. Click File → Download → Comma-separated values (CSV)

  3. Once downloaded, open the file in Excel

  4. Delete the sample rows from the template (keep header columns only)

  5. To keep the template simple, it doesn't contain all the available optional columns - you can add any column you might need

  6. Fill the rows with your data

  7. Save the file again - you can save it in CSV or XLSX format (not .numbers)

  8. Import the file to Koinly

🟩 Simple template

Best for: importing deposits and withdrawals, staking rewards, futures

Required columns

The below columns are required for the file to be recognized. Column names you use in your file have to match exactly the column names below

Koinly Date

Date of transaction in YYYY-MM-DD HH:mm:ss format

E.g. 2025-11-25 13:22:10

Amount

Transacted amount in ##.00 format (dot as decimal)

E.g. 2556772.22

This amount is gross (fee is not deducted)

Currency

Symbol (ticker) of the token, e.g. BTC

This column supports the extended symbol notation

Apart from the required columns, you can also use any of the below optional columns in your CSV. These columns don't need to be filled for every row.

Optional columns

Tag

Apply a special tag to the transaction. Check available tags below in section Tags to use in CSVs

TxHash

Transaction's unique ID (Hash)

Description

Free text with a description of the transaction

Fee Amount

Fee amount paid in ##.00 format (dot as decimal)

E.g. 2556772.22

Fee Currency

Symbol (ticker) of the fee token, e.g. BTC

This field supports extended symbol notation

Net Worth Amount

Worth (fair market value) of the transacted amount (not the unit price)

Net Worth Currency

Symbol (ticker) of the fiat currency. This field supports fiat

currencies only. E.g. USD, EUR, AUD, GBP, etc.

Check the examples below to see how the Simple template can be used to import different types of transactions

Examples

Deposit

Withdrawal
Withdrawals have negative amounts (with the minus sign)

Mining reward
Rewards are added the same way as deposits, with a tag applied

Trade (exchange)
Adding a trade in the Simple format requires using two rows

Trade with fee


Standalone fee
Fees unrelated to a particular trade (like gas fees) are added in Amount/Currency column with "Cost" tag applied (not in Fee Amount/Fee Currency)


Futures transactions
Add as deposit/withdrawal equal to the total gain/loss when your position was closed (you don't add the opening or closing trade itself)

🟫 Trades template

Best for: Importing spot trades only

Required columns

The below columns are required for the file to be recognized. Column names you use in your file have to match exactly the column names below

Koinly Date

Date of transaction in YYYY-MM-DD HH:mm:ss format

E.g. 2025-11-25 13:22:10

Pair

Currency pair traded in format BASE/QUOTE or BASE-QUOTE

This column does not support the extended notation

Side

Side of the trade - if it was a Buy (buy BASE by selling QUOTE) or a Sell (sell BASE and receive QUOTE)

Amount

Total amount of base currency traded

Total

Total amount of quote currency traded

Apart from the required columns, you can also use any of the below optional columns in your CSV. These columns don't need to be filled for every row.

Optional columns

Order ID

Unique ID of the order

Order ID should be an alphanumeric string with a minimum length of 4 characters

Trade ID

Unique ID of one of the trades (fills) from a particular Order with a minimum length of 4 characters.

If both Order ID and Trade ID are provided, Koinly will automatically merge all Trades from the same Order into one transaction when importing the file

Description

Free text with a description of the transaction

Fee Amount

Fee amount paid in ##.00 format (dot as decimal)

E.g. 2556772.22

Fee Currency

Symbol (ticker) of the fee token, e.g. BTC

This field supports extended symbol notation

Net Worth Amount

Worth (fair market value) of the transacted amount (not the unit price)

Net Worth Currency

Symbol (ticker) of the fiat currency. This field supports fiat currencies only. E.g. USD, EUR, AUD, GBP, etc.

Fee Worth

Worth (fair market value) of the total fee paid (not the unit price)

Useful only if "Fee Amount" and "Fee Currency" are provided and if Koinly doesn't have the market price for the fee currency.

Fee Currency

Symbol (ticker) of the fiat currency used in "Fee Worth". This field supports fiat currencies only. E.g. USD, EUR, AUD, GBP, etc.

Trades template may seem confusing at first, since the "Amount" and "Total" columns always talk about the same currency, while the direction of the trade (whether base is sold for quote or quote is sold for base) is decided by the "Side" column. The below examples should help with understanding it:

Examples

Back-and-forth trades
Note how the "Amount" always refers to amount of BTC bought/sold and "Total" - always "USDC". The direction of the trade is decided by "Side"


Avalanche trades
All rows in this file will be merged into one trade after importing as they have the same Order ID and a unique Trade ID:

Trade with fee in bought token
Amount/Total columns show gross values. In this example, 1500 USDT was spent to buy a net of 0.95 ETH (1 - 0.05 fee)


Trade with fee in spent token
Amount/Total columns show gross values. In this example, a total of 220 USD (200 + 20 fee) was spent to buy 1 SOL


🟦 Universal template

Best for: can be used to import any transaction (deposits, spot trades, futures, etc.)

Required columns

The below columns are required for the file to be recognized. Column names you use in your file have to match exactly the column names below

Date

Date of transaction in YYYY-MM-DD HH:mm:ss format

E.g. 2025-11-25 13:22:10

Sent Amount

Amount disposed/sent in ##.00 format (dot as decimal)

E.g. 2556772.22

This amount is gross (fee is not deducted)

Sent Currency

Symbol (ticker) of the token spent, e.g. BTC

This field supports extended symbol notation

Received Amount

Amount acquired/received in ##.00 format (dot as decimal)

E.g. 2556772.22

This amount is gross (fee is not deducted)

Received Currency

Symbol (ticker) of the token received, e.g. BTC

This field supports extended symbol notation

When using this format, Sent or Received columns should be left empty depending on what transaction you're adding:

  • Deposits

    • Fill "Received Amount" and "Received Currency"

    • Leave "Sent Amount" and "Sent Currency" empty

  • Withdrawals

    • Fill "Sent Amount" and "Sent Currency"

    • Leave "Received Amount" and "Received Currency" empty

  • Trades

    • Fill both "Sent Amount", "Sent Currency", "Received Amount", and "Received Currency"

Apart from the required columns, you can also use any of the below optional columns in your CSV. These columns don't need to be filled for every row.

Optional columns

Tag

Apply a special tag to the transaction. Check available tags below in section Tags to use in CSVs

TxHash

Transaction's unique ID (Hash)

Description

Free text with a description of the transaction

Fee Amount

Fee amount paid in ##.00 format (dot as decimal)

E.g. 2556772.22

Fee Currency

Symbol (ticker) of the fee token, e.g. BTC

This field supports extended symbol notation

Net Worth Amount

Worth (fair market value) of the transacted amount (not the unit price)

Net Worth Currency

Symbol (ticker) of the fiat currency. This field supports fiat currencies only. E.g. USD, EUR, AUD, GBP, etc.

Fee Worth

Worth (fair market value) of the fee paid (not the unit price)

Useful only if "Fee Amount" and "Fee Currency" are provided and if Koinly doesn't have the market price for the fee currency.

Fee Currency

Symbol (ticker) of the fiat currency used in "Fee Worth". This field supports fiat currencies only. E.g. USD, EUR, AUD, GBP, etc.

To better understand how the Universal template should be used depending on what type of transaction you want to add, check the examples below:

Examples

Deposit


Withdrawal


Spot trade with fee


Staking reward


Gas fee
Standalone fees are added in "Sent" columns with an appropriate cost tag


Closing futures position
Import as deposit (gain) or withdrawal (loss) equal to the outcome of the trade
If "Fee Amount" is filled for a row with realized gain tag, it will be imported as a separate futures fee transaction


Manual LPing
Remember to only use those tags with LP tokens (orange icon)

Tags to use in CSVs

You can add any of the below tags in the "Tags" column of your CSVs to that tag to the transaction upon import. Mind that only one tag can be added to each row.

Learn more what each tag does in

⬇️ Tags for deposits

  • Income tags
    other income, reward, mining, airdrop, fork, salary, lending interest

  • Loan tags
    loan, marg loan

  • Futures tags
    These are your futures gains or fees paid to you (received)
    realized gain, futures fee, funding fee

  • Staking tags
    ☝️ Transactions with this tag will be skipped upon import
    unstake

  • Other tags
    cashback, fee refund

⬆️ Tags for withdrawals

  • Cost tags
    cost, other fee, margin fee, loan fee

  • Loan tags
    loan repayment, margin repayment

  • Tax-free tags
    lost, gift, donation

  • Futures tags
    These are your futures losses or fees paid by you (spent)
    realized gain, futures fee, funding fee

  • Staking tags
    ☝️ Transactions with this tag will be skipped upon import
    stake

🔄 Tags for trades

  • LPing tags
    ☝️ Only add this tag to trades involving an LP token
    liquidity in, liquidity out

  • Swap tag
    swap tag is not available when importing data using CSVs (it's ignored).
    This tag can only be added manually after importing the file

Extended symbol notation

In crypto multiple tokens can have the same symbol. When importing a CSV, Koinly chooses the most popular token with the particular symbol in its database. Sometimes this means that the wrong token gets imported.

You can ensure Koinly imports the correct currency either by using Koinly's internal ID of the token or using its contract address in the CSV instead of just the symbol.

Using contract address

You can add the contract address of the symbol and (optionally) the blockchain's native currency to target a specific token. The format is:

SYMBOL:CONTRACT_ADDRESS:BLOCKCHAIN

Using WIF as an example, you can put

​WIF:EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjmor​

or

WIF:EKpQGSJtjMFqKZ9KQanSqYXRcF8fBopzLHYxdM65zcjm:SOL 

in the "Currency" column to ensure the correct WIF is imported:

If you want to add NFTs, you can use the same notation:

NFTs

To target a specific NFT, add the NFT's index using ## after the symbol. Note that there are two hash characters after the symbol:

SYMBOL##INDEX:CONTRACT_ADDRESS:BLOCKCHAIN

For example, to import a Bored Ape #2042, you would put:

BAYC##2042:0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D

In the "Currency" column of your file

Using Koinly ID

Every currency in Koinly has its own unique ID. You can find it by searching for the token on our Markets page - the ID will be visible in the URL:

Use this ID instead of the symbol, with the format:

ID:000000

Using WIF as an example - instead of WIF, you would put

ID:18431515

in the "Currency" column of your file:

Common questions

How to add a transfer

One CSV files should contain transactions "from the perspective" of one wallet only. Because of that, to add a transfer, you need two files, each imported to a different wallet in Koinly:

  • First file contains a withdrawal (imported to wallet A)

  • Second file contains a deposit (imported to wallet B)

If the withdrawal matches the deposit (time, currency, etc.) then, after importing, Koinly will automatically merge them into a non-taxable transfer.

For more information, see:

My CSV is not recognized

If the file you created using our templates is not recognized (error "unknown file) it's either because:

  • Some of the required columns are missing

  • Some of the columns have different names

Check that your file has the exact same columns as the templates. Common errors:

  • Typos like "Currenc" instead of "Currency", "Amuot" instead of "Amount", etc.

  • Similar but not exact column names like "Time" instead of "Date", "Token" instead of "Currency", etc.

  • "Koinly Date" instead of "Date" when using Universal template (only Simple and Trades templates use "Koinly Date")

Did this answer your question?