CryptoTax API (1.0)

Download OpenAPI specification:Download

Introduction

The CryptoTax API gives you the ability to create legislation- and standards-compliant tax reportings for you and your customers.

In essence, creating a single tax report can be accomplished in two steps:

  1. You post transaction information to the /requestReportCalculation API endpoint, also specifying information such as the tax country and tax year, and the format of the tax reportings.
  2. You poll the /checkResult API endpoint until the calculation has been completed and your tax report is ready for download.

This is the base URL of the CryptoTax API:
https://api.cryptotax.io/

Authentication

The CryptoTax API is secured using JWT tokens. You must pass your individual token for each request using the HTTP header parameter Authorization.

Example:
Authorization: Bearer <token>

If you haven't requested your API token yet, please reach out to us at contact@cryptotax.io for more details, or visit the CryptoTax.io website.

Demo

You find a simple demo application in our GitHub repository here. It shows you how to use the CryptoTax API to create a tax report.

White Labeling

There are three options for white labeling reports created through the CryptoTax API:

  1. only use the CryptoTax logo,
  2. co-label the report with your own logo
  3. only use your logo.

If you want to opt for option (2) or (3), please send us your logo image when requesting API access.

Also, please provide your address information to include on the report cover letter.

Reporting Base Currency

The tax report calculations are always based on a country's (fiat) currency.

For Germany (country code DE) the base currency must always be EUR (i.e. asset id 870).
For Switzerland (country code CH) the base currency must always be CHF (i.e. asset id 463).

For all other tax countries you can choose one of the following supported fiat currencies as a base:

Fiat currency CryptoTax asset id Code
Australian Dollar 156 AUD
Brazilian Real 326 BRL
Canadian Dollar 404 CAD
Swiss Franc 463 CHF
Chilean Peso 494 CLP
Chinese Yuan 517 CNY
Czech Koruna 611 CZK
Danish Krone 678 DKK
Euro 870 EUR
Pound Sterling 983 GBP
Hong Kong Dollar 1120 HKD
Hungarian Forint 1151 HUF
Indonesian Rupiah 1177 IDR
Israeli New Shekel 1187 ILS
Indian Rupee 1209 INR
Japanese Yen 1268 JPY
South Korean Won 1315 KRW
Mexican Peso 1576 MXN
Malaysian Ringgit 1580 MYR
Norwegian Krone 1644 NOK
New Zealand Dollar 1683 NZD
Philippine Peso 1762 PHP
Pakistani Rupee 1778 PKR
Polish Zloty 1785 PLN
Russian Ruble 1964 RUB
Swedish Krona 2014 SEK
Singapore Dollar 2027 SGD
Thai Baht 2222 THB
Turkish Lira 2286 TRY
New Taiwan Dollar 2294 TWD
United States Dollar 2335 USD
South African Rand 2599 ZAR

API endpoints

Get a list of supported assets

This API endpoint gives you information on all currently available assets and their ids. You need this information when loading transaction data for tax calculation (i.e. /requestReportCalculation API endpoint).

Authorizations:
key (global)

Responses

200

OK

401

Unauthorized

403

Forbidden

404

Not Found

get /api/v1/assets
https://api.cryptotax.io/api/v1/assets

Response samples

Content type
application/json
Copy
Expand all Collapse all
[
  • {
    }
]

Check for finished tax calculation results

This API endpoint is used to check on the status of a started calculation request. If the status property of the response shows the value COMPLETED, the calculation results can be found on the data property.

Authorizations:
key (global)
query Parameters
request_id
string

Request id which was fetched during tax data calculation request and should be used for fetching tax data

Responses

200

Calculated tax data

401

Unauthorized

403

Forbidden

404

Tax data for requestId is not found

get /api/v1/checkResult
https://api.cryptotax.io/api/v1/checkResult

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "data": { },
  • "error": "string",
  • "format": "json",
  • "requestId": "string",
  • "status": "NEW",
  • "taxReportUrl": "string"
}

Load transaction data for tax calculation

This API endpoint is used to request a new tax data calculation. In addition to information on all transactions (e.g. deposits, withdrawals, trades), you specify the tax year and country for which the report should be generated, as well as the report format (e.g. PDF).

Authorizations:
key (global)
Request Body schema: application/json

requestDto

baseAssetId
required
integer <int32>

Base asset id, only fiat is allowed

format
string
Enum: "json" "xlsx" "pdf"

Tax data format, default value json

taxCountryCode
required
string
Enum: "DE" "CH" "INT"

The tax country this report is created for. Use DE or CH for country-specific tax reports, or INT for a universal tax report that is based on the fiat currency specified in parameter baseAssetId.

taxYear
required
integer <int32>

Year for which tax data should be calculated

trades
required
Array of objects (ApiTradeDto)

List of transactions

Responses

200

Data for tax calculation is loaded successfully

201

Created

401

Unauthorized

403

Forbidden

404

Not Found

post /api/v1/requestReportCalculation
https://api.cryptotax.io/api/v1/requestReportCalculation

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "baseAssetId": 870,
  • "format": "pdf",
  • "taxCountryCode": "DE",
  • "taxYear": 2018,
  • "trades":
    [
    ]
}