Multi-Chain DEX Pair Scanner and Early Token Detector
RATU Moon Radar is a multi-chain DEX pair scanner and early token detector using the Moralis API. Part of RATUProject (Real-time Automated Trading Unified), it demonstrates real-time token discovery with connection pooling and multi-chain support across Ethereum, BNB Chain, Polygon, and Base.
The system features dynamic pair selection via CLI, allowing users to scan any token pair (ethusdt, wbtcusdc, bnbusdt) with flexible input formats. It includes a moon token scanner that detects tokens with biggest 24h price gains, providing early detection of trending assets.
Built for system prototyping focus, the tool uses httpx connection pooling for reduced API latency and dataclass-based results for type-safe structured data. It supports major DEX exchanges including Uniswap V2, PancakeSwap V2, QuickSwap, and more.
Traders need to discover DEX liquidity pools across multiple chains quickly. Early token detection requires scanning for biggest price movers. Different chains use different DEX protocols, making unified scanning complex. API latency can slow down discovery workflows.
DEX trading opportunities appear across multiple chains. Manual discovery is slow and error-prone. Early detection of trending tokens provides trading advantages. Unified interface for multi-chain scanning improves efficiency.
A CLI-based architecture: (1) Dynamic pair parser supporting multiple input formats, (2) Multi-chain scanner using Moralis API with connection pooling, (3) Moon token scanner for top gainers detection, (4) Type-safe dataclass results for structured output.
Flexible CLI parsing supporting multiple formats: ethusdt, eth/usdt, ETH/USDT. Token address mapping per chain. Handles separator variations automatically.
Scans DEX pairs across Ethereum, BNB Chain, Polygon, Base. Supports Uniswap V2, PancakeSwap V2, QuickSwap. Uses Moralis getPairAddress API with connection pooling.
Detects tokens with biggest 24h price gains using Moralis top-movers endpoint. Ranks by percentage gain with market cap information.
httpx connection pooling reduces API latency for repeated requests. Type-safe dataclass results ensure structured output.
Moralis API provides unified interface for multi-chain DEX data. httpx connection pooling reduces latency. Dataclasses ensure type safety. CLI interface enables scripting and automation. Dynamic parsing improves user experience.
Deep dive into the technical implementation with annotated code examples
View Technical DetailsSupporting multiple blockchain networks with different DEX protocols
Implemented chain-specific configuration with token address mappings. Uses Moralis API which provides unified interface across chains. Supports major DEX protocols per chain (Uniswap, PancakeSwap, QuickSwap).
Handling dynamic pair selection with flexible input formats
Created parse_pair() function supporting multiple formats: no separator (ethusdt), slash separator (eth/usdt), uppercase (ETH/USDT). Token address lookup per chain handles variations.
Reducing API latency for real-time token discovery
Implemented httpx connection pooling for repeated API calls. Reuses connections across requests, reducing latency for multi-chain scans.
Built multi-chain DEX scanner supporting 4 chains (Ethereum, BNB Chain, Polygon, Base) with dynamic pair selection. Moon token scanner detects early movers with 24h price gains. Connection pooling optimizes API performance. CLI interface enables automation.