database-analyzer
π―Skillfrom niller2005/polyflup
Analyzes trading database schemas, identifies potential performance bottlenecks, and recommends optimization strategies for high-frequency cryptocurrency trading data storage.
Installation
npx skills add https://github.com/niller2005/polyflup --skill database-analyzerSkill Details
Overview
# PolyFlup Trading Bot π
Automated trading bot for 15-minute crypto prediction markets on Polymarket.
β¨ Key Features
π Trading Strategy
- Multi-Source Signal Integration: Combines Polymarket order book data with real-time Binance market data to identify true mispricings
- Dual Confidence Calculation: A/B testing framework comparing additive and Bayesian confidence methods
- Bayesian Method (new, optional): Proper probability theory with log-likelihood accumulation and market priors
- Additive Method (default): Directional voting with weighted signal aggregation
- Both methods always calculated and stored for performance comparison
- Edge Calculation: Directional voting system where external Binance signals validate Polymarket pricing (100% total weight):
- Price Momentum (30%): Velocity, acceleration, and RSI analysis over 15-minute lookback
- Polymarket Momentum (20%): Internal price action confirmation on the CLOB
- Order Flow (20%): Buy/sell pressure from Binance taker volume
- Cross-Exchange Divergence (20%): Detects when Polymarket pricing differs from Binance trends
- Volume-Weighted Momentum (10%): VWAP distance with volume quality filtering
- Dynamic Position Sizing: Confidence-based scaling with portfolio exposure limits
> π For detailed strategy logic and signal breakdowns, see [docs/STRATEGY.md](docs/STRATEGY.md)
π‘οΈ Risk Management
- Confidence-Based Sizing: Position size scales with signal strength (configurable multiplier)
- Exit Plan: Places limit sell orders at 99 cents for near-guaranteed profitable exits
- π Midpoint Stop Loss: Primary safety net triggers at $0.30 midpoint price (configurable)
- π Hedged Reversal: Supports holding both sides during trend flips, clearing losers via stop loss
- π Dynamic Scale-In: Adds to winning positions with confidence-weighted timing (up to 12m early for high-conviction trades)
- β‘ Real-Time Monitoring: 1-second position checking cycle with WebSocket-powered price updates
- π‘οΈ Balance Cross-Validation: Symbol-specific validation with fallback to position data for API reliability issues
- π Settlement Auditing: Automated P&L verification against exchange data (logs discrepancies > $0.10)
π Recent Improvements (Jan 2026)
- Bayesian Confidence Calculation (v0.4.4): New probabilistic method using log-likelihood accumulation with market priors. Both additive and Bayesian methods calculated for A/B testing. Toggle via
BAYESIAN_CONFIDENCEsetting. - Enhanced Position Reports (v0.4.3): Clean, aligned format with directional emojis (ππ) and status indicators showing position health at a glance
- Real-Time WebSocket Integration: Near-instant P&L and order fill updates via Polymarket's User Channel (fills/cancels) and Market Channel (midpoint prices)
- Batch API Optimization: Fetch midpoints for all positions in a single call, drastically reducing API overhead
- Enhanced Scale-In Logic: Confidence-weighted dynamic timing allows high-conviction winners to be scaled as early as 12 minutes before expiry
- Enhanced Balance Validation: Symbol-specific tolerance for API reliability issues (especially XRP), with cross-validation between balance and position data
- Reward Optimization: Exit plans automatically adjust prices to ensure they earn liquidity rewards via
check_scoringAPI - Intelligent Position Sync: Startup logic detects and "adopts" untracked exchange positions for automated management
- Settlement Auditing: Automated verification of local P&L against official
closed-positionsAPI data - Modular Backend: Fully refactored
src/trading/ordersandsrc/data/market_datafor better maintainability
> π‘ Tip: See [docs/RISK_PROFILES.md](docs/RISK_PROFILES.md) for pre-configured profiles (Conservative, Balanced, Aggressive, Ultra Aggressive)
π° Automated Operations
- Auto-Claim: Automati
More from this repository8
Manages automated trading operations for the PolyFlup bot, executing real-time crypto market trades on Polymarket with dynamic risk management and multi-source signal integration.
Streamlines machine learning model training by automating hyperparameter tuning, data preprocessing, and model evaluation workflows
python-bot-standards skill from niller2005/polyflup
Automates trading on Polymarket's 15-minute crypto prediction markets by integrating multi-source signals, calculating trade confidence, and dynamically managing risk.
database-sqlite skill from niller2005/polyflup
Standardizes and enforces consistent UI component design, interaction patterns, and styling guidelines for Svelte-based trading bot interfaces.
Tracks, reconciles, and validates trading transactions, settlements, and profit
Tracks and archives historical trading performance, confidence metrics, and signal generation details for the PolyFlup trading bot's past market interactions.