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

Crypto trading bots: wealth management or economic activity?

Wealth management vs. economic activity (Article 27.1 LIRPF) · V2232-25 · V1950-21

An intuition circulates about automated crypto trading that the administrative doctrine does not share: that, beyond a certain volume or sophistication —a bot that trades on its own, dozens of orders a week, an algorithm that never rests—, the activity “becomes professional” and starts to be taxed as an economic activity. The DGT has made clear that this is not so, and the distinction matters, because it completely changes the tax base, the applicable rate and the formal obligations.

The boundary is not automation, but the organisation of means

Article 27.1 of the Personal Income Tax Act defines income from an economic activity by the self-employed organisation of means of production and human resources —of one or of both— with the aim of taking part in the production or distribution of goods or services. Two elements must be present: the organisation of means and the intention of taking part in the market by providing something to third parties.

A trading bot supplies neither. Someone who lets an algorithm buy and sell crypto-assets with their own capital is not organising means to take part in the market: they are managing their own wealth. Automation replaces the investor’s manual decision, but it does not transform the nature of what they do. Nor does frequency: trading a thousand times for oneself is still trading for oneself.

The DGT’s criterion: V2232-25

Ruling V2232-25, of 24 November 2025, resolves this exact case: a taxpayer carrying out purchases, sales and barters of cryptocurrencies executed through an automation software program. The DGT concludes that, by confining themselves to operating with their own capital and assets, without providing services to third parties or receiving intermediation fees or commissions, neither the minimal organisation required by Article 27.1 LIRPF nor the aim of taking part in the production or distribution of goods or services is present. There is, therefore, no economic activity.

The criterion reaches a plane many overlook: there is no liability to the Tax on Economic Activities (IAE) either. Buying and selling cryptocurrencies for oneself —whether by an individual, a legal person or an entity without legal personality— does not constitute an economic activity, regardless of the number of operations or their amount (Articles 78 and 79 of the consolidated Local Finances Act). Volume, on its own, is irrelevant.

The consequence: gains and losses within the savings base

If there is no economic activity, each purchase, sale or barter executed by the bot gives rise to a capital gain or loss included in the savings base of IRPF, with the mechanics set out in the analysis on the disposal and exchange of crypto-assets: transfer value less acquisition value, identification of the units sold under the FIFO criterion and, on the exchange of one crypto-asset for another, the barter rule of Article 37.1.h) LIRPF.

Automation has an uncomfortable practical effect here. A bot that trades daily accumulates hundreds of taxable events a year —each barter included—, even though the taxpayer has never converted their crypto-assets into euros. The obligation to report them does not depend on withdrawing the cash, but on losing ownership of the asset in each operation. Keeping an orderly record ceases to be a recommendation and becomes a necessity.

The trap of the bot’s fees

There is a point that often comes as a surprise. The fees paid to the software provider —both the fixed fee and the success fee, calculated as a percentage of the net profit for the period— neither reduce the capital gain nor are deductible under any other heading. The DGT reasons this in V1950-21: those fees remunerate the overall result of the period, not specific acquisition or transfer operations, so they are not an expense “inherent” within the meaning of Article 35 LIRPF.

The asymmetry with mining is clear. The miner who carries on a genuine economic activity deducts their electricity, their hardware and the pool fees; the investor operating with a bot on a wealth-management basis bears the cost of the software with no tax effect at all. The very operational intensity that is not enough to reach an economic activity does not open the door to its deductible expenses either.

When the boundary is crossed

The criterion of V2232-25 rests on a specific fact: the taxpayer was operating for themselves. The conclusion would change if the activity ceased to be self-management and became a service provided to third parties —managing others’ portfolios, charging intermediation fees, developing and marketing the bot itself, or raising capital from investors to trade on their behalf—. There would then be an organisation of means with the aim of taking part in the market, and the income would shift to an economic activity, taxed in the general base, with deductibility of the related expenses and the corresponding census-registration and VAT obligations.

The interposition of a company does not change the starting point. The DGT itself makes clear that buying and selling for oneself is not an economic activity even when carried out by a legal person, which connects with the asset-holding cautions analysed in the study on holding crypto-assets through a company: automating the trading within a company does not, by that fact alone, turn it into an operating business.

DGT rulings — IRPF / IAE
  • V2232-25 (24 November 2025) — buying, selling and bartering cryptocurrencies for oneself, executed through an automation program, does not constitute an economic activity for IRPF (Article 27.1 LIRPF) and is not subject to IAE (Articles 78 and 79 TRLRHL), regardless of the number of operations or their amount.
  • V1950-21 (21 June 2021) — the fixed and success fees paid to an automated trading system are not an expense inherent within the meaning of 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 Finances Act (Royal Legislative Decree 2/2004).

Clear criterion: the automated trading of crypto-assets for oneself is wealth management (capital gains and losses within the savings base), not an economic activity, however intense or automated it may be (V2232-25); the bot's fees are not deductible (V1950-21). The boundary is crossed only where services are provided to third parties.