ScreenerBot
DocsReferencePrice Data Systems

Price Data Systems

ScreenerBot uses two complementary price systems: real-time pool prices calculated directly from Solana DEX pools, and OHLCV candlestick data from market APIs. Each serves a different purpose in automated trading.

Two Price Systems at a Glance

Pool Prices (Real-Time)

Calculated directly from on-chain DEX pools

500ms Updates

Extremely fast refresh rate

On-Chain Source

Reads directly from Solana pools

Used For Trading

Entry, exit, P&L, stop losses

OHLCV Data (Historical)

Candlestick data from market APIs

1-15 Minute Updates

Varies by priority level

API Sources

DexScreener, GeckoTerminal

Used For Analysis

Strategies, indicators, patterns

Pool Price System

Real-Time On-Chain Prices

Pool prices are calculated directly from Solana DEX pool accounts. ScreenerBot reads the token reserves from liquidity pools and calculates the current price in SOL using standard AMM formulas.

How It Works

  • 1.Fetches pool account data via RPC
  • 2.Decodes token reserves (SOL and token)
  • 3.Applies AMM formula (varies by DEX type)
  • 4.Selects highest liquidity pool for each token
  • 5.Updates every 500ms for active tokens

Key Advantages

  • Fastest updates: Sub-second price changes
  • No API delays: Direct blockchain data
  • Pump detection: Catches rapid price movements
  • Dump protection: Faster stop loss triggers
  • Accurate P&L: Real execution prices

Single Pool Invariant

ScreenerBot always uses the highest-liquidity SOL pair for each token. This ensures consistent pricing and accurate P&L calculations. Multiple pools are monitored, but only one is used for trading decisions.

Where Pool Prices Are Used

Current Price Display

The "Current Price" shown in positions and token details

P&L Calculation

Real-time profit/loss based on current pool price

Stop Loss Triggers

Exits when pool price hits stop loss threshold

Trailing Stop

Tracks price peaks and triggers on pullback

ROI Targets

Exit triggers at 2x, 3x, 5x based on pool price

Entry Evaluation

Checks liquidity and price before entry

OHLCV Data System

Historical Candlestick Data

OHLCV (Open, High, Low, Close, Volume) data is fetched from market APIs like DexScreener and GeckoTerminal. This provides structured candlestick data across multiple timeframes for technical analysis and strategy conditions.

Available Timeframes

  • 1m, 5m, 15m: Short-term scalping
  • 1h, 4h: Swing trading
  • 1d: Position trading

Data Sources

  • 1.DexScreener: Primary source
  • 2.GeckoTerminal: Fallback source
  • 3.Aggregation: Higher timeframes from lower

Historical Data Available

Unlike pool prices which only exist when the bot is running, OHLCV data is available historically. This means you can analyze price patterns from before you started tracking a token.

Where OHLCV Data Is Used

Trading Strategies

Conditions like "price crossed MA" or "RSI oversold"

Technical Analysis

Chart patterns, support/resistance levels

Volume Analysis

Volume spikes, accumulation/distribution

Trend Identification

Multi-timeframe trend analysis

Chart Display

Visual candlestick charts in dashboard

Historical Review

Analyze past price action for any token

How Auto Trader Uses Both Systems

Intelligent Price Selection

The auto trader uses both price systems strategically—pool prices for execution decisions and OHLCV data for strategy evaluation.

Entry Decision Flow

  1. 1.Pool Price Check: Verify liquidity exists and price is valid
  2. 2.Strategy Conditions: Check OHLCV-based conditions (if strategies enabled)
  3. 3.Final Validation: Pool price confirms entry is still viable
  4. 4.Execute: Entry price recorded from actual swap

Exit Decision Flow

  1. 1.Pool Price Monitor: Continuous 500ms price checks for all positions
  2. 2.Trigger Check: Pool price evaluated against stop loss, trailing stop, ROI target
  3. 3.Execute: Exit at current market price

Pool Prices on OHLCV Charts

Best of Both Worlds

In the OHLCV chart view, ScreenerBot overlays real-time pool prices on top of the candlestick data. This gives you historical context from OHLCV combined with instant price updates from pool calculations.

OHLCV Candles

  • • Historical price structure
  • • Volume bars
  • • Pattern formation
  • • Support/resistance levels

Pool Price Overlay

  • • Live price marker
  • • Sub-second updates
  • • More reliable for decisions
  • • Faster pump/dump detection

When to Trust Which System

Trust Pool Prices For

  • Making buy/sell decisions right now
  • Setting and triggering stop losses
  • Evaluating current P&L
  • Detecting sudden price movements
  • Confirming liquidity exists

Trust OHLCV Data For

  • Analyzing historical price patterns
  • Evaluating strategy conditions
  • Multi-timeframe trend analysis
  • Volume spike detection
  • Reviewing tokens you weren't tracking

Technical Comparison

AspectPool PricesOHLCV Data
Update Speed500ms1-15 minutes
Data SourceOn-chain poolsMarket APIs
Historical DataOnly while runningAvailable anytime
Price FormatSingle price pointOHLCV candles
Best ForExecution decisionsStrategy analysis
ReliabilityDepends on RPCDepends on API