get_tax_estimate
ESTIMATE of capital-gains tax in a country, in that country's currency: the country's cost method (FIFO, average cost, LIFO, UK pooling, annual sum), each trade converted at the ECB rate of its date, the rules of the year of sale, holding period, annual allowance and, where the law allows, losses carried from previous years. Not a tax return. Each country's options are in list_tax_countries (options field).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | Tax year of the sales (optional). In the UK and Australia it is the year the tax year starts (2025 = 2025/26). | |
| country | Yes | Two-letter country code (e.g. PT, ES, US). See list_tax_countries. | |
| alternative | No | BR, PT, AR and AT only: the alternative option for where the coins are held (BR foreign exchange; PT broker outside the EU/EEA with no tax treaty; AR sale in pesos; AT Austrian platform). | |
| marginalRate | No | Only where the rate depends on income (DE, GB, US, CA, AU, LU, MX): the person's marginal rate as a fraction (0.35 = 35%). Without it the top rate is used. | |
| marginalRateLong | No | US only: the person's long-term rate as a fraction (0, 0.15 or 0.20, plus 0.038 NIIT if applicable). |