Learn

How crypto trading bot profits are taxed in Spain

If you run an automated trading bot on a Spanish tax residence, the profits are not some special category — they are ordinary capital gains and losses (ganancias y pérdidas patrimoniales) on the disposal of crypto-assets. The wrinkle with a bot is volume: a strategy like grid trading closes lots of small buy-then-sell round trips, and each one is a separate taxable event in the eyes of the Agencia Tributaria (AEAT).

What counts as a taxable event

Three things a bot does routinely trigger a gain or loss to report:

Simply holding a coin, or moving it between your own wallets, is not a disposal and is not taxed. The gain is the euro value at disposal minus the euro acquisition cost, and Spain generally applies the FIFO rule (first in, first out) when you have bought the same coin at different prices.

How the gains are taxed

Net crypto gains are integrated into the savings tax base (base imponible del ahorro), separate from your salary. That base is taxed on a progressive scale that in recent years has started around 19% on the first tranche and risen to roughly 28% on the largest amounts. Losses realised during the year can offset gains, with limited room to offset against other savings income and to carry forward — so the losing trades your bot inevitably makes are not wasted, they reduce the taxable total.

The forms: Modelo 100 and Modelo 721

You report the net result in your annual income tax return, the Modelo 100 (Renta), filed in the spring for the previous calendar year. Separately, if you hold crypto-assets on platforms located abroad above the legal threshold, there is an informative declaration, the Modelo 721, filed early in the year. Thresholds and obligations change, so always check the current AEAT instructions for your tax year.

Why a bot makes record-keeping the real job

The tax treatment is not complicated; the bookkeeping is. A bot that trades all day can produce hundreds or thousands of disposals, each one needing an acquisition cost and a disposal value in euros. The practical advice is to keep a complete, exportable trade history from day one. This is one quiet advantage of a non-custodial setup: because the bot trades inside your own exchange account, the full record lives where you control it and can be exported for your accountant or tax software.

A note on doing this properly

Spanish crypto tax rules have tightened steadily and the AEAT actively cross-checks exchange data. The safe approach is boring: keep your records, declare every year, and run the numbers with a qualified asesor fiscal who knows crypto. Nothing here is tax or legal advice — it is a plain-English map of how the pieces fit so you can ask the right questions.

Frequently asked questions

Do I pay tax on every trade my bot makes?

In Spain each disposal of a crypto-asset — selling to euros or swapping one crypto for another — is a taxable event that produces a capital gain or loss. A grid bot makes many small disposals, so a profitable bot can generate hundreds of individual gains and losses that you aggregate at the end of the year. Holding a coin without selling is not taxed.

What tax rate applies to crypto gains in Spain?

Net crypto gains go into the savings tax base (base del ahorro), taxed on a progressive scale that in recent years has run from 19% on the first tranche up to 28% on the largest. Losses in the year can offset gains, with limited offset against other savings income. Confirm the current brackets for your tax year.

Which forms do I need to file?

Crypto gains are declared in your annual income tax return (Modelo 100, the Renta). If you hold crypto on platforms located abroad above the legal threshold, you may also have to file the informative Modelo 721. Rules and thresholds change, so check the AEAT guidance for the year.

Does it matter if the bot is non-custodial?

For tax purposes what matters is who realises the gains — you do, because the assets and the trades are in your own exchange account. A non-custodial bot doesn't change your tax position, but it does mean your records (trade history, balances) live in your own account, which makes them easier to export for your filing.

Risk notice

Crypto trading involves substantial risk. Grid strategies can lose money, including your full allocated capital, in strongly trending or highly volatile markets. Nothing on this page is financial advice.

Read the full Terms & Risk Notice

GRIDVULCAN is a non-custodial BTC/USDT grid bot, in private beta.

Join the waitlist