PythonAsyncioSeabornAutomationData

Asynchronous data extraction and visualization tool for cross-chain portfolio monitoring with advanced anti-detection.

DeBank portfolio aggregator - image 1
1 / 5

Quick Facts

  • Role: Python Developer / Automation Engineer
  • Project Type: Personal Tool / Financial Automation
  • Tech Stack: Python (Asyncio), Nodriver, Seaborn, Pandas
  • Impact: 90% reduction in data collection time; $0 API costs.

Overview

I developed a high-performance data extraction tool for DeBank that monitors cryptocurrency portfolio balances across multiple blockchain networks without incurring institutional API costs. This project represents my first major dive into object-oriented Python, designed to deliver financial reports for hundreds of wallets within minutes.

Built for high-volume portfolio tracking where official API costs would be prohibitive.


The Problem

Managing multiple cryptocurrency wallets requires real-time visibility into asset distribution across various blockchains and DeFi protocols. However, obtaining this granular data faces two major hurdles:

  1. Prohibitive Costs: Official APIs (such as DeBank's) often feature pricing models tailored for institutions rather than individuals.
  2. Anti-Scraping Defenses: Financial platforms employ aggressive anti-bot measures (Cloudflare, fingerprinting) that make standard scraping methods unreliable.

The Solution

I engineered a modular data extraction system based on Python and the nodriver library. Unlike traditional scrapers, this tool communicates directly with the Chrome DevTools Protocol (CDP) to bypass standard automation detection.

The system processes wallet addresses asynchronously, fetching data through simulated organic behavior, and now features an automated visualization engine to transform raw data into actionable insights.


Key Features

  • Asynchronous Concurrency: Built on asyncio with Semaphores, allowing for simultaneous processing of multiple wallet profiles without overloading system resources.
  • Data Visualization: Integrates a visualization module that generates basic graphs (Boxplots, Histograms, Bar Charts) to analyze balance distribution across wallets, chains, and projects at a glance.
  • Anti-Bot Detection: Employs nodriver to eliminate WebDriver leaks, uses randomized browser arguments, and rotates User-Agents via fake_useragent.
  • Dynamic IP Rotation: Integrated with nordvpn-switcher-pro to automatically change IP addresses after specific batches, preventing rate limiting and IP bans.
  • Smart Reporting: Generates comprehensive CSV and XLSX (MS Excel) reports with multi-sheet support, organized by Total Balance, Network, and DeFi Projects.

Tech Stack

CategoryTechnologies Used
Core LanguagePython 3.10+ (Object-Oriented)
ConcurrencyAsyncio, Semaphores
AutomationNodriver (CDP based), Fake_Useragent
Network/PrivacyNordVPN Switcher Pro
Data & VisualizationPandas, Seaborn, Matplotlib, OpenPyXL

Project Architecture

The tool is based on a modular structure for easier maintenance:

  • browser_handler.py: Manages the DeBank class, navigation, and data processing.
  • graph_generator.py: Handles visualization logic using Seaborn/Pandas.
  • reporter.py: Responsible for data aggregation and saving to multiple formats.
  • nodriver_utils.py & nordvpn_utils.py: Tools for automation and browser handling.

“Why?”: Overcoming Technical Challenges

Challenge: Handling dynamic content and behavioral analysis DeBank is a highly dynamic application based on lazy loading. A standard script would only see an empty page skeleton or a CAPTCHA.

Solution: I designed logic that mimics human interactions:

  • Interactive scrolling: The script performs non-linear scroll movements at variable speeds, triggering lazy load scripts.
  • Browser fingerprint rotation: After each batch, the system triggers a system-level VPN change and reconstructs the session with unique window geometry and User-Agent.

Results and Impact

  • Cost-effectiveness: Elimination of monthly operational costs for accessing institutional data.
  • Efficiency: Data collection time reduced by approximately 90% compared to manual verification.
  • Insight Generation: Automatic charts provide immediate insight into portfolio concentration risk across different networks.

Development Plans

  • Proxy Support: Integration of dedicated residential proxy servers.
  • Token-Level Parsing: Detailed breakdown of individual tokens held.
  • Advanced Analytics: Implementation of PnL tracking and historical change analysis.
© 2026 Konrad Kotulski