BittyTax
Crypto-currency tax calculator with support for all popular wallets, exchanges, explorers and migration from other crypto tax platforms
Install / Use
/learn @BittyTax/BittyTaxREADME
[![Version badge][version-badge]][version]
[![License badge][license-badge]][license]
[![CI][ci-badge]][ci]
[![Python badge][python-badge]][python]
[![Downloads badge][downloads-badge]][downloads]
[![Stars badge][github-stars-badge]][github-stars]
[![Sponsor badge][sponsor-badge]][sponsor]
[![X badge][x-badge]][x]
[![Discord badge][discord-badge]][discord]
[![PayPal badge][paypal-badge]][PayPal]
[![Bitcoin badge][bitcoin-badge]][bitcoin]
BittyTax
Overview
BittyTax is a collection of command-line tools to help you calculate your cryptoasset taxes in the UK.
This tool is designed to be used by someone who is already familiar with cryptoasset taxation rules in the UK. HMRC has published guidance on this. We've collected some useful links in the Resources section at the end.
BittyTax comprises of the following tools.
-
bittytax- process your transaction records and generate a PDF tax report (see Accounting Tool) -
bittytax_conv- convert your wallet and exchange files into transaction records (see Conversion Tool) -
bittytax_price- (optional) lookup historic price data for cryptoassets and foreign currencies (see Price Tool)
Although UK focused, many of the tools can be used for other countries and currencies, see International support.
There is also a US version of BittyTax which has its own branch, see USA.
Why use BittyTax?
- Open-source: growing community of users
- Free to use: no subscriptions, no transaction limits
- Protects your privacy: no need to share your data with a 3rd party
- Fully transparent: all calculations and data sources are provided
- Accuracy: built in integrity check, passes all the HMRC example test cases
- Auditability: compliant with HMRC auditing requirements
License/Disclaimer
This software is copyright (c) Nano Nano Ltd, and licensed for use under the AGPLv3 License, see LICENSE file for details. The BittyTaxAPI server is licensed for personal use only. If you would like a license to use this software commercially, please get in touch.
Nano Nano Ltd does not provide tax, legal, accounting or financial advice. This software and its content are provided for information only, and as such should not be relied upon for tax, legal, accounting or financial advice.
You should obtain specific professional advice from a professional accountant, tax or legal/financial advisor before you take any action.
This software is provided 'as is', Nano Nano Ltd does not give any warranties of any kind, express or implied, as to the suitability or usability of this software, or any of its content.
Getting Started
You will need Python installed on your machine before you can install BittyTax, see the installation guide which covers Windows, macOS and Linux for full details.
If you are upgrading from a previous version of BittyTax, please follow the upgrade instructions.
Transaction Records
BittyTax is only as accurate as the data you provide it. This means it's essential that you keep records of ALL cryptoasset transactions, which includes not just trades but also records of spending, income, gifts sent or received, etc.
The bittytax_conv tool is provided to assist with this transaction record keeping, it allows data exported from various different wallets and exchanges to be processed into the format required by the bittytax accounting tool. Manual entry or editing of this data may also be required. It is vital that converted data files are reviewed against the raw data and audited before use.
Transaction records can be stored in an Excel or CSV file. Excel is preferred as it makes editing and managing your data easier. Data can be split across multiple worksheets, for example, you might want to split up transactions by wallet or exchange, or by transaction type. With Excel you can also annotate your records, append additional data columns, or even include the original raw data for reference.
A transaction record is represented as a row of data which contains the following fields in the order given.
| Field | Type | Description |
| --- | --- | ---|
| Type | Deposit | Tokens deposited to a wallet you own |
| | Unstake | Tokens returned to a wallet after being staked |
| | Mining | Tokens received as income from mining |
| | Staking-Reward Staking* | Tokens received as a reward from staking |
| | Interest | Tokens received as interest |
| | Dividend | Tokens received as a dividend |
| | Income | Tokens received as other income |
| | Gift-Received | Tokens received as a gift |
| | Fork | Tokens received as the result of a blockchain fork |
| | Airdrop | Tokens received from an airdrop |
| | Referral | Tokens received as a reward through a referral program |
| | Cashback | Tokens received as cashback |
| | Fee-Rebate | Tokens received as a rebate of fees |
| | Loan | Tokens received as a loan |
| | Margin-Gain | Tokens received as a result of a margin gain |
| | Margin-Fee-Rebate | Tokens received as a rebate of margin fees |
| | Withdrawal | Tokens withdrawn from a wallet you own |
| | Stake | Tokens withdrawn from a wallet to be staked |
| | Spend | Tokens spent on goods or services |
| | Gift-Sent | Tokens sent as a gift |
| | Gift-Spouse | Tokens gifted to your spouse or civil partner |
| | Charity-Sent | Tokens sent to a charity as a gift |
| | Lost | Tokens that have been lost or stolen |
| | Loan-Repayment | Tokens returned to the lender of a loan |
| | Loan-Interest | Tokens paid as a fee to the lender of a loan |
| | Margin-Loss | Tokens deducted as a result of a margin loss |
| | Margin-Fee | Tokens paid as fees for a margin position |
| | Trade | Tokens exchanged for another token or fiat currency |
| Buy Quantity | | Quantity of the asset acquired |
| Buy Asset | | Symbol name of the asset acquired |
| Buy Value in GBP | | Value in UK pounds of the asset acquired |
| Sell Quantity | | Quantity of the asset disposed |
| Sell Asset | | Symbol name of the asset disposed |
| Sell Value in GBP | | Value in UK pounds of the asset disposed |
| Fee Quantity | | Quantity of the fee |
| Fee Asset | | Symbol name of the asset used for fees |
| Fee Value in GBP | | Value in UK pounds of the fee |
| Wallet | | Name of wallet |
| Timestamp | | Date/time of transaction |
| Note | | Description of transaction |
* - Staking has been deprecated, please use Staking-Reward.
The transaction Type dictates which fields in the row are required, either (M)andatory or (O)ptional.
| Type | Buy Quantity | Buy Asset | Buy Value in GBP | Sell Quantity | Sell Asset | Sell Value in GBP | Fee Quantity | Fee Asset | Fee Value in GBP | Wallet | Timestamp | Note |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---| --- | --- |
| Deposit | M | M | |||| O | O | O | O | M | O |
| Unstake | M | M | |||| O | O | O | O | M | O |
| Mining | M | M | O |||| O | O | O| O | M | O |
| Staking-Reward | M | M | O |||| O | O | O| O | M | O |
| Interest | M | M | O |||| O | O | O| O | M | O |
| Dividend | M | M | O |||| O | O | O| O | M | O |
| Income | M | M | O |||| O | O | O| O | M | O |
| Gift-Received | M | M | O |||| O | O | O| O | M | O |
| Fork | M | M | O |||| O | O | O | O | M | O |
| Airdrop | M | M | O |||| O | O | O| O | M | O |
| Referral | M | M | O |||| O | O | O | O | M | O |
| Cashback | M | M | O |||| O | O | O | O | M | O |
| Fee-Rebate | M | M | O |||| O | O | O | O | M | O |
| Loan | M | M | O |||| O | O | O | O | M | O |
| Margin-Gain | M | M | O |||| O | O | O | O | M | O |
| Margin-Free-Rebate | M | M | O |||| O | O | O | O | M | O |
| Withdrawal |||| M | M | | O | O | O | O | M | O |
| Stake |||| M | M | | O | O | O | O | M | O |
| Spend |||| M | M | O | O | O | O | O | M | O |
| Gift-Sent |||| M | M | O | O | O | O | O | M | O |
| Gift-Spouse |||| M | M | | O | O | O | O | M | O |
| Charity-Sent |||| M | M | O | O | O | O | O | M | O |
| Lost |||| M | M | O | O | O | O | O | M | O |
| Loan-Repayment |||| M | M | O | O | O | O | O | M | O |
| Loan-Interest |||| M | M | O | O | O | O | O | M | O |
| Margin-Loss |||| M | M | O | O | O | O | O | M | O |
| Margin-Fee |||| M | M | O | O | O | O | O | M | O |
| Trade | M | M | O | M | M | O | O | O | O | O | M | O |
-
If the Fee Asset is the same as Sell Asset, then the Sell Quantity must be the net amount (after fee deduction), not gross amount.
-
If the Fee Asset is the same as Buy Asset, then the Buy Quantity must be the gross amount (before fee deduction), not net amount.
-
The Buy Value in GBP, Sell Value in GBP and Fee Value in GBP fields are always optional, if you don't provide a fixed value, bittytax will calculate the value for you via one of its price data sources.
-
Wallet name is optional, but recommended if you want to audit your cryptoasset balances across multiple wallets.
-
Timestamps should be in Excel Date & Time format (as UTC), or if text, in the format
YYYY-MM-DDTHH:MM:SS.000000 ZZZwhere ZZZ represents the timezone, or if omitted UTC is assumed. Milliseconds or microseconds are optional. -
Cryptoasset symbol names need to be consistent throughout your transaction records. The symbol name you choose should match the symbol name used by the price data source, otherwise valuations will fail.
