Skip to main content
All CollectionsImporting Your Data
How can I import my margin transactions into CoinLedger?
How can I import my margin transactions into CoinLedger?

Import your margin transactions into CoinLedger in a few simple steps

Benjamin Yoder avatar
Written by Benjamin Yoder
Updated over 6 months ago

CoinLedger supports tax calculations for margin trades and allows you to import some margin transactions automatically. If we don't yet support automatic imports of margin transactions from the exchange you're using, you can import your leveraged buys and sells manually using the CoinLedger app. Read below for more information on how to import your margin transactions.

Which exchanges can I import my margin transactions from?

You can import your margin transactions from any exchange using one of two import methods. Currently, CoinLedger supports automatic imports of margin transactions from Kraken, with support for margin trades on additional exchanges going live in the future. In the meantime, you can import leveraged buys and sells from any exchange into CoinLedger manually using the Add Transaction button on the Transactions page. Find step-by-step instructions for this process here.

To import your margin transactions from Kraken, please see the import instructions in this guide. Please note that we currently only support importing margin transactions from Kraken through Kraken's API import method. Importing margin transactions through Kraken's CSV files into CoinLedger is not possible at this time.

What is margin trading?

When you trade cryptocurrency on margin, you borrow money from exchanges or other brokers to carry out trades. To better understand the concept of margin trading, imagine that you have 1 ETH worth $3,000. If you are using an exchange that offers 3x leverage, you can use your ETH as collateral to borrow up to $9,000. However, if you lose money on a trade and you no longer meet the platform’s minimum margin trading requirements, your collateral could be liquidated.

How are margin transactions taxed?

Although the IRS has not yet provided explicit guidance on how margin trades for crypto should be taxed, we can infer the proper tax treatment from similar asset classes like equities. Generally, profits and losses generated from margin trading are reportable as capital gains and losses, similar to other cryptocurrency disposals. You only have a taxable event when you "realize" a gain or loss from your crypto margin trading.

If you fall under an exchange’s minimum requirements for margin trading, it’s possible that your collateral will be liquidated to cover the exchange’s costs. Margin trading liquidations are considered a taxable event subject to capital gains tax. CoinLedger makes the complicated process of calculating your gains and losses from margin trades simple. To learn more about the taxation of margin transactions, please see this guide.

How can I manually import my margin transactions into CoinLedger?

If CoinLedger does not yet support automatic imports of margin transactions from an exchange you use, you can import those manually into the CoinLedger app.

Step 1

First, head to the Transactions page. Then, select Add Transaction.

Step 2

CoinLedger allows you to import Leveraged Buys, Leveraged Sells, Margin Fees and Margin Gains into CoinLedger. Under Classification, select the Transaction Type you would like to import.

Then, select the transaction type you want to enter. Here is a description of each transaction type:

  • Leveraged Buy: A margin buy that creates a long position and/or closes a short position. The asset sent can be fiat or crypto.

    • You may add a Margin Gain or Margin Loss depending on whether you have closed a position.

    • When entering a Leveraged Buy, you should only add a Margin Gain in this transaction if you are closing a short position (a sell closes a “long” spot position on margin and a buy closes a “short” spot position on margin).

  • Leveraged Sell: A margin sell that creates a short position and/or closes a long position.

    • You may add a Margin Gain or Margin Loss depending on whether you have closed a position.

    • When entering a Leveraged Sell, you should only add a Margin Gain in this transaction if you are closing a long position (a sell closes a “long” spot position on margin and a buy closes a “short” spot position on margin).

  • Margin Fee: A fee incurred as interest to maintain position on margin. Some platforms, such as Kraken, refer to these fees as "rollover fees".

  • Margin Gain: A margin gain transaction is any gain or loss obtained when closing (or while holding) a margin position. We recommend entering margin gains into CoinLedger as part of Leveraged Buy or Sell transactions because this will allow your margin positions to be represented most accurately in our portfolio tracker. If you are unable to obtain detailed information on your leveraged buys/sells from the platform you're using, a standalone Margin Gain transaction can be entered into our app instead.

Once you have finished entering each of the required fields for this transaction, press Save.

Have any further questions about importing margin transactions into CoinLedger? Reach out to our team any time at [email protected] :)

Did this answer your question?