OS Trading Engine
Platform Guide
Agents
Agent Performance

Agent Performance

Agent Performance provides comprehensive metrics and analytics for your trading agent. This guide explains what each metric means, how they're calculated, and how to interpret your agent's performance.


Overview

Agent Performance shows:

ComponentDescription
Key MetricsPortfolio balance, profit/loss, win rate, and more
Balance History ChartVisual portfolio performance over time
Live Positions TableCurrently open positions
Recent Trades TableRecently closed positions

Access performance metrics on the Performance Overview page, accessible from the sidebar or at /dashboard/performance-overview.

Agent Performance Page
Performance overview page showing metrics, charts, and tables

Key Metrics

The Performance Overview displays four key metric cards at the top:

Portfolio Balance

What it is: Current total balance including all open positions and available funds.

Calculation:

Portfolio Balance = SOL Balance + Total Position Values

Includes:

ComponentDescription
Available SOLSOL in wallet (not tied to positions)
Position ValuesCurrent value of all open positions (current price × amount)

Example:

  • SOL Balance: 5 SOL
  • Position 1 value: 2 SOL (1000 tokens × $0.002)
  • Position 2 value: 1.5 SOL (750 tokens × $0.002)
  • Portfolio Balance: 8.5 SOL

Portfolio balance updates in real-time as position prices change.

Key Metrics Cards

Four metric cards showing portfolio balance, profit/loss, average return, and win rate


Understanding Profit/Loss

Profit/Loss is broken down into two components:

Realized Profit/Loss

What it is: Profit/loss from closed positions only.

Calculation: Sum of all profitLossSol from closed trades in the database.

Example:

  • Closed trade 1: +1.5 SOL profit
  • Closed trade 2: -0.5 SOL loss
  • Closed trade 3: +1.0 SOL profit
  • Realized P/L: +2.0 SOL

Characteristics:

CharacteristicDescription
Based on Actual SalesFrom executed sales
Fixed Once ClosedDoesn't change after position closes
Includes All Closed TradesBoth wins and losses

Realized P/L represents profits and losses that are locked in from completed trades.


Balance History Chart

The balance history chart shows your portfolio balance over time:

Chart Features

FeatureDescription
24h ViewLast 24 hours of balance changes (hourly snapshots)
All Time ViewComplete balance history since agent creation (daily snapshots)
Real-Time UpdatesChart updates automatically as balance changes

Timeframe Selection

Toggle between timeframes using the tabs above the chart:

TimeframeData PointsUpdate Frequency
24hHourly snapshotsEvery 30 seconds
All TimeDaily snapshotsEvery 30 seconds

How it works:

  • System takes balance snapshots automatically (hourly for 24h, daily for all time)
  • Chart displays snapshots as data points
  • Latest point extends to current balance (real-time)

Interpreting the Chart

PatternDescription
Upward TrendPortfolio balance increasing over time (profitable)
Downward TrendPortfolio balance decreasing over time (losing)
Flat LinePortfolio balance stable (little change)
VolatileLarge swings in portfolio balance (high volatility)

Performance Metrics Explained

Realized vs Unrealized Profit/Loss

TypeSourceStatusBased On
RealizedClosed positions onlyFixed once position closesActual executed sales
UnrealizedOpen positions onlyChanges with current pricesReal-time price feeds

Why it matters:

MetricWhat It Shows
RealizedWhat you've actually earned
UnrealizedPotential profit/loss from open positions
TotalOverall performance (realized + unrealized)

Example:

  • Realized: +5 SOL (from 10 closed trades)
  • Unrealized: -2 SOL (from 3 open positions)
  • Total: +3 SOL (overall performance)

Timeframe Filtering

Performance metrics can be filtered by timeframe:

TimeframeDescriptionWhat's Included
24hLast 24 hoursOnly data from the past 24 hours
All TimeSince agent creationAll data since agent was created

What Changes with Timeframe

MetricBehavior
Average ReturnOnly includes closed trades within timeframe
Win RateOnly includes closed trades within timeframe
Realized Profit/LossOnly includes closed trades within timeframe
Total Profit/LossHistorical data filtered, but unrealized P/L always current

What Doesn't Change

MetricBehavior
Portfolio BalanceAlways current (includes all positions and balance)
Unrealized Profit/LossAlways current (based on current prices)
Total Open PositionsAlways current (includes all open positions)

Use 24h timeframe to see short-term performance. Use All Time to see overall agent performance since creation.


Real-Time Updates

Performance metrics update in real-time:

MetricUpdate SourceUpdate Frequency
Portfolio BalanceWebSocket + APIContinuous (sub-second)
Unrealized P/LWebSocketContinuous (sub-second)
Total P/LWebSocket + APIContinuous (sub-second)
Open PositionsWebSocketContinuous (sub-second)
Realized P/LAPI pollingEvery 10 seconds
Average ReturnAPI pollingEvery 10 seconds
Win RateAPI pollingEvery 10 seconds
Balance HistoryAPI pollingEvery 30 seconds

No page refresh needed: All metrics update automatically via WebSocket and API polling.


Currency Display

Metrics can be displayed in SOL or USD:

CurrencyDescriptionUse Case
SOLNative Solana currencyTrading view, SOL-focused strategies
USDUS Dollar equivalentPortfolio valuation, USD-based tracking

Conversion:

  • USD values use real-time SOL/USD price from Pyth Network
  • All metrics convert simultaneously
  • Toggle anytime to switch currency view

Toggle location: Top header next to trading mode toggle.


Trading Mode Filtering

Performance metrics are filtered by trading mode:

ModeFilter
SimulationOnly simulation wallet data
LiveOnly live wallet data

What's Filtered

ComponentFiltering
All MetricsBalance, P/L, win rate, etc.
Balance History ChartMode-specific balance history
Open Positions TableOnly positions in current mode
Recent Trades TableOnly trades in current mode

How it works:

  • Each trading mode uses a different wallet address
  • Metrics are filtered by wallet address
  • Switching modes shows completely separate performance

Simulation and Live modes have completely separate metrics. Switch between modes to view performance for each independently.


Interpreting Performance

Good Performance Indicators

Positive signs:

IndicatorDescription
Total Profit/LossPositive and growing
Win RateAbove 50% (more wins than losses)
Average ReturnPositive (profitable on average)
Balance HistoryUpward trend over time

Example:

  • Total P/L: +10 SOL
  • Win Rate: 65%
  • Average Return: +8%
  • Balance trend: Steady upward slope

Common Questions

Why doesn't win rate include open positions?

Answer: Win rate is calculated from closed positions only. Open positions don't have a final profit/loss yet, so they can't be counted as wins or losses until they close.

How is average return calculated?

Answer: Average return = Sum of all trade returns (%) / Number of closed trades. Only closed positions are included in the calculation.

What's the difference between realized and unrealized P/L?

Answer:

  • Realized: Profit/loss from closed positions (locked in)
  • Unrealized: Profit/loss from open positions (changes with current prices)

Why is portfolio balance different from my wallet balance?

Answer: Portfolio balance includes both wallet balance AND the current value of all open positions. Wallet balance is only the available SOL, while portfolio balance is total portfolio value.