Skip to content

Tarrant64/abct

Repository files navigation

A Better Crypto Tracker (ABCT)

Personal multi-chain portfolio tracker built Cardano-first.

Version Build License Python FastAPI Security Docker Exchanges Themes

Why

Existing multi-chain wallets treat Cardano as an afterthought β€” basic balance tracking with no stake pool info, broken native assets, and zero governance integration. This project flips that: deep Cardano ecosystem support first, then proper multi-chain coverage.

Features

Cardano (Primary):

  • Stake pool tracking, rewards, governance
  • Native assets with metadata and decimals
  • DeFi protocol integration (Minswap, SundaeSwap, etc.)
  • NFT collections with floor prices
  • Stake key wallet grouping

Other Chains: Bitcoin, Ethereum, Solana, Polygon, Base

Tools: Privacy-focused (self-hosted), transaction analytics, custom tokens, portfolio snapshots

Project

Personal side project built with AI assistance. Goal: Create a robust tracker that doesn't compromise on Cardano while supporting major chains. Community contributions welcome.

Current Build: v1.5.0 (BUILD 1770563676)

⚠️ Important: Intended Use

ABCT is designed for personal, self-hosted use on trusted local networks. NOTE: **THIS WILL HAVE PERIODIC BUGS AS I'M WORKING THROUGH THIS TO LEARN MORE ABOUT CONNECTING TO BLOCKCHAIN INFRASTRUCTURES VIA API, WHAT WORKS WEL, AND WHAT DOESN'T. **

This is a hobby project for tracking your personal cryptocurrency portfolio. It is:

  • βœ… Perfect for: Home networks, personal NAS devices, local development
  • βœ… Designed for: Single-user or family use on trusted networks
  • ❌ NOT designed for: Public internet hosting or multi-tenant use
  • ❌ NOT recommended: Exposing directly to the internet without VPN

Security Considerations

  • Default configuration assumes localhost/trusted network access
  • Authentication is optional (can be disabled for local use)
  • No built-in HTTPS/SSL (can be added via reverse proxy if needed)
  • API keys stored in environment variables
  • Read-only access to blockchain data (cannot move funds)

Remote Access

If you need to access ABCT remotely:

  • βœ… Use a VPN (Tailscale, WireGuard, etc.)
  • βœ… Use a reverse proxy with authentication (nginx + Basic Auth)
  • βœ… Use SSH tunnel
  • ❌ Don't expose port directly to internet

For more details, see SECURITY.md

πŸ—οΈ Architecture

For a detailed overview of the system architecture, authentication flow, and database structure, see ARCHITECTURE.md.

✨ Features

Portfolio Tracking

  • Multi-Blockchain Support: Track wallets on Cardano, Bitcoin, Ethereum, Solana, Polygon, Base, and Algorand (7 chains)
  • Multi-Exchange Integration: Connect to 7 major exchanges (Coinbase, Binance, Binance.US, OKX, Bitget, Gate.io, KuCoin)
  • DeFi Monitoring: View Cardano staking positions with APY and rewards
  • NFT Collection: Browse your NFTs with floor price valuations
  • Transaction History: Complete transaction tracking across all blockchains with analytics
  • Portfolio History: Interactive charts showing value over time (7d, 4w, 3m)
  • Privacy Mode: Hide sensitive financial data with one click

Infrastructure

  • Self-Hosted: Your data stays on your machine
  • Docker Ready: Single container deployment
  • Optional HTTPS: SSL/TLS encryption support
  • Secure Logging: Audit trails with sensitive data redaction

πŸ“¦ What's New

v1.5.0 - V2 Ingestion Engine (February 2026)

  • V2 Ingestion Engine: Complete rebuild of the data pipeline architecture
    • 6-stage pipeline: Expand β†’ Index β†’ Hydrate β†’ Normalize β†’ Enrich β†’ Positions
    • Provider-agnostic work units β€” if one API rate-limits, work reassigns to another
    • 14 registered data providers across all chains
    • Circuit breaker pattern with automatic recovery (CLOSED β†’ OPEN β†’ HALF_OPEN)
    • Token bucket rate limiting per provider
    • Bulkhead concurrency control via asyncio.Semaphore
    • Idempotent event dedup (safe to re-run backfills)
  • Multi-Chain Coverage: Full pipeline support for Cardano, Bitcoin, Ethereum, Solana, Polygon, Base
    • Chain-specific expanders, indexers, hydrators, and normalizers
    • CoinStats integration for non-Cardano chains (Bitcoin, Ethereum, Solana, Polygon, Base)
    • CoinStats Cardano exclusion enforced at registry, indexer, and hydrator levels
  • Provider Registry: Priority-based scoring with health/quota/latency factors
    • Automatic failover when providers go down
    • Per-provider health tracking persisted to database
    • Circuit breakers with 5-failure threshold and 5-minute recovery
  • Backfill Orchestration: Plan, execute, and monitor backfills via API
    • POST /engine/backfill β€” start a new backfill job
    • GET /engine/backfill/{id}/status β€” real-time progress
    • Background execution with domain pipeline ordering
  • 8 New Database Tables: engine_backfills, engine_account_subjects, engine_tx_index, engine_tx_raw, engine_events, engine_work_units, engine_provider_health, engine_price_history
  • 11 New API Endpoints: Backfill management, provider health, event queries, portfolio snapshots
  • Balance History Improvements: Anchor to current on-chain balance, nginx proxy passthrough
  • Performance: Fixed 7s page load delay from NFT image config, improved Assets UX

v1.0.1 - UI, Themes, & Multi-Chain Expansion (February 2026) ✨

  • πŸ”‘ .env Import/Export Fix: Complete API key migration workflow
    • Fixed .env export crash (missing Path import)
    • New .env import: upload a .env file to import API keys directly into the database
    • Supports all 17 API services including exchange key+secret+passphrase grouping
    • File upload UI with drag-and-drop on the Backup & Restore page
  • πŸ“ˆ Portfolio History Improvements: Better snapshot frequency and backfill
    • Snapshot interval reduced from 4 hours to 2 hours for more granular history
    • Auto-generate 30 days of historical data for new users on startup
    • "Generate 30-Day History" button on dashboard when no data exists
    • Added Solana (SOL) to historical price tracking
  • πŸ”— Algorand Support: Full blockchain integration for Algorand network
    • Pera Wallet API integration (primary source)
    • Tatum API fallback support
    • Native ALGO tracking and ASA (Algorand Standard Assets)
    • ARC-3 and ARC-69 NFT support
    • Transaction history integration
  • πŸ“Š Transaction History System: Complete multi-chain transaction tracking
    • Unified transaction view across all 7 blockchains
    • Transaction analytics with visual charts
    • 1,500+ demo transactions for testing
    • Chain filtering and search capabilities
  • πŸ–ΌοΈ Enhanced Demo Mode: Massive expansion of sample data
    • 91 tokens across all blockchains
    • 76 NFTs across 7 collections
    • 1,500 transactions over 1 year of history
    • More realistic portfolio simulation
  • 🎨 Complete Theme Redesign: Reimagined theme system with enhanced visual polish
    • Renamed "Default" theme to "Dark Mode" for clarity
    • New Light Theme: Clean, modern white theme with refined UI elements
    • Removed "Green Terminal" theme
    • 5 professionally designed themes: Dark Mode, Light, Cypherpunk 1, Ocean Depths, Sunset Horizon
  • πŸ’Ž Light Theme Polish: Comprehensive styling for modern aesthetics
    • Rounded corners throughout (10-24px range for visual hierarchy)
    • Layered shadow effects for depth and elevation
    • Proper contrast and readability
    • White backgrounds with subtle gray accents (#e5e7eb borders)
    • Professional button and input styling
  • ✨ Dark Mode Enhancements: Improved visibility and polish
    • Glowing green borders on headers and sections (rgba(0, 210, 106, 0.4))
    • Enhanced shadow effects for better depth perception
    • Improved contrast for better readability
    • Consistent rounded corners matching light theme
  • 🎯 UI Refinements: Better spacing and visual hierarchy
    • Header and section headers now use rounded, padded containers
    • Improved text indentation (16-24px padding)
    • Portfolio card with enhanced shadows and borders
    • Chart containers with proper background styling per theme
    • Consistent waffle menu integration across all pages
  • 🎭 Theme Selector Relocation: Moved from header to waffle menu dropdown
    • More intuitive navigation structure
    • Cleaner header design
    • Theme selection with all navigation in one place
  • πŸ”§ Cache Busting: Build version system for immediate CSS/JS updates
    • Version 1770166262
    • No more browser cache issues after updates

v1.0.0 - Production Ready Release (January 2026) πŸŽ‰

  • 🌐 Seven Exchange Integrations: Full API support for Binance, OKX, KuCoin, Bitget, Gate.io + existing Coinbase
    • Automatic portfolio aggregation across all exchanges
    • Read-only API keys for maximum security
    • 5-minute smart caching to respect rate limits
    • Individual exchange status monitoring
    • Easy environment variable configuration
  • 🎨 Visual Enhancements: LogoKit integration for blockchain and token logos
    • Blockchain logos on all summary cards
    • Token logos in wallet and exchange asset lists
    • Exchange-specific branding throughout UI
    • Improved pie chart colors for cypherpunk theme
  • πŸ—‚οΈ Manage Wallets Interface: Redesigned asset management
    • Three-tab interface: Self-Custody | Exchanges | Manual Tokens
    • Exchange configuration status dashboard
    • Setup guide with direct links to API management
    • Better organization of different asset types
  • πŸ“š Comprehensive Documentation: Complete exchange integration guide
    • Step-by-step setup for each exchange
    • Security best practices and troubleshooting
    • API rate limit documentation

v0.13.1 - Complete Portfolio History

  • πŸ“ˆ Complete Portfolio History: 90-day historical snapshots with all components
    • Backfill script generates realistic historical price variations
    • Includes native coins, tracked tokens, NFTs, and exchange balances
    • Daily snapshots with auto-refresh every 4 hours
    • Chart now shows complete portfolio value (not just native coins)
    • All components properly tracked: wallets + tokens + NFTs + exchanges

v0.13.0 - Asset Breakdown & Token Pricing πŸŽ‰

  • πŸ“Š Blockchain Asset Breakdown: Interactive drill-down charts
    • Click any blockchain card to see asset composition
    • Doughnut charts showing native coin + tokens + NFTs
    • Sortable legend with percentages and USD values
    • Works across all 6 supported blockchains
  • πŸ”— The Graph API Integration: Ethereum-based token pricing
    • Uniswap V2/V3 subgraph integration for accurate pricing
    • ETH-denominated prices for Ethereum, Polygon, Base tokens
    • 100K queries/day with automatic usage tracking
    • 5-minute price caching for performance
  • 🌐 Multi-Chain Native Pricing: Universal token pricing system
    • Cardano: ADA-denominated via TapTools
    • Ethereum/Base/Polygon: ETH-denominated via The Graph
    • Solana: SOL-equivalent calculated from USD
    • Automatic USD conversion with native token display
  • πŸ–ΌοΈ Enhanced NFT Wall: Major performance improvements
    • Fixed NFT collection expansion (DOMPurify compatibility)
    • Prominent gradient cache button with live status
    • Real-time background scheduler indicator
    • Batch progress showing: cached/failed/skipped counts
    • "Remaining" stat showing uncached images
    • Auto-disables when all images cached
  • πŸ› Bug Fixes:
    • Fixed NFT expansion on dashboard (event delegation)
    • Improved cache progress visibility and clarity
    • Better batch caching status messages
    • Enhanced background work visibility

v0.12.0 - Multi-User & Enhanced Visualization

  • πŸ‘₯ Multi-User Support: Full multi-user architecture with user isolation
    • Separate portfolios for different users
    • Session-based authentication with secure tokens
    • Per-user wallet, NFT, and DeFi data isolation
    • Password change functionality built-in
  • 🎨 Demo Mode: Try ABCT without connecting wallets
    • Pre-loaded with extensive realistic demo data
    • 91 tokens across all 7 supported blockchains
    • 76 NFTs across 7 collections (Cardano, Ethereum, Solana, Polygon, Base, Algorand)
    • 1,500 transactions spanning 1 year of history
    • Demo DeFi positions and exchange balances
    • Multi-chain NFT wall with blockchain filtering
    • Login with username: demo / password: demo
  • πŸ–ΌοΈ Multi-Chain NFT Wall: Enhanced NFT visualization
    • Support for Cardano, Ethereum, Solana NFTs
    • Filter by blockchain with live chain tabs
    • Colorful SVG placeholders for demo mode
    • Privacy mode to blur sensitive data
  • πŸ› Bug Fixes:
    • Fixed Cardano stake key collapse/expand functionality
    • Fixed demo NFT wall authentication
    • Improved multi-user database schema
    • Enhanced session token handling

v0.10.0 - Backup & Restore Release

  • πŸ”„ Complete Backup System: Export/import all your configuration data
    • Migration ready for moving to new servers
    • Selective export options
    • Import modes: Merge (safe) or Replace (full restore)
    • Security warnings for sensitive data in backups
  • ⏰ NFT Background Scheduler: Automatic 24/7 NFT floor price updates
    • Smart rate limiting (95 calls/day)
    • State persistence and priority queue

v0.9.0 - NFT Scheduler Integration

  • Single Container: NFT price service integrated into main app
  • Background Updates: Automatic 24/7 NFT floor price collection
  • Smart Rate Limiting: Respects TapTools 95 calls/day limit
  • State Persistence: Resumes exactly where it left off after restart
  • UI Controls: Enable/disable from Services page

See CHANGELOG.md for complete version history.

πŸ” Default Login Credentials

ABCT includes a login page to protect your portfolio data. Use these credentials on first access:

  • Admin Account:

    • Username: admin
    • Password: satoshi
    • Full access to add wallets and configure settings
  • Demo Account (New in v0.12.0):

    • Username: demo
    • Password: demo
    • Pre-loaded with extensive sample data:
      • 91 tokens across all 7 blockchains
      • 76 NFTs across 7 collections
      • 1,500 transactions over 1 year
      • DeFi positions and exchange balances
    • Try ABCT without connecting your wallets!

⚠️ IMPORTANT: Change the default admin password after first login! See Password Reset Guide for instructions.

Forgot your password? See Password Reset Guide for reset instructions.

πŸš€ Quick Start

ABCT works on any Docker-capable system including Linux servers, NAS devices (TrueNAS, Synology, Unraid), and desktop environments.

Note: ABCT is designed for local network use. See security considerations above before exposing to external networks.

Option 1: Docker Deployment (Recommended)

# Clone the repository
git clone https://github.com/Tarrant64/abct.git
cd abct

# Create environment file
cp .env.example .env
nano .env  # Add your API keys

# Build and run with Docker Compose
cd abct-docker
docker-compose up -d

# Access at http://localhost:8080

For detailed platform-specific instructions (TrueNAS, Synology, Portainer, etc.), see Docker Deployment Guide.

Security Note: The default Docker configuration binds to all network interfaces. For added security on trusted networks, consider restricting port binding to localhost only (127.0.0.1:8080:80) or implementing authentication and HTTPS. See SECURITY.md for guidance.

Note for Unraid users: A convenience deployment script is available at abct-docker/update-unraid.sh for automated deployment and updates on Unraid servers.

Option 2: Local Development

# Clone the repository
git clone https://github.com/Tarrant64/abct.git
cd abct

# Copy and configure environment
cp .env.example .env
nano .env  # Add your Blockfrost API key at minimum

# Run the application
./run.sh

# Open in browser
open http://127.0.0.1:8000

The run.sh script will:

  • Create a Python virtual environment
  • Install dependencies
  • Start the FastAPI backend
  • Display the server URL

Screenshots

The dashboard provides a comprehensive view of your crypto portfolio:

  • Portfolio Summary: Total value across all blockchains
  • Value History Chart: Track portfolio performance over 7 days, 4 weeks, or 3 months
  • Staking Positions: View delegated ADA, earned rewards, and pool APY
  • Exchange Holdings: See balances from connected exchanges
  • NFT Gallery: Browse collections with floor price estimates
Screenshot 2026-01-29 at 9 11 28β€―PM Screenshot 2026-01-29 at 9 12 54β€―PM image

Requirements

  • Python 3.9 or higher
  • 512MB RAM minimum
  • API keys (see below)

API Keys

Service Required Purpose Sign Up
Blockfrost Yes Cardano blockchain data blockfrost.io
CExplorer Recommended Staking/rewards data cexplorer.io/api
TapTools Optional NFT floor prices taptools.io
Etherscan Optional Ethereum support etherscan.io
Coinbase Optional Exchange balances portal.cdp.coinbase.com
Binance Optional Exchange balances binance.com/en/my/settings/api-management
OKX Optional Exchange balances okx.com/account/my-api

πŸ“ Project Structure

ABCT/
β”œβ”€β”€ backend/                    # Python FastAPI backend
β”‚   β”œβ”€β”€ main.py                # Application entry point
β”‚   β”œβ”€β”€ config.py              # Configuration management
β”‚   β”œβ”€β”€ database.py            # SQLite database layer
β”‚   β”œβ”€β”€ auth_utils.py          # Session auth utilities
β”‚   β”œβ”€β”€ routers/               # API endpoint handlers (26 routers)
β”‚   β”‚   β”œβ”€β”€ auth.py            # Authentication (login/logout/password)
β”‚   β”‚   β”œβ”€β”€ portfolio.py       # Portfolio summary & history
β”‚   β”‚   β”œβ”€β”€ wallets.py         # Wallet CRUD operations
β”‚   β”‚   β”œβ”€β”€ prices.py          # Cryptocurrency prices
β”‚   β”‚   β”œβ”€β”€ defi.py            # Staking positions
β”‚   β”‚   β”œβ”€β”€ exchanges.py       # Exchange balances
β”‚   β”‚   β”œβ”€β”€ nfts.py            # NFT collection
β”‚   β”‚   β”œβ”€β”€ nft_scheduler.py   # NFT scheduler API
β”‚   β”‚   β”œβ”€β”€ transactions.py    # Transaction history & analytics
β”‚   β”‚   β”œβ”€β”€ balance_history.py # Balance history charts
β”‚   β”‚   β”œβ”€β”€ engine.py          # V2 Ingestion Engine API (v1.5.0+)
β”‚   β”‚   β”œβ”€β”€ backup.py          # Backup & restore
β”‚   β”‚   β”œβ”€β”€ cache.py           # Cache management
β”‚   β”‚   β”œβ”€β”€ custom_tokens.py   # Custom token management
β”‚   β”‚   β”œβ”€β”€ dashboard.py       # Dashboard data
β”‚   β”‚   β”œβ”€β”€ demo.py            # Demo mode management
β”‚   β”‚   β”œβ”€β”€ spam.py            # Spam token filtering
β”‚   β”‚   β”œβ”€β”€ nmkr.py            # NMKR NFT minting
β”‚   β”‚   β”œβ”€β”€ cloudflare.py      # Cloudflare tunnel management
β”‚   β”‚   β”œβ”€β”€ mobile.py          # Mobile API endpoints
β”‚   β”‚   β”œβ”€β”€ system.py          # System info & health
β”‚   β”‚   β”œβ”€β”€ settings.py        # Application settings
β”‚   β”‚   β”œβ”€β”€ security.py        # Security settings
β”‚   β”‚   └── logs.py            # Log viewer
β”‚   β”œβ”€β”€ engine/                # V2 Ingestion Engine (v1.5.0+)
β”‚   β”‚   β”œβ”€β”€ models.py          # Pydantic models (ChainId, WorkUnit, CanonicalEvent)
β”‚   β”‚   β”œβ”€β”€ db.py              # 8 engine_* tables with CRUD
β”‚   β”‚   β”œβ”€β”€ orchestrator.py    # Backfill orchestration & pipeline coordination
β”‚   β”‚   β”œβ”€β”€ expansion/         # Stage A: wallet β†’ account subjects
β”‚   β”‚   β”‚   β”œβ”€β”€ cardano_expander.py   # Stake key β†’ payment addresses
β”‚   β”‚   β”‚   β”œβ”€β”€ bitcoin_expander.py   # Address passthrough
β”‚   β”‚   β”‚   β”œβ”€β”€ evm_expander.py       # Normalize to lowercase
β”‚   β”‚   β”‚   └── solana_expander.py    # SPL token account enumeration
β”‚   β”‚   β”œβ”€β”€ indexing/          # Stage B: collect tx IDs (cheap)
β”‚   β”‚   β”‚   β”œβ”€β”€ cardano_indexer.py    # Blockfrost pagination
β”‚   β”‚   β”‚   β”œβ”€β”€ bitcoin_indexer.py    # Blockstream pagination
β”‚   β”‚   β”‚   β”œβ”€β”€ evm_indexer.py        # Etherscan txlist+internal+token
β”‚   β”‚   β”‚   β”œβ”€β”€ solana_indexer.py     # Helius getSignatures
β”‚   β”‚   β”‚   └── coinstats_indexer.py  # CoinStats (NOT Cardano)
β”‚   β”‚   β”œβ”€β”€ hydration/         # Stage C: full tx detail (expensive)
β”‚   β”‚   β”‚   β”œβ”€β”€ cardano_hydrator.py   # Blockfrost UTXOs
β”‚   β”‚   β”‚   β”œβ”€β”€ bitcoin_hydrator.py   # Blockstream /tx/
β”‚   β”‚   β”‚   β”œβ”€β”€ evm_hydrator.py       # Alchemy RPC
β”‚   β”‚   β”‚   β”œβ”€β”€ solana_hydrator.py    # Helius enhanced tx
β”‚   β”‚   β”‚   └── coinstats_hydrator.py # CoinStats (NOT Cardano)
β”‚   β”‚   β”œβ”€β”€ normalization/     # Stage D: raw tx β†’ canonical events
β”‚   β”‚   β”‚   β”œβ”€β”€ cardano_normalizer.py # UTxO in/out β†’ events
β”‚   β”‚   β”‚   β”œβ”€β”€ bitcoin_normalizer.py # vin/vout β†’ events
β”‚   β”‚   β”‚   β”œβ”€β”€ evm_normalizer.py     # logs β†’ events
β”‚   β”‚   β”‚   └── solana_normalizer.py  # instructions β†’ events
β”‚   β”‚   β”œβ”€β”€ enrichment/        # Stage E: prices & metadata
β”‚   β”‚   β”‚   β”œβ”€β”€ price_enricher.py         # Historical price lookup
β”‚   β”‚   β”‚   β”œβ”€β”€ token_metadata_enricher.py # Token name/decimals
β”‚   β”‚   β”‚   └── nft_metadata_enricher.py   # NFT metadata (stub)
β”‚   β”‚   β”œβ”€β”€ positions/         # Stage F: DeFi inference (stubs)
β”‚   β”‚   β”‚   β”œβ”€β”€ cardano_defi.py  # Cardano DeFi positions
β”‚   β”‚   β”‚   └── evm_defi.py     # EVM DeFi positions
β”‚   β”‚   β”œβ”€β”€ providers/         # Provider registry & scoring
β”‚   β”‚   β”‚   β”œβ”€β”€ provider.py    # Provider dataclass
β”‚   β”‚   β”‚   └── registry.py    # 14 providers with health-aware selection
β”‚   β”‚   └── scheduler/         # Rate limiting & circuit breaking
β”‚   β”‚       β”œβ”€β”€ scheduler.py       # Work unit scheduler
β”‚   β”‚       β”œβ”€β”€ token_bucket.py    # Per-provider rate limiter
β”‚   β”‚       └── circuit_breaker.py # Health tracking & auto-pause
β”‚   β”œβ”€β”€ services/              # Business logic layer (50+ services)
β”‚   β”‚   β”œβ”€β”€ cardano.py         # Cardano blockchain
β”‚   β”‚   β”œβ”€β”€ bitcoin.py         # Bitcoin blockchain
β”‚   β”‚   β”œβ”€β”€ ethereum.py        # Ethereum blockchain
β”‚   β”‚   β”œβ”€β”€ solana.py          # Solana blockchain
β”‚   β”‚   β”œβ”€β”€ polygon.py         # Polygon blockchain
β”‚   β”‚   β”œβ”€β”€ base.py            # Base blockchain
β”‚   β”‚   β”œβ”€β”€ algorand.py        # Algorand blockchain
β”‚   β”‚   β”œβ”€β”€ etherscan.py       # Etherscan multi-chain API
β”‚   β”‚   β”œβ”€β”€ pricing.py         # Price aggregation (5-source fallback)
β”‚   β”‚   β”œβ”€β”€ defi.py            # DeFi/staking service
β”‚   β”‚   β”œβ”€β”€ balance_history.py # V1 balance history
β”‚   β”‚   β”œβ”€β”€ transaction_history.py  # Multi-chain transactions
β”‚   β”‚   β”œβ”€β”€ http_client.py     # Shared HTTP client pool (30+ named pools)
β”‚   β”‚   β”œβ”€β”€ api_key_manager.py # Dynamic API key management
β”‚   β”‚   β”œβ”€β”€ coinbase.py        # Coinbase exchange
β”‚   β”‚   β”œβ”€β”€ binance_service.py # Binance.com exchange
β”‚   β”‚   β”œβ”€β”€ binance_us_service.py # Binance.US exchange
β”‚   β”‚   β”œβ”€β”€ okx_service.py     # OKX exchange
β”‚   β”‚   β”œβ”€β”€ bitget_service.py  # Bitget exchange
β”‚   β”‚   β”œβ”€β”€ gate_service.py    # Gate.io exchange
β”‚   β”‚   β”œβ”€β”€ kucoin_service.py  # KuCoin exchange
β”‚   β”‚   β”œβ”€β”€ nft.py             # NFT service
β”‚   β”‚   β”œβ”€β”€ nft_scheduler.py   # NFT background scheduler
β”‚   β”‚   β”œβ”€β”€ nft_price_client.py # NFT price aggregation
β”‚   β”‚   β”œβ”€β”€ nft_image_service.py # NFT image caching
β”‚   β”‚   β”œβ”€β”€ ethereum_nft.py    # Ethereum NFT service
β”‚   β”‚   β”œβ”€β”€ solana_nft.py      # Solana NFT service
β”‚   β”‚   β”œβ”€β”€ algorand_nft.py    # Algorand NFT service
β”‚   β”‚   β”œβ”€β”€ snapshot.py        # Portfolio snapshots
β”‚   β”‚   β”œβ”€β”€ logostream.py      # Token logo API
β”‚   β”‚   β”œβ”€β”€ logging_service.py # Structured logging
β”‚   β”‚   β”œβ”€β”€ taptools.py        # TapTools Cardano data
β”‚   β”‚   β”œβ”€β”€ moralis.py         # Moralis NFT service
β”‚   β”‚   β”œβ”€β”€ nmkr.py            # NMKR minting service
β”‚   β”‚   β”œβ”€β”€ nmkr_service.py    # NMKR business logic
β”‚   β”‚   β”œβ”€β”€ nftcdn.py          # NFT CDN service
β”‚   β”‚   β”œβ”€β”€ graph.py           # The Graph API (Uniswap pricing)
β”‚   β”‚   └── demo_*.py          # Demo mode services (wallets, NFTs, transactions, etc.)
β”‚   └── middleware/            # Security middleware
β”‚       β”œβ”€β”€ demo_mode.py       # Demo mode detection
β”‚       └── size_limit.py      # Request size limiting
β”œβ”€β”€ frontend/                  # HTML/CSS/JS frontend
β”‚   β”œβ”€β”€ index.html             # Main dashboard
β”‚   β”œβ”€β”€ wallets.html           # Wallet management
β”‚   β”œβ”€β”€ assets.html            # Asset breakdown & details
β”‚   β”œβ”€β”€ transactions.html      # Transaction history & analytics
β”‚   β”œβ”€β”€ nft-wall.html          # NFT gallery
β”‚   β”œβ”€β”€ nfts.html              # NFT collection management
β”‚   β”œβ”€β”€ settings.html          # Consolidated settings (APIs, exchanges, security)
β”‚   β”œβ”€β”€ system.html            # System management (logs, cache, services, backup)
β”‚   β”œβ”€β”€ login.html             # Login page
β”‚   β”œβ”€β”€ api-help.html          # API setup guide
β”‚   β”œβ”€β”€ dashv2.html            # Dashboard V2 (experimental)
β”‚   β”œβ”€β”€ static/demo-nfts/      # Demo NFT images
β”‚   β”œβ”€β”€ css/styles.css         # Styling (5 themes, 7000+ lines)
β”‚   └── js/
β”‚       β”œβ”€β”€ app.js             # Main application logic
β”‚       └── session-auth.js    # Authentication utilities
β”œβ”€β”€ abct-docker/               # Docker deployment
β”‚   β”œβ”€β”€ Dockerfile             # Container definition
β”‚   β”œβ”€β”€ nginx.conf             # Reverse proxy config
β”‚   β”œβ”€β”€ supervisord.conf       # Process manager
β”‚   └── update-unraid.sh       # Deployment script
β”œβ”€β”€ data/                      # SQLite databases (auto-created)
β”‚   β”œβ”€β”€ portfolio.db           # Main database (includes engine_* tables)
β”‚   └── nft_images.db          # NFT image cache
β”œβ”€β”€ docs/                      # Documentation
β”‚   β”œβ”€β”€ ARCHITECTURE.md        # System architecture
β”‚   β”œβ”€β”€ API_PROVIDERS.md       # API provider details
β”‚   β”œβ”€β”€ DOCKER_DEPLOYMENT.md   # Docker setup guide
β”‚   β”œβ”€β”€ BACKUP_RESTORE_GUIDE.md # Backup documentation
β”‚   └── docs/Exchange-Integration.md  # Exchange setup guide
β”œβ”€β”€ .env                       # API keys (you create this)
β”œβ”€β”€ .env.example               # Example configuration
β”œβ”€β”€ requirements.txt           # Python dependencies
β”œβ”€β”€ deploy.sh                  # Guided deployment script
β”œβ”€β”€ run.sh                     # Start server (local)
β”œβ”€β”€ stop.sh                    # Stop server (local)
β”œβ”€β”€ CHANGELOG.md               # Version history
└── README.md                  # This file

πŸ“‘ API Endpoints

Authentication

  • POST /auth/login - Login with credentials
  • POST /auth/logout - End session
  • POST /auth/change-password - Change password

Wallets

  • GET /wallets - List all tracked wallets
  • POST /wallets - Add a new wallet
  • DELETE /wallets/{id} - Remove a wallet
  • POST /wallets/{id}/refresh - Refresh wallet data

Portfolio

  • GET /portfolio/summary - Get portfolio overview
  • GET /portfolio/history?range=7d|4w|3m - Historical values
  • POST /portfolio/snapshot - Create manual snapshot

Dashboard

  • GET /dashboard/data - Aggregated dashboard data

Prices

  • GET /prices - Current cryptocurrency prices

DeFi

  • GET /defi/staking - Cardano staking positions

Exchanges

  • GET /exchanges/balances - Exchange holdings

NFTs

  • GET /nfts - NFT collection with values
  • GET /nfts/summary - Collections grouped
  • GET /nfts/prices/status - Price collection status
  • POST /nfts/prices/collect - Trigger price collection

Transactions

  • GET /transactions - Transaction history with filtering
  • GET /transactions/analytics - Transaction analytics data

Balance History

  • GET /balance-history/data - Balance history chart data
  • POST /balance-history/clear-cache - Clear history cache

NFT Background Scheduler

  • GET /nft-scheduler/status - Scheduler status and statistics
  • POST /nft-scheduler/enable - Enable background updates
  • POST /nft-scheduler/disable - Disable background updates
  • POST /nft-scheduler/trigger - Manually trigger update cycle

Custom Tokens

  • GET /custom-tokens - List custom tokens
  • POST /custom-tokens - Add a custom token
  • DELETE /custom-tokens/{id} - Remove a custom token

Spam Filtering

  • GET /spam/filters - List spam filters
  • POST /spam/filters - Add spam filter

Cache Management

  • GET /cache/stats - Cache statistics
  • POST /cache/clear - Clear cached data

Backup & Restore

  • GET /backup/info - Backup information and statistics
  • POST /backup/export - Export configuration to JSON
  • POST /backup/preview - Preview backup file (dry-run)
  • POST /backup/import - Import configuration from backup
  • GET /backup/export-env - Export API keys as .env file
  • POST /backup/import-env - Import API keys from .env file

System

  • GET /system/info - System information and health
  • GET /system/logs - View system logs

V2 Ingestion Engine (v1.5.0+)

  • POST /engine/backfill - Start a new backfill job
  • GET /engine/backfill/{id}/status - Backfill progress and status
  • POST /engine/backfill/{id}/cancel - Cancel a running backfill
  • GET /engine/backfills - List all backfills
  • GET /engine/gaps - Diagnose data gaps
  • GET /engine/snapshot - Portfolio snapshot from canonical events
  • GET /engine/history/data - Balance history (backward-compatible format)
  • GET /engine/providers - List registered providers
  • GET /engine/providers/health - Provider health and circuit breaker states
  • GET /engine/events - Query canonical events
  • GET /engine/events/count - Event counts by chain/type

βš™οΈ Configuration

Environment Variables (.env)

# ============================================
# REQUIRED: Cardano Blockchain API
# ============================================
BLOCKFROST_API_KEY=mainnetXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

# ============================================
# RECOMMENDED: Enhanced Features
# ============================================
CEXPLORER_API_KEY=your_key_here      # Staking positions and rewards
TAPTOOLS_API_KEY=your_key_here       # NFT floor prices

# ============================================
# OPTIONAL: Additional Blockchains
# ============================================
ETHERSCAN_API_KEY=your_key_here      # Ethereum support
ALCHEMY_API_KEY=your_key_here        # Ethereum/Polygon/Base NFTs
HELIUS_API_KEY=your_key_here         # Solana support

# ============================================
# NFT Background Scheduler (v0.9.0+)
# ============================================
NFT_SCHEDULER_ENABLED=false           # Enable automatic NFT price updates
NFT_UPDATE_INTERVAL_MINUTES=15        # Update every 15 minutes (default)
NFT_CALLS_PER_UPDATE=1                # Collections per cycle
NFT_MAX_DAILY_CALLS=95                # Daily API call limit

# ============================================
# Authentication (v0.10.0+)
# ============================================
ABCT_REQUIRE_AUTH=false               # Set to false for localhost-only
# ABCT_ADMIN_USER=admin               # Required if auth enabled
# ABCT_ADMIN_PASSWORD=secure_password # Required if auth enabled

# ============================================
# HTTPS/SSL (Optional)
# ============================================
# ABCT_SSL_MODE=http                  # Options: http | https-self-signed | https-custom
# ABCT_SSL_CERT=/path/to/cert.pem
# ABCT_SSL_KEY=/path/to/key.pem

Exchange Integration

ABCT supports 7 major cryptocurrency exchanges. For detailed setup instructions, see Exchange Integration Guide.

Supported Exchanges:

  • Coinbase (CDP API) - Place cdp_api_key.json file in project root
  • Binance.com - Add BINANCE_API_KEY and BINANCE_API_SECRET to .env
  • Binance.US - Add BINANCE_US_API_KEY and BINANCE_US_API_SECRET to .env
  • OKX - Add OKX_API_KEY, OKX_API_SECRET, OKX_API_PASSPHRASE to .env
  • Bitget - Add BITGET_API_KEY, BITGET_API_SECRET, BITGET_API_PASSPHRASE to .env
  • Gate.io - Add GATE_API_KEY and GATE_API_SECRET to .env
  • KuCoin - Add KUCOIN_API_KEY, KUCOIN_API_SECRET, KUCOIN_API_PASSPHRASE to .env

Security Note: Always create API keys with read-only permissions. Never grant withdrawal or trading permissions.

Development

# Activate virtual environment
source venv/bin/activate

# Run with auto-reload
cd backend
uvicorn main:app --reload

# Run tests (if available)
pytest

πŸ”’ Security

  • Local Only: Server binds to 127.0.0.1 by default (localhost-only)
  • Read-Only Access: Cannot move funds, only view balances and data
  • No Telemetry: No data sent to external analytics or tracking
  • Local Database: All data stored in local SQLite files
  • Optional Authentication: HTTP Basic Auth for network-exposed deployments (v0.10.0+)
  • HTTPS Support: SSL/TLS encryption with self-signed or custom certificates (v0.8.0+)
  • Secure Logging: Audit trails with sensitive data redaction
  • Input Validation: Protection against malformed inputs and XSS
  • Rate Limiting: API endpoint protection against abuse
  • CORS Hardening: Restricted cross-origin access
  • DOMPurify: Client-side XSS protection on all HTML rendering

Note: This application is designed for self-hosted, localhost-only use. The optional authentication feature allows running without credentials on trusted local installations, or with Basic Auth if you expose it on your network.

For detailed security information, see SECURITY.md

πŸ“– Documentation

πŸ”§ Troubleshooting

Server won't start

# Check if port is in use
lsof -i :8000

# Kill existing process
./stop.sh

Missing data

# Refresh all wallet data
# Click the refresh button in the UI, or:
curl -X POST http://127.0.0.1:8000/wallets/1/refresh

Database reset

# Backup first!
cp data/portfolio.db data/portfolio.db.backup
rm data/portfolio.db
./run.sh  # Fresh database created

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

Built with amazing open-source tools and data from leading blockchain API providers:

Backend Framework

Frontend Libraries

Blockchain Data Providers

Cardano Network

  • Blockfrost - Primary Cardano blockchain API (addresses, transactions, assets, staking)
  • TapTools - Cardano NFT floor price data and token analytics
  • CExplorer - Cardano staking positions and DeFi data
  • Koios - Free Cardano API (metadata fallback)

Ethereum & EVM Chains

  • Alchemy - Multi-chain infrastructure (Ethereum, Polygon, Base, Optimism)
  • Etherscan - Ethereum blockchain explorer API
  • Basescan - Base blockchain explorer API
  • Polygonscan - Polygon blockchain explorer API

Solana Network

  • Helius - Solana blockchain API and RPC

Bitcoin Network

  • Blockstream - Bitcoin blockchain data (free, no API key required)

Algorand Network

  • Pera Wallet - Algorand blockchain API (primary)
  • Tatum - Algorand blockchain data (fallback)

Pricing & Market Data

  • CoinGecko - Cryptocurrency price aggregation and market data
  • CoinMarketCap - Alternative cryptocurrency price data
  • Coinbase - Spot price data (public API)
  • DefiLlama - Universal price fallback for all chains

Visual Assets & Branding

  • LogoKit - Blockchain and cryptocurrency logos
  • Logostream - Token logo API for multi-chain assets

Exchange Integration

  • Coinbase CDP - Exchange API for portfolio balances (JWT authentication)
  • Binance - Global cryptocurrency exchange API
  • Binance.US - US-based exchange API
  • OKX - Multi-asset exchange API
  • Bitget - Derivatives and spot trading exchange API
  • Gate.io - Comprehensive exchange API
  • KuCoin - Global cryptocurrency exchange API

Privacy & Blockchain Innovation

  • Midnight Network - Privacy-focused Cardano partner chain (NIGHT token support)

Blockchain Logos

For detailed API information including rate limits and pricing, see API Providers Guide.

πŸ”— Links


Current Version: v1.5.0 (BUILD 1770563676) Last Updated: February 8, 2026 Release Date: February 8, 2026

About

A Better Crypto Tracker

Resources

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •