I am using gnucash for tracking my stocks, ETFs and cryptocurrencies. For the latter, I often heard the recommendation to treat them as a security. As such, I added a CRYPTO namespace in the securities editor, for example for BTC.

Now I bought BTC at different exchanges which are in different countries (and currencies). Example:

CA Assets:Investments:Newton:Cash                 (Type: Cash, Commodity: Canadian Dollars)
CA Assets:Investments:Newton:Bitcoin              (Type: Stock, Commodity: Bitcoin)
US Assets:Investments:Gemini:Cash                 (Type: Cash, Commodity: US Dollars)
US Assets:Investments:Gemini:Bitcoin              (Type: Stock, Commodity: Bitcoin)

Of course, these "stocks"/"securities" won't be on those exchanges for a long time. Hence I transfer them to my personal wallet:

Crypto:Bitcoin Wallet                             (Type: Stock, Commodity: Bitcoin)

Now the problem is: The fields Price/Buy/Sell in CA Assets:Investments:Newton:Bitcoin are in Canadian Dollars. The fields Price/But/Sell in US Assets:Investments:Gemini:Bitcoin are in US dollars.

Where do I set the currency for Crypto:Bitcoin Wallet? Ideally I would them to be USD.

However, when I transfer "stocks" (Bitcoin) from CA Assets:Investments:Newton:Bitcoin to Crypto:Bitcoin Wallet, the Canadian amount is shown. When I transfer from US Assets:Investments:Gemini:Bitcoin the USD amount is shown. Different currencies are shown in the same account!

It seems that it is not the number of securities that is linked but the price ... and the price potentially does not have a currency (and conversion) attached.

How to best deal with this dilemma?

1 Answer 1


Where do I set the currency for Crypto:Bitcoin Wallet? Ideally I would them to be USD.

I don't think you actually want that. A bitcoin wallet does not hold US dollars, or Canadian dollars. It holds bitcoins, which you already indicated is the currency for that account:

Crypto:Bitcoin Wallet       (Type: Stock, Commodity: Bitcoin)

It sounds like what you might want is trading accounts. With trading accounts, you can track your bitcoins, and also their cost basis. If you are buying BTC with CAD and USD, then your cost basis is a combination of CAD and USD. So you might have accounts like this:


Buying BTC looks like this:

US Assets:Investments:Gemini:Bitcoin   1 BTC
Trading:USD                            35000 USD
Trading:BTC                                        1 BTC
US Assets:Investments:Gemini:Cash                  35000 USD

Transferring it to your wallet:

                                       Dr          Cr
Crypto:Bitcoin Wallet                  1 BTC
US Assets:Investments:Gemini:Bitcoin               1 BTC

Perhaps you then transfer some BTC from your wallet to someone else, who compensates you by handing you a wad of cash:

                                       Dr          Cr
Trading:BTC                            1 BTC       
Assets:Cash                            35700 USD
Crypto:Bitcoin Wallet                              1 BTC
Income:Trading Gains                               700 USD
Trading:USD                                        35000 USD

The nice thing about using trading accounts is they preserve the inherent balance in a double-entry accounting system. Notice in the last transaction, Trading:USD is credited 35000 USD because that was the cost basis of this particular bitcoin. Combined with the $35700 debit to Assets:Cash this leaves the transaction unbalanced, so an additional $700 must be credited to an income account to make it balance.

Also, if you tell GnuCash the current exchange rates for the currencies involved, it can calculate your unrealized losses or gains. You can also move the trading accounts into a common sub-account, thus tracking the cost basis and unrealized gains of your bitcoin trading separately from stock trading, for example.

This does mean you have to somehow track the cost basis of your bitcoin purchases. There are many ways you could do it. Tax laws may require that you do it a particular way, and that will even more complicated if you trade BTC for USD and CAD.

  • 1
    This looks really promising, thanks. I'm looking into that right now. What I am wondering though: I already have millions of "normal" transactions between different currencies in my file (for example, I used my US credit card in Canada). What happens to to those existing ones? I see many of them have a get box with an "x" now. How do I get those in order? Do I mess anything up? Or do I need to start from scratch when enabling the trading accounts?
    – divB
    Jan 18, 2021 at 20:29
  • 1
    Another remark: For these "normal" (paying with US CC in Canada) cross-currency transactions I would reeeally love to keep the old system (just cross-booking via exchange rate). Is this possible somehow?
    – divB
    Jan 18, 2021 at 20:32
  • Looking for GNUCash + Crypto in all of StackExchange, this is the only question that shows up in search results. I'm in a similar situation, only that I live in Argentina, so I have to deal with exchange rates varying all the time. I'm still learning to use GNUCash, and at first I was tracking all my finances in ARS (Argentine Pesos), until I figured that tracking everything in USD was more appropriate and realistic. Only recently started to invest in Mutual Funds, CEDEAR, and Crypto, and the most annoying part is having to manually keep track of those instrument values in the Price Database.
    – Simón
    Nov 11, 2021 at 17:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .