PythonAsyncioChromium CDPAutomation

Crypto Portfolio Aggregator

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

Crypto Portfolio Aggregator

About the Project

High-Performance Async Crypto Portfolio Aggregator

The Elevator Pitch

I engineered a high-speed data extraction tool that monitors cryptocurrency portfolio balances across multiple chains without incurring enterprise API costs. By leveraging asynchronous Python and advanced browser automation, the tool bypasses sophisticated bot detection to deliver organized financial reports for hundreds of wallets in minutes.


The Problem

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

  1. Prohibitive Costs: Official APIs (like DeBank's) often have steep pricing models suited for institutions, not individuals or small teams.
  2. Anti-Scraping Security: Financial platforms employ aggressive anti-bot measures (Cloudflare, fingerprinting), making standard scraping methods unreliable and prone to IP bans.

The Solution

I developed a robust, privacy-focused extraction engine using Python and nodriver. Unlike traditional web scrapers that use easily detectable drivers (like standard Selenium), this tool interacts directly with the Chrome DevTools Protocol (CDP).

It mimics organic user behavior through fingerprint randomization and dynamic IP rotation. The system accepts a list of wallet addresses and asynchronously fetches, parses, and aggregates data into clean, actionable Excel/CSV reports, sorting assets by value and filtering out "dust" (low-value tokens).


Key Features

  • Asynchronous Concurrency: Built on asyncio, the system uses Semaphores to manage resource load, allowing multiple wallet profiles to be processed simultaneously—drastically reducing runtime compared to linear processing.
  • Advanced Anti-Detection: Utilizes nodriver to eliminate standard WebDriver leaks. It employs randomized browser arguments and rotates User-Agents via fake_useragent to maintain a unique digital fingerprint.
  • Dynamic IP Rotation: Integrated nordvpn-switcher-pro to automatically cycle IP addresses after a configurable batch of wallets (e.g., every 10 queries), preventing rate-limiting and bans.
  • Smart Data Aggregation: Features a custom reporting module that organizes data by Total Balance, Chains, and DeFi Projects. It includes logic to filter noise by ignoring assets under specific dollar thresholds.

Tech Stack

CategoryTechnologies Used
Core LanguagePython 3.10+
ConcurrencyAsyncio, Semaphores
AutomationNodriver (CDP based), Fake_Useragent
Network/PrivacyNordVPN Switcher Pro
Data ProcessingPandas, OpenPyXL, CSV

The "Why": Overcoming Technical Challenges

Challenge: Bypassing Behavioral Analysis & Fingerprinting The most significant technical hurdle was DeBank's ability to detect non-human traffic patterns. Standard automation tools were identified almost immediately, leading to soft bans.

Solution: I moved away from traditional DOM-based automation to Nodriver, which operates without the recognizable WebDriver variable presence. To further humanize the traffic, I architected a "batch-and-rotate" logic:

  1. The system processes a randomized batch of wallets (e.g., 10-20).
  2. It halts execution to trigger a system-level VPN switch (changing the IP).
  3. It instantiates a fresh browser instance with a new User-Agent and window geometry before resuming.

This approach effectively turned a static bot into a "moving target," resulting in a near-100% success rate for data retrieval.


Results & Impact

  • Cost Efficiency: Eliminated the need for paid API subscriptions, saving significant monthly operational costs for data retrieval.
  • Performance: Reduced data collection time by approximately 90% compared to manual verification.
  • Reliability: Achieved consistent uptime and data accuracy by successfully evading anti-bot detection measures that block standard scrapers.

© 2026 Konrad Kotulski. All rights reserved.