guest@tfb:~$ cat analysis/crypto trading bots tax.md
guest@tfb: ~/analysis — less

Taxation under IRPF of trading with bots

Private wealth management vs. business activity (Article 27.1 LIRPF) · V2232-25 · V1950-21
Spanish income tax on crypto: how IRPF works 5 min · ≈1 blockReviewed 29 November 2026

An increasingly common case is that of the investor who leaves a bot trading crypto-assets that places dozens of orders a week and hundreds of purchases, sales and swaps over the year, without its owner having taken a single manual decision or converted anything into euros. Faced with that volume, it is common to assume that the activity has become professional and is taxed as an economic activity. However, the DGT has ruled this out, and the question is not a minor one, since it determines the tax base in which the income is included, the applicable rate, the deductible expenses and the formal obligations.

The boundary: organisation of means

Article 27.1 of the IRPF Act defines income from an economic activity by reference to the organisation on one’s own account of means of production and human resources, or of either of them, in order to take part in the production or distribution of goods or services.

Strictly speaking, a trading bot meets none of these requirements. Letting an algorithm buy and sell crypto-assets with one’s own capital is not organising means in order to take part in the market, but managing one’s own assets. Automation replaces the investor’s manual decision, but it does not change the nature of what they do, and nor does the frequency of the transactions. It cannot be ignored, however, that someone who develops and deploys their own bot with material and human resources does, strictly speaking, organise means of production, even if they do so to obtain income for themselves. What is missing, though, is the aim of taking part in the production or distribution of goods or services, which is what Article 27.1 LIRPF requires.

The DGT’s criterion: ruling V2232-25

Ruling V2232-25, of 24 November 2025, resolves this exact case: a taxpayer who buys, sells and swaps cryptocurrencies through automated trading software. The DGT concludes that, since the taxpayer merely operates with their own capital and assets, without providing services to third parties or receiving fees or brokerage commissions, the minimum organisation required by Article 27.1 LIRPF is not present, nor is the aim of taking part in the production or distribution of goods or services. There is therefore no economic activity in the DGT’s view, without prejudice to the tax authorities verifying different facts; for IAE purposes, the ruling adds that this holds regardless of the number of transactions or their amount.

The same ruling also rules out liability to the Business Activities Tax (IAE).

Gains and losses in the savings base

If there is no economic activity, each purchase, sale or swap executed by the bot gives rise to a capital gain or loss included in the IRPF savings base, under the mechanics we set out in the analysis of the disposal and exchange of crypto-assets.

This is where automation has the greatest impact. A bot that trades daily accumulates hundreds of taxable events a year, each swap included, even if the taxpayer has never converted their crypto-assets into euros. Accrual occurs when ownership of the asset is lost in each transaction, not when funds are withdrawn. Without an orderly record of each order, with its date, its euro equivalent and the units involved, it will not be possible to prepare the return correctly.

The bot’s fees

The fees paid to the software provider, both the fixed fee and the performance fee (a percentage of the net profit for the period), do not reduce the capital gain and are not deductible under any other heading. The DGT reasoned this in ruling V1950-21, issued on the case of a robo-trader operating on the currency market from accounts opened with a Swiss institution, with a criterion that applies equally to crypto-assets: those fees remunerate the overall result for the period and not specific acquisitions or disposals, so they are not an “inherent expense” of the acquisition within the meaning of Article 35 LIRPF.

By contrast, a miner carrying on a genuine economic activity deducts the electricity cost, the depreciation of the equipment and the pool fees, whereas the investor using a bot under private wealth management bears the cost of the software with no tax effect at all.

When trading qualifies as an economic activity

The whole reasoning of ruling V2232-25 rests on the taxpayer trading on their own account. The conclusion would change if the activity ceased to be self-management and became a service provided to third parties: managing other people’s portfolios, charging brokerage fees, developing and marketing one’s own bot or raising capital from investors to trade on their behalf. In those cases there would be an organisation of means with the aim of taking part in the market, and the income would shift to economic activity.

DGT rulings — IRPF / IAE
  • V2232-25 (24/11/2025) — buying, selling and swapping cryptocurrencies on one’s own account, executed through an automation program, is not a business activity for IRPF purposes (Article 27.1 LIRPF) and, regardless of the number or amount of the transactions, is not subject to IAE (Articles 78 and 79 TRLRHL).
  • V1950-21 (21/06/2021) — issued on a currency trading robot, with a criterion that carries over: the fixed and performance fees paid to an automated trading system are not an inherent expense under Article 35 LIRPF: they neither reduce the capital gain nor are deductible under any other heading.

Applicable legislation: Articles 27.1, 33.1, 34, 35 and 37.1.h) LIRPF; Articles 78 and 79 of the consolidated Local Finance Act (Royal Legislative Decree 2/2004).

DGT criterion: automated trading of crypto-assets on one’s own account is private wealth management (gains and losses in the savings tax base), not a business activity, however intensive or automated it may be (V2232-25); the bot’s fees are not deductible (V1950-21). The line is crossed only where services are provided to third parties.