Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.taxmaxi.com/llms.txt

Use this file to discover all available pages before exploring further.

Once a source has a completed sync, you can calculate its tax liability for any year and jurisdiction. TaxMaxi applies FIFO (first-in, first-out) accounting to your normalized transaction records and returns a breakdown of gains, losses, and income. The calculation runs on demand each time you call the endpoint, so you can re-run it after a replay or for different years without any additional setup. Required header: Authorization: Bearer <token>
TaxMaxi provides tax calculation results for informational purposes only. The output of this API is not tax advice. You should consult a qualified tax professional before filing any tax return.

Calculate tax

Calculates jurisdiction-specific tax figures from normalized FIFO and income data for the specified source.
POST /v1/sources/:sourceId/tax
The source must have a sync with status: "completed" before you call this endpoint. If the source has never been synced or the most recent sync failed, the API returns a 404.

Path parameters

sourceId
string
required
The ID of the source to calculate tax for.

Request body

year
integer
required
The tax year to calculate. Must be between 1970 and the current year (inclusive).
jurisdiction
string
required
The tax jurisdiction to apply. Currently supported: "germany".

Response fields

year
number
required
The tax year the calculation applies to.
currency
string
required
The base currency in which all monetary values are expressed (e.g. "EUR").
taxableGains
number
required
Net gains from crypto assets held for less than one year. These are subject to income tax in Germany.
taxableLosses
number
required
Net losses from crypto assets held for less than one year. These can offset taxable gains.
taxFreeGains
number
required
Gains from crypto assets held for more than one year. Under German tax law, these gains are tax-free.
incomeTotal
number
required
Total income from non-trade events such as staking rewards, airdrops, and other income-classified transactions.

Errors

StatusCodeDescription
400SourceBadRequestErrorThe request body is missing required fields or contains invalid values.
404SourceNotFoundErrorNo source was found for the given ID, or the source has not completed a sync.
500InternalServerErrorAn unexpected server error occurred.

Example

curl --request POST \
  https://api.taxmaxi.com/v1/sources/src_01hzqe3kj8t2v5n6b7d9f0gx/tax \
  --header "Authorization: Bearer <token>" \
  --header "Content-Type: application/json" \
  --data '{
    "year": 2024,
    "jurisdiction": "germany"
  }'
Response
{
  "year": 2024,
  "currency": "EUR",
  "taxableGains": 4250.80,
  "taxableLosses": 310.50,
  "taxFreeGains": 12000.00,
  "incomeTotal": 875.25
}

Understanding the response

FieldDescription
taxableGainsGains from selling or swapping crypto held for less than 12 months. In Germany, these are taxed as income.
taxableLossesLosses from assets held less than 12 months. You can offset these against taxable gains in the same year.
taxFreeGainsGains from assets held for more than 12 months. German tax law exempts these from taxation.
incomeTotalThe total value received from staking rewards, airdrops, and similar income events at the time of receipt.
All values are in the base currency returned in the currency field.