Monitoring Dashboard
The PoIPoE dashboard provides comprehensive real-time visibility into your MEV strategy performance, current positions, and market conditions.
Dashboard Features
Real-time Metrics
Live P&L, win rates, gas costs, and execution times
Performance Charts
Interactive charts showing returns, drawdowns, and trends
Alert Center
Customizable alerts for performance thresholds and system issues
Key Metrics Displayed
Financial Metrics
Total P&L, daily returns, profit factor, and ROI tracking
Strategy Performance
Win rate, average trade duration, and strategy-specific metrics
Operational Metrics
Gas costs, success rates, latency, and system health
{
"dashboard": {
"real_time": {
"current_balance": 847.23,
"daily_pnl": 125.67,
"daily_pnl_percent": 0.17,
"active_positions": 3,
"pending_executions": 2,
"avg_gas_price": "25 gwei",
"system_status": "healthy"
},
"performance": {
"total_return": 8.47,
"sharpe_ratio": 3.42,
"max_drawdown": 0.042,
"win_rate": 0.74,
"total_trades": 28946,
"avg_profit_per_trade": 125.67
},
"strategies": {
"arbitrage": {
"status": "active",
"daily_pnl": 89.23,
"win_rate": 0.73,
"avg_execution_time": 1.2,
"opportunities_processed": 234
},
"liquidation": {
"status": "active",
"daily_pnl": 36.44,
"win_rate": 0.89,
"avg_execution_time": 0.8,
"opportunities_processed": 12
}
},
"alerts": {
"active": 2,
"recent": [
{"type": "profit_target", "message": "Daily profit target reached", "timestamp": "2025-11-07T20:00:00Z"},
{"type": "high_gas", "message": "Gas prices above threshold", "timestamp": "2025-11-07T19:45:00Z"}
]
}
}
}
Real-time Metrics
Access live metrics and performance data through our real-time API endpoints. Data updates every 5 seconds for optimal trading decisions.
Available Metrics
Portfolio Metrics
Current balance, P&L, position counts, and risk exposure
Strategy Performance
Individual strategy metrics including win rates and execution times
Market Conditions
Gas prices, network congestion, and opportunity frequency
System Health
API latency, success rates, and infrastructure status
# Get real-time metrics
GET /v1/metrics/realtime
# WebSocket connection for live updates
wss://api.poipoe.com/v1/metrics/stream?api_key=pk_live_xxx
# Response with live data
{
"timestamp": "2025-11-07T20:04:39Z",
"metrics": {
"portfolio": {
"balance_eth": 847.23,
"balance_usd": 847230,
"daily_pnl_eth": 125.67,
"daily_pnl_usd": 125670,
"total_pnl_eth": 647.23,
"total_pnl_usd": 647230
},
"trading": {
"active_strategies": 3,
"trades_today": 156,
"trades_this_hour": 23,
"avg_trade_duration": "3.4 hours",
"success_rate": 0.87
},
"market": {
"avg_gas_price": 25000000000,
"network_congestion": 0.34,
"opportunities_per_minute": 12.5,
"competition_level": "medium"
},
"system": {
"api_latency_ms": 45,
"uptime": 0.9999,
"error_rate": 0.001
}
}
}
// Connect to real-time metrics stream
const WebSocket = require('ws');
const ws = new WebSocket('wss://api.poipoe.com/v1/metrics/stream', {
headers: {
'Authorization': 'Bearer pk_live_xxx'
}
});
ws.on('open', () => {
console.log('Connected to metrics stream');
// Subscribe to specific metrics
ws.send(JSON.stringify({
action: 'subscribe',
metrics: ['portfolio', 'trading', 'market']
}));
});
ws.on('message', (data) => {
const metrics = JSON.parse(data);
// Update dashboard
updateDashboard(metrics);
// Check for alert conditions
if (metrics.portfolio.daily_pnl > 1000) {
sendAlert('High daily profit detected!', metrics);
}
});
ws.on('error', (error) => {
console.error('WebSocket error:', error);
});
ws.on('close', () => {
console.log('Connection closed, attempting reconnect...');
setTimeout(() => connectToMetrics(), 5000);
});
Alerts & Notifications
Configure comprehensive alert system to stay informed about important events, performance thresholds, and system conditions.
Alert Types
Financial Alerts
Profit targets, loss limits, and balance thresholds
Performance Alerts
Win rate changes, execution delays, and strategy issues
System Alerts
API errors, high gas prices, and infrastructure issues
# Create alert configuration
POST /v1/alerts/configure
Content-Type: application/json
{
"name": "Daily Profit Target",
"condition": {
"metric": "portfolio.daily_pnl",
"operator": ">",
"value": 1000,
"duration": "5m"
},
"actions": [
{"type": "email", "recipients": ["trader@company.com"]},
{"type": "webhook", "url": "https://your-app.com/webhook"},
{"type": "slack", "channel": "#trading-alerts"}
],
"cooldown": "30m"
}
# Response
{
"alert_id": "alert_abc123",
"name": "Daily Profit Target",
"status": "active",
"created_at": "2025-11-07T20:04:39Z"
}
Notification Channels
Email Notifications
Detailed email alerts with charts and recommendations
Slack Integration
Real-time alerts in your team Slack channels
Webhooks
Custom webhooks for integration with your systems
Performance Tracking
Comprehensive performance tracking with detailed analytics, benchmark comparisons, and optimization recommendations based on historical data.
Tracking Features
Trade Analysis
Detailed breakdown of each trade with profit attribution
Strategy Comparison
Compare performance across different strategies and timeframes
Risk Assessment
Real-time risk metrics and exposure analysis
Optimization
AI-powered recommendations for strategy improvements
# Get detailed performance report
GET /v1/analytics/performance?period=30d&detailed=true
{
"period": "30d",
"performance": {
"total_return": 0.23,
"sharpe_ratio": 3.42,
"max_drawdown": 0.042,
"calmar_ratio": 2.01,
"sortino_ratio": 4.21
},
"trade_analysis": {
"total_trades": 2847,
"profitable_trades": 2142,
"win_rate": 0.752,
"avg_profit": 89.45,
"avg_loss": -34.12,
"profit_factor": 2.62
},
"strategy_breakdown": {
"arbitrage": {
"trades": 1856,
"win_rate": 0.734,
"total_profit": 156780,
"avg_profit": 84.47
},
"liquidation": {
"trades": 567,
"win_rate": 0.891,
"total_profit": 123400,
"avg_profit": 217.64
},
"sandwich": {
"trades": 424,
"win_rate": 0.673,
"total_profit": 89700,
"avg_profit": 211.56
}
},
"optimization_suggestions": [
{
"type": "position_sizing",
"description": "Increase position size for arbitrage strategy",
"potential_improvement": "15%",
"confidence": 0.78
},
{
"type": "gas_optimization",
"description": "Adjust gas price strategy for liquidation execution",
"potential_improvement": "8%",
"confidence": 0.92
}
]
}
Monitoring API
RESTful API endpoints for accessing all monitoring data programmatically, enabling integration with your existing monitoring infrastructure.
API Endpoints
# Real-time metrics
GET /v1/metrics/realtime
GET /v1/metrics/realtime/{metric_name}
# Historical data
GET /v1/metrics/history?period=7d&interval=1h
GET /v1/metrics/performance?strategy=arbitrage
# Alert management
GET /v1/alerts
POST /v1/alerts/configure
PUT /v1/alerts/{alert_id}
DELETE /v1/alerts/{alert_id}
# System status
GET /v1/system/status
GET /v1/system/health
# Portfolio tracking
GET /v1/portfolio/metrics
GET /v1/portfolio/positions
GET /v1/portfolio/trades
import requests
import time
from datetime import datetime, timedelta
class PoIPoEMonitor:
def __init__(self, api_key):
self.api_key = api_key
self.base_url = "https://api.poipoe.com/v1"
self.headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
def get_realtime_metrics(self):
"""Get current portfolio and trading metrics"""
response = requests.get(
f"{self.base_url}/metrics/realtime",
headers=self.headers
)
return response.json()
def get_performance_report(self, days=7):
"""Get performance report for specified period"""
end_date = datetime.now()
start_date = end_date - timedelta(days=days)
params = {
"start_date": start_date.isoformat(),
"end_date": end_date.isoformat(),
"detailed": True
}
response = requests.get(
f"{self.base_url}/analytics/performance",
headers=self.headers,
params=params
)
return response.json()
def monitor_and_alert(self, alert_config):
"""Monitor metrics and trigger alerts"""
while True:
try:
metrics = self.get_realtime_metrics()
# Check profit threshold
if metrics['portfolio']['daily_pnl'] > alert_config['profit_target']:
self.send_alert("High daily profit!", metrics)
# Check loss limit
if metrics['portfolio']['daily_pnl'] < alert_config['loss_limit']:
self.send_alert("Daily loss limit reached!", metrics)
# Check system health
if metrics['system']['uptime'] < 0.99:
self.send_alert("System health degraded!", metrics)
time.sleep(30) # Check every 30 seconds
except Exception as e:
print(f"Monitoring error: {e}")
time.sleep(60) # Wait longer on error
# Usage
monitor = PoIPoEMonitor('your-api-key')
alert_config = {
'profit_target': 1000,
'loss_limit': -500
}
monitor.monitor_and_alert(alert_config)
Webhooks
Configure webhooks to receive real-time notifications about important events, performance changes, and system status updates.
Webhook Events
Financial Events
Trade executions, profit/loss events, and balance changes
Performance Events
Performance milestones, strategy changes, and optimization opportunities
System Events
API status, maintenance, errors, and infrastructure issues
// Webhook endpoint handler
app.post('/webhooks/poipoe', (req, res) => {
const event = req.body;
// Verify webhook signature
if (!verifySignature(req)) {
return res.status(401).send('Invalid signature');
}
switch (event.type) {
case 'trade.executed':
handleTradeExecuted(event.data);
break;
case 'profit.milestone':
handleProfitMilestone(event.data);
break;
case 'system.error':
handleSystemError(event.data);
break;
default:
console.log('Unknown event type:', event.type);
}
res.status(200).send('OK');
});
function handleTradeExecuted(data) {
console.log('Trade executed:', {
strategy: data.strategy,
profit: data.profit,
gas_cost: data.gas_cost
});
// Update internal tracking
updateTradeTracker(data);
// Send to analytics
sendToAnalytics('trade', data);
}
function handleProfitMilestone(data) {
console.log('Profit milestone reached:', data);
// Send notification
sendSlackNotification(`🎉 Profit milestone: $${data.amount} reached!`);
// Update performance dashboard
updateDashboard(data);
}
// Verify webhook signature
function verifySignature(req) {
const signature = req.headers['x-poipoe-signature'];
const payload = JSON.stringify(req.body);
const expectedSignature = crypto
.createHmac('sha256', WEBHOOK_SECRET)
.update(payload)
.digest('hex');
return signature === expectedSignature;
}
Custom Alerts
Create sophisticated custom alert conditions using our rule engine. Combine multiple metrics, use time-based conditions, and integrate with your systems.
Alert Conditions
Metric Filters
Filter by specific strategies, time periods, and value ranges
Time-based Rules
Trigger alerts based on time windows and market conditions
Complex Logic
Combine multiple conditions with AND/OR operators
{
"name": "High-Frequency Strategy Monitor",
"conditions": {
"any": [
{
"metric": "trading.execution_latency",
"operator": ">",
"value": 5.0,
"duration": "2m"
},
{
"and": [
{
"metric": "trading.success_rate",
"operator": "<",
"value": 0.7
},
{
"metric": "market.competition_level",
"operator": ">",
"value": 0.8
}
],
"duration": "5m"
}
]
},
"actions": [
{
"type": "webhook",
"url": "https://your-app.com/alert",
"payload": {
"severity": "high",
"message": "High-frequency strategy performance degraded"
}
},
{
"type": "pause_strategy",
"strategy": "high_frequency"
}
],
"cooldown": "10m"
}
Data Export
Export comprehensive monitoring data for external analysis, reporting, and integration with your business intelligence tools.
Export Formats
CSV Export
Comma-separated values for spreadsheet analysis
JSON Export
Structured data for API integration
Excel Reports
Formatted reports with charts and analysis
# Request data export
POST /v1/export
Content-Type: application/json
{
"format": "csv",
"data_types": ["trades", "performance", "metrics"],
"date_range": {
"start": "2025-10-01",
"end": "2025-11-01"
},
"filters": {
"strategies": ["arbitrage", "liquidation"],
"min_profit": 100
}
}
# Response
{
"export_id": "exp_xyz789",
"status": "processing",
"estimated_completion": "2025-11-07T20:10:00Z",
"download_url": null
}
# Check export status
GET /v1/export/exp_xyz789
{
"export_id": "exp_xyz789",
"status": "completed",
"download_url": "https://storage.poipoe.com/exports/exp_xyz789.csv",
"expires_at": "2025-11-08T20:04:39Z"
}