{"id":48911686,"url":"https://github.com/geiserx/declarenta","last_synced_at":"2026-04-28T13:05:31.306Z","repository":{"id":350530916,"uuid":"1207185051","full_name":"GeiserX/DeclaRenta","owner":"GeiserX","description":"Convierte informes de brokers extranjeros en declaraciones fiscales españolas: Modelo 100 (Renta), Modelo 720, Modelo 721 (cripto) y D-6. 100% gratuito, privado y self-hosted.","archived":false,"fork":false,"pushed_at":"2026-04-20T23:53:34.000Z","size":3224,"stargazers_count":4,"open_issues_count":42,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-21T01:37:30.449Z","etag":null,"topics":["aeat","browser","capital-gains","degiro","dividends","fifo","hacienda","ibkr","interactive-brokers","irpf","modelo-100","modelo-720","open-source","privacy","renta","self-hosted","spain","tax","trade-republic","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GeiserX.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":"ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"geiserx","patreon":"geiser","buy_me_a_coffee":"geiser","thanks_dev":"u/gh/geiserx"}},"created_at":"2026-04-10T17:05:17.000Z","updated_at":"2026-04-20T23:53:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a14276c-b4a8-4098-91fe-db378439ca01","html_url":"https://github.com/GeiserX/DeclaRenta","commit_stats":null,"previous_names":["geiserx/declarenta"],"tags_count":70,"template":false,"template_full_name":null,"purl":"pkg:github/GeiserX/DeclaRenta","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeiserX%2FDeclaRenta","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeiserX%2FDeclaRenta/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeiserX%2FDeclaRenta/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeiserX%2FDeclaRenta/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GeiserX","download_url":"https://codeload.github.com/GeiserX/DeclaRenta/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GeiserX%2FDeclaRenta/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32274987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aeat","browser","capital-gains","degiro","dividends","fifo","hacienda","ibkr","interactive-brokers","irpf","modelo-100","modelo-720","open-source","privacy","renta","self-hosted","spain","tax","trade-republic","typescript"],"created_at":"2026-04-17T00:00:43.437Z","updated_at":"2026-04-25T20:03:35.960Z","avatar_url":"https://github.com/GeiserX.png","language":"TypeScript","funding_links":["https://github.com/sponsors/geiserx","https://patreon.com/geiser","https://buymeacoffee.com/geiser","https://thanks.dev/u/gh/geiserx","https://github.com/sponsors/GeiserX"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/banner.svg\" alt=\"DeclaRenta banner\" width=\"100%\"/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/images/logo.png\" alt=\"DeclaRenta logo\" width=\"200\"/\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eDeclaRenta\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eHerramienta fiscal gratuita para inversores con brokers internacionales.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://declarenta.com\"\u003e\u003cimg src=\"https://img.shields.io/badge/DeclaRenta-declarenta.com-DC2626?style=flat-square\u0026logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik02IDlDMiA5IDAgOCAwIDVWMUMxIDAgMiAxIDMgM1Y2QzMgOCA1IDggOCA4VjlaIi8+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0xOCA5QzIyIDkgMjQgOCAyNCA1VjFDMjMgMCAyMiAxIDIxIDNWNkMyMSA4IDE5IDggMTYgOFY5WiIvPjxwYXRoIGZpbGw9IndoaXRlIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01IDhDNSA3IDggNiAxMiA2QzE2IDYgMTkgNyAxOSA4VjE3QzE5IDIxIDE2IDIzIDEyIDIzQzcgMjMgNSAyMSA1IDE3Wk03IDEwSDExVjEzSDdaTTEzIDEwSDE3VjEzSDEzWiIvPjxyZWN0IHg9IjExIiB5PSIxMSIgd2lkdGg9IjIiIGhlaWdodD0iMSIgcng9Ii41IiBmaWxsPSJ3aGl0ZSIvPjxjaXJjbGUgY3g9IjEwIiBjeT0iMTkiIHI9Ii44IiBmaWxsPSJ3aGl0ZSIvPjxjaXJjbGUgY3g9IjE0IiBjeT0iMTkiIHI9Ii44IiBmaWxsPSJ3aGl0ZSIvPjwvc3ZnPgo=\u0026logoColor=white\" alt=\"DeclaRenta\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/GeiserX/DeclaRenta/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/GeiserX/DeclaRenta?style=flat-square\u0026color=dc2626\" alt=\"License\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/GeiserX/DeclaRenta\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/github/GeiserX/DeclaRenta?style=flat-square\u0026color=f59e0b\" alt=\"Codecov\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/GeiserX/DeclaRenta/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/GeiserX/DeclaRenta/ci.yml?style=flat-square\u0026label=CI\" alt=\"CI\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/GeiserX/DeclaRenta/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/GeiserX/DeclaRenta?style=flat-square\u0026color=f59e0b\" alt=\"Stars\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/GeiserX/awesome-spain#readme\"\u003e\u003cimg src=\"https://img.shields.io/badge/listed%20on-awesome--spain-c60b1e?style=flat-square\u0026logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIxNCIgdmlld0JveD0iMCAwIDIwIDE0Ij48cmVjdCB3aWR0aD0iMjAiIGhlaWdodD0iMTQiIGZpbGw9IiNjNjBiMWUiLz48cmVjdCB5PSIzLjUiIHdpZHRoPSIyMCIgaGVpZ2h0PSI3IiBmaWxsPSIjZmZjNDAwIi8+PC9zdmc+\u0026labelColor=ffc400\" alt=\"awesome-spain\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://declarenta.com\"\u003e\u003cstrong\u003edeclarenta.com\u003c/strong\u003e\u003c/a\u003e — Úsalo gratis, sin registro\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  IBKR · Degiro · Scalable Capital · eToro · Freedom24 · Coinbase · Binance · Kraken → Modelo 100 · Modelo 720 · Modelo 721 · D-6\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  Self-hosted · Privacidad total · Tus datos no salen de tu equipo\n\u003c/p\u003e\n\n---\n\n## Despliegue rápido\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/GeiserX/DeclaRenta)\n[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/GeiserX/DeclaRenta)\n[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/template/from?repoUrl=https://github.com/GeiserX/DeclaRenta)\n\nDeclaRenta es una web estática (Vite) — funciona en cualquier hosting de archivos estáticos. También disponible como imagen Docker: `drumsergio/declarenta:web`.\n\n---\n\n## El problema\n\nSi inviertes con un broker extranjero, hacer la renta es un infierno:\n\n- **Renta Web no importa datos** de brokers extranjeros — todo manual\n- **FIFO obligatorio** con tipos ECB oficiales (no los del broker)\n- **Regla anti-churning** (2 meses cotizados / 1 año no cotizados) que nadie detecta automáticamente\n- **Doble imposición** internacional que hay que calcular a mano\n- **Modelo 720** obligatorio si tus activos en el extranjero superan 50.000 EUR\n- **Modelo D-6** solo obligatorio si tu participación es ≥10% del capital o derechos de voto (Orden ICT/1408/2021)\n\nDeclaRenta automatiza todo esto.\n\n## Brokers soportados\n\n| Broker | Formato | Notas |\n|---|---|---|\n| Interactive Brokers | Flex Query XML | Trades, dividendos, corporate actions, posiciones |\n| Degiro | CSV (transacciones + cartera) | Delimitador auto-detectado (coma/punto y coma) |\n| Scalable Capital | CSV (14 columnas) | Incluye savings plans y distribuciones |\n| eToro | XLSX (cuenta completa) | Posiciones cerradas + dividendos + CFDs, 6+ versiones de cabeceras |\n| Freedom24 | JSON (report export) | Trades, dividendos, retenciones |\n| Coinbase | CSV (historial de transacciones) | Crypto trades y conversiones |\n| Binance | CSV (historial de trades) | Spot trades de criptomonedas |\n| Kraken | CSV (trades/ledger) | Crypto trades y staking |\n\nSe pueden combinar ficheros de varios brokers en una sola ejecución para FIFO cruzado.\n\n## Modelos fiscales\n\n| Modelo | Descripción | Formato |\n|---|---|---|\n| **Modelo 100** (IRPF) | Casillas 0327, 0328, 0029, 0033, 0358, 0588 | JSON, CSV, PDF (con tipos ECB) |\n| **Modelo 720** | Declaración de bienes en el extranjero (\u003e50.000 EUR), tipos A/M/C | Fixed-width AEAT (validado contra spec BOE) |\n| **Modelo 721** | Declaración de criptomonedas en el extranjero (\u003e50.000 EUR) | XML (AEAT) |\n| **Modelo D-6** | Inversiones en el exterior (Banco de España / AFORIX) | JSON o guía paso a paso |\n\n## Casillas del Modelo 100\n\n| Casilla | Concepto |\n|---|---|\n| 0327 | Valor de transmisión (importe total de ventas) |\n| 0328 | Valor de adquisición (coste total FIFO con tipos ECB) |\n| 0029 | Dividendos brutos de acciones extranjeras |\n| 0033 | Intereses de cuentas y depósitos |\n| — | Intereses pagados al broker (margen, no deducible — informativo) |\n| 0358 | Pérdidas patrimoniales a compensar (bloqueadas por regla anti-churning) |\n| 0588 | Deducción por doble imposición internacional |\n\n## Interfaz web\n\nLa web incluye:\n\n- **Wizard guiado**: subida de ficheros → revisión de datos → resultados con casillas detalladas\n- **Guías por broker**: instrucciones paso a paso para obtener el informe de cada broker\n- **Perfil fiscal**: NIF, nombre, CCAA y teléfono para generar 720/D-6 correctamente\n- **Secciones dedicadas**: Modelo 100, Modelo 720, Modelo D-6 con navegación lateral\n- **Gráficas interactivas**: distribución por activo, G/P mensual, composición de divisas, retenciones por país\n- **Comparativa interanual**: guarda informes en localStorage y compara variaciones año a año\n- **Detalle de casillas**: desplegable con explicación de cada casilla y su normativa\n- **PWA instalable**: funciona offline tras la primera visita\n- **Tema claro/oscuro**\n- **5 idiomas**: español, inglés, catalán, euskera, gallego\n\n## Inicio rápido\n\n### Web (recomendado)\n\nVisita [declarenta.com](https://declarenta.com) — arrastra tus ficheros y listo. Alternativa: [geiserx.github.io/DeclaRenta](https://geiserx.github.io/DeclaRenta/).\n\nSoporta `.xml`, `.csv`, `.json` y `.xlsx`. Se pueden subir varios ficheros a la vez para FIFO cruzado entre brokers.\n\n### Docker\n\n```bash\n# Web (nginx)\ndocker run -p 8080:80 drumsergio/declarenta:web\n\n# CLI\ndocker run --rm -v $(pwd):/data drumsergio/declarenta convert --input /data/flex_query.xml --year 2025\n```\n\n### CLI\n\n```bash\ngit clone https://github.com/GeiserX/DeclaRenta.git\ncd DeclaRenta \u0026\u0026 npm install \u0026\u0026 npm run build\n\n# Informe Modelo 100 (JSON a stdout)\nnode dist/cli.js convert --input flex_query.xml --year 2025\n\n# Varios ficheros de distintos brokers\nnode dist/cli.js convert --input ibkr.xml --input degiro.csv --input etoro.xlsx --year 2025\n\n# Exportar en CSV\nnode dist/cli.js convert --input flex_query.xml --year 2025 --format csv --output detalle.csv\n\n# Exportar en PDF\nnode dist/cli.js convert --input flex_query.xml --year 2025 --format pdf --output informe.pdf\n\n# Con compensación de pérdidas de años anteriores (Art. 49 LIRPF)\nnode dist/cli.js convert --input flex_query.xml --year 2025 --prior-losses perdidas.json\n\n# Modelo 720\nnode dist/cli.js modelo720 --input flex_query.xml --year 2025 --nif 12345678A --name \"APELLIDOS, NOMBRE\"\n\n# Modelo 720 con tipos A/M/C (comparando con declaración del año anterior)\nnode dist/cli.js modelo720 --input flex_query.xml --year 2025 --nif 12345678A --name \"APELLIDOS, NOMBRE\" --previous-720 720_2024.txt\n\n# Modelo D-6 (guía AFORIX)\nnode dist/cli.js d6 --input flex_query.xml --year 2025 --nif 12345678A --name \"APELLIDOS, NOMBRE\"\n\n# Modelo D-6 con detección de bajas (comparando con año anterior)\nnode dist/cli.js d6 --input flex_query.xml --year 2025 --nif 12345678A --name \"APELLIDOS, NOMBRE\" --previous-d6 d6_2024.json --format json\n```\n\nEl broker se auto-detecta a partir del contenido del fichero. Se puede forzar con `--broker \u003cnombre\u003e`.\n\n## Motor fiscal\n\n- **FIFO estricto** con tipos de cambio ECB oficiales por fecha de operación\n- **Todos los tipos de activo**: acciones, ETFs, opciones, futuros, forex, bonos, CFDs y criptomonedas\n- **Regla anti-churning** (Art. 33.5.f LIRPF): bloqueo de pérdidas si se recompra el mismo valor en 2 meses (cotizados en mercado regulado) o 1 año (no cotizados). Aplica a acciones, fondos y bonos; excluye derivados, forex y crypto\n- **Doble imposición** (Art. 80 LIRPF): deducción por retenciones en origen, desglosado por país\n- **Stock splits**: forward y reverse, con liquidación de fracciones (cash-in-lieu)\n- **Corporate actions**: fusiones (transferencia de coste) y spin-offs (distribución proporcional)\n- **Compensación de pérdidas** (Art. 49 LIRPF): ventana de 4 años con compensación cruzada del 25%\n- **Validador Modelo 720**: verificación contra la especificación BOE del formato de registro\n\n## Privacidad\n\n- **Self-hosted**: los datos se procesan en tu equipo. La única conexión externa es al API del BCE para tipos de cambio (datos públicos).\n- Sin analytics, sin tracking, sin telemetría.\n- La interfaz web muestra la versión y commit exacto desplegado — puedes verificar que coincide con el código fuente en GitHub.\n\n## Desarrollo\n\n```bash\ngit clone https://github.com/GeiserX/DeclaRenta.git\ncd DeclaRenta\nnpm install\n\nnpm test              # Ejecuta la suite de tests\nnpm run dev           # Servidor web de desarrollo\nnpm run build         # Build completo (lib + web)\nnpm run lint          # ESLint\nnpm run typecheck     # TypeScript\nnode dist/cli.js convert --input test.xml --year 2025\n```\n\n## Contribuir\n\nLas contribuciones son bienvenidas. Áreas donde más ayuda se necesita:\n\n- **Parsers de brokers**: Trade Republic, Revolut, XTB, MyInvestor\n- **Reglas fiscales**: casos edge de FIFO, convenios de doble imposición por país\n- **Tests**: más fixtures con operaciones reales anonimizadas\n- **Traducciones**: las traducciones a catalán, euskera y gallego son automáticas — se necesita revisión por hablantes nativos\n\n## Sponsor\n\nSi DeclaRenta te ahorra tiempo (y dinero), considera apoyar el proyecto:\n\n[![GitHub Sponsors](https://img.shields.io/badge/Sponsor-♥-ea4aaa?style=flat-square)](https://github.com/sponsors/GeiserX)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeiserx%2Fdeclarenta","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeiserx%2Fdeclarenta","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeiserx%2Fdeclarenta/lists"}