Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (18.6%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
Statistics
  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 2
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog License

README.Rmd

---
output: 
  github_document:
    df_print: kable
---



```{r setup, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-"
)
options(scipen = 999)
```


[![R-CMD-check](https://github.com/cryptoltruist/cryptoTax/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/cryptoltruist/cryptoTax/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/cryptoltruist/cryptoTax/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cryptoltruist/cryptoTax?branch=main)


# cryptoTax: Crypto taxes in R (Canada only) 

*Disclaimer: This is not financial advice. Use at your own risks. There are no guarantees whatsoever in relation to the use of this package. Please consult a tax professional as necessary*.

---

Helps calculate crypto taxes in R.

1. First, by allowing you to format .CSV files from various exchanges to one large dataframe of organized transactions.
2. Second, by allowing you to calculate your Adjusted Cost Base (ACB), ACB per share, and realized and unrealized capital gains/losses.
3. Third, by calculating revenues gained from staking, interest, airdrops, etc.
4. Fourth, by calculating superficial losses as well, if desired.

This is a work in progress. If you notice bugs, please report them: https://github.com/cryptoltruist/cryptoTax/issues.

# Why use `cryptoTax`?

What are the benefits of using an R package to do your crypto taxes as opposed to an online commercial software?

1. Full transparency on algorithms (open code)
2. You stay in control of your data (no need to upload it on another platform)
3. You can reuse your script (no need to start from scratch every year)
4. No limit on the number of transactions
5. Easy to automatically recategorize transactions as desired
6. Unlimited flexibility thanks to the power of R
7. The community can contribute for continuous improvement and feature requests
8. Easy to export a csv or excel file from all formatted transactions
9. It is free

# Installation

To install, use:

``` r
remotes::install_github("cryptoltruist/cryptoTax")
```

# ACB demo

```{r}
library(cryptoTax)
data <- data_adjustedcostbase1
data
ACB(data, spot.rate = "price", sup.loss = FALSE)
```

For more on calculating the ACB, as well as superficial losses, see the [corresponding vignette](https://cryptoltruist.github.io/cryptoTax/articles/ACB.html).

# Supported exchanges

Currently, the following exchanges are supported with the `format_*` (or `format_detect()`) functions:

1. Adalite
1. Binance
1. BlockFi
1. Crypto.com (app, exchange, wallet)
1. Celsius
1. CoinSmart
1. Exodus wallet
1. Gemini
1. Newton
1. Pooltool (ADA)
1. Presearch
1. Shakepay
1. Uphold

To support another exchange not listed here, please open an issue. You can also prepare your own file according to the style of one of those exchanges and use the corresponding function.

# Workflow demo

```{r workflow, warning=FALSE, message=FALSE}
# Prepare list of coins
my.coins <- c("BTC", "CRO", "ETH", "ETHW")
list.prices <- prepare_list_prices(coins = my.coins, start.date = "2021-01-01")
# Note that for some exchanges this step may be unnecessary

# Load data and format shakepay file
data(data_shakepay)
formatted.shakepay <- format_shakepay(data_shakepay)

# Load data and format CDC file
data(data_CDC)
formatted.CDC <- format_CDC(data_CDC)

# Merge data from the different exchanges
all.data <- merge_exchanges(formatted.shakepay, formatted.CDC)

# Format data with ACB
formatted.ACB <- format_ACB(all.data)

# Let's get a preview of the output
as.data.frame(formatted.ACB[c(1, 4, 8, 10, 19, 20), c(1:6, 7:14, 24:26)])
```

### Summary info

```{r summary, warning=FALSE}
# Get latest ACB.share for each coin (ACB)
report_overview(formatted.ACB,
  today.data = TRUE, tax.year = "2021",
  local.timezone = "America/Toronto",
  list.prices = list.prices
)

# Get summary of realized capital gains and losses
report_summary(formatted.ACB,
  today.data = TRUE, tax.year = "2021",
  local.timezone = "America/Toronto",
  list.prices = list.prices
)
```

### Revenue estimation

```{r revenues, warning=FALSE}
table.revenues <- report_revenues(formatted.ACB, tax.year = "2021")
table.revenues

# Plot revenues by exchange
crypto_pie(table.revenues)

# Plot revenues by reward type
crypto_pie(table.revenues, by = "revenue.type")
```

---

*Disclaimer: This is not financial advice. Use at your own risks. There are no guarantees whatsoever in relation to the use of this package. Please consult a tax professional as necessary*.

Owner

  • Name: Mr. Cryptoltruist
  • Login: cryptoltruist
  • Kind: user

GitHub Events

Total
  • Push event: 3
Last Year
  • Push event: 3

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
cran.r-project.org: cryptoTax

Report Crypto Taxes (Canada Only)

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 29.8%
Average: 32.6%
Dependent repos count: 35.5%
Maintainers (1)
Last synced: over 1 year ago

Dependencies

.github/workflows/R-CMD-check.yaml actions
  • actions/checkout v3 composite
  • r-lib/actions/check-r-package v2 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkgdown.yaml actions
  • JamesIves/github-pages-deploy-action v4.4.1 composite
  • actions/checkout v3 composite
  • r-lib/actions/setup-pandoc v2 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/test-coverage.yaml actions
  • actions/checkout v3 composite
  • actions/upload-artifact v3 composite
  • r-lib/actions/setup-r v2 composite
  • r-lib/actions/setup-r-dependencies v2 composite
DESCRIPTION cran
  • R >= 2.10 depends
  • RColorBrewer * imports
  • crypto2 * imports
  • curl * imports
  • dplyr * imports
  • ggplot2 * imports
  • ggrepel * imports
  • lubridate * imports
  • priceR * imports
  • progress * imports
  • rlang * imports
  • rstudioapi * imports
  • stringr * imports
  • tidyr * imports
  • tidyselect * imports
  • covr * suggests
  • flextable * suggests
  • knitr * suggests
  • rmarkdown * suggests
  • spelling * suggests
  • testthat >= 3.0.0 suggests
  • usethis * suggests