PoIPoE API v2.0: New MEV Detection Endpoints & Real-Time Data

We're excited to announce PoIPoE API v2.0, featuring real-time MEV opportunity detection, enhanced data feeds, and new endpoints designed for high-frequency trading and institutional use. This major update provides developers with unprecedented access to MEV opportunities and trading infrastructure.

What's New in v2.0

Real-Time Detection

Sub-second MEV opportunity detection with WebSocket feeds

Advanced Analytics

Historical data and predictive modeling for opportunity scoring

Enterprise Security

API key rotation, rate limiting, and compliance features

Multi-Language SDKs

Official SDKs for Python, JavaScript, Go, and Rust

New Endpoints Overview

API v2.0 introduces 5 major endpoint categories with enhanced functionality:

Opportunities

Real-time MEV opportunity detection and filtering

  • GET /v2/opportunities/discover - Discover current MEV opportunities
  • WS /v2/opportunities/stream - Real-time opportunity streaming
  • GET /v2/opportunities/history - Historical opportunity data

Strategies

Backtesting and strategy analysis tools

  • POST /../strategies/index.htmlbacktest - Backtest custom strategies
  • GET /../strategies/index.htmlperformance - Strategy performance metrics
  • PUT /../strategies/index.htmloptimize - AI-powered optimization

Execution

High-frequency trading execution infrastructure

  • POST /v2/execution/submit - Submit trading orders
  • GET /v2/execution/status - Order status and tracking
  • DELETE /v2/execution/cancel - Cancel pending orders

Portfolio

Portfolio analytics and risk management

  • GET /v2/portfolio/analytics - Portfolio performance metrics
  • POST /v2/portfolio/risk - Risk assessment and limits
  • GET /v2/portfolio/positions - Current positions and P&L

Webhooks

Real-time notifications and integrations

  • POST /v2/webhooks/subscribe - Subscribe to events
  • GET /v2/webhooks/events - Event history and status
  • DELETE /v2/webhooks/unsubscribe - Unsubscribe from events

Authentication & Security

API v2.0 implements enterprise-grade security features:

API Key Management

Each API key is scoped with specific permissions and rate limits:

Basic Tier

  • 100 requests/minute
  • Read-only access
  • Limited to opportunities endpoint

Professional Tier

  • 1,000 requests/minute
  • Full read access + execution
  • WebSocket access

Enterprise Tier

  • 10,000 requests/minute
  • All endpoints + custom integrations
  • Dedicated support

Getting Started with Authentication

API Authentication Example
# Obtain API key from PoIPoE dashboard
export POIPOE_API_KEY="your_api_key_here"

# Authenticate requests using Bearer token
curl -H "Authorization: Bearer $POIPOE_API_KEY" \
     -H "Content-Type: application/json" \
     https://api.poipoe.com/v2/opportunities/discover

# JavaScript example
const poipoe = new PoipoeAPI({
  apiKey: 'your_api_key_here',
  environment: 'production' // or 'sandbox'
});

const opportunities = await poipoe.getOpportunities({
  minProfit: 1000,
  maxRisk: 0.02,
  strategies: ['arbitrage', 'liquidation']
});

Real-Time MEV Opportunity Detection

The heart of API v2.0 is our real-time opportunity detection system, which scans 15+ blockchain networks simultaneously:

Real-Time Opportunity Detection
# Python SDK Example
from poipoe import PoipoeClient
import asyncio

# Initialize client
client = PoipoeClient(
    api_key="your_api_key",
    environment="production"
)

# Get real-time opportunities
opportunities = client.opportunities.get_opportunities(
    min_profit_usd=1000,
    strategies=["arbitrage", "liquidation"],
    chains=["ethereum", "arbitrum", "polygon"],
    max_age_seconds=30  # Only opportunities detected in last 30 seconds
)

# Process each opportunity
for opp in opportunities:
    print(f"Opportunity: {opp.strategy} on {opp.chain}")
    print(f"Profit: ${opp.estimated_profit:,.2f}")
    print(f"Success Rate: {opp.success_rate:.1%}")
    print(f"Gas Estimate: {opp.gas_cost:.2f} ETH")
    print(f"Execution Time: {opp.execution_time:.3f}s")
    print("---")

# WebSocket streaming for real-time updates
async def stream_opportunities():
    async with client.opportunities.stream(
        filters={
            "min_profit": 5000,
            "max_risk": 0.01,
            "strategies": ["arbitrage"]
        }
    ) as stream:
        async for opportunity in stream:
            # Process opportunity in real-time
            if opportunity.profit_score > 0.8:
                # High-confidence opportunity
                result = await client.execution.submit_order(
                    opportunity_id=opportunity.id,
                    amount=100000,  # $100K notional
                    slippage_tolerance=0.002
                )
                print(f"Order submitted: {result.order_id}")

# Start streaming
asyncio.run(stream_opportunities())

Advanced Strategy Backtesting

Test your strategies against historical data with our advanced backtesting engine:

Strategy Backtesting
# Strategy backtesting example
backtest_request = {
    "strategy": {
        "name": "Custom Arbitrage Strategy",
        "parameters": {
            "min_price_difference": 0.002,  # 0.2% minimum spread
            "max_gas_price": 50,  # Gwei
            "position_size_usd": 50000,  # $50K per trade
            "stop_loss": 0.01  # 1% maximum loss
        }
    },
    "timeframe": {
        "start_date": "2025-01-01",
        "end_date": "2025-10-01",
        "granularity": "1h"
    },
    "networks": ["ethereum", "arbitrum", "polygon"],
    "strategies": ["cross_dex_arbitrage"]
}

# Submit backtest
backtest = client.strategies.backtest(backtest_request)
print(f"Backtest ID: {backtest.backtest_id}")

# Get results
results = client.strategies.get_backtest_results(backtest.backtest_id)
print(f"Total Return: {results.total_return:.2%}")
print(f"Sharpe Ratio: {results.sharpe_ratio:.2f}")
print(f"Max Drawdown: {results.max_drawdown:.2%}")
print(f"Win Rate: {results.win_rate:.2%}")
print(f"Total Trades: {results.total_trades}")
print(f"Average Profit: ${results.avg_profit:.2f}")

# Detailed trade analysis
for trade in results.trades[:10]:  # First 10 trades
    print(f"Trade {trade.id}: {trade.strategy} on {trade.chain}")
    print(f"Entry: {trade.entry_price:.4f}, Exit: {trade.exit_price:.4f}")
    print(f"Profit: ${trade.profit:.2f} ({trade.profit_pct:.2%})")
    print(f"Duration: {trade.duration_seconds:.1f}s")
    print("---")

High-Frequency Execution

For time-sensitive MEV opportunities, our execution engine provides sub-second order placement:

High-Frequency Order Execution
// JavaScript SDK example
const poipoe = new PoipoeClient({
  apiKey: 'your_api_key',
  environment: 'production'
});

// Submit high-priority order
async function executeArbitrage(opportunityId) {
  try {
    const order = await poipoe.execution.submitOrder({
      opportunityId: opportunityId,
      type: 'arbitrage',
      amount: 100000, // $100K
      priority: 'high',
      slippageTolerance: 0.001, // 0.1%
      maxGasPrice: 30, // Gwei
      deadline: 30, // 30 seconds
      // Execute on multiple DEXs simultaneously
      executionPlan: {
        buyDex: 'uniswap',
        sellDex: 'sushiswap',
        token: 'USDC',
        chain: 'ethereum'
      }
    });
    
    console.log(`Order submitted: ${order.orderId}`);
    console.log(`Status: ${order.status}`);
    console.log(`Estimated execution: ${order.estimatedTime}ms`);
    
    // Monitor order status
    const orderStatus = await poipoe.execution.getOrderStatus(order.orderId);
    console.log(`Current status: ${orderStatus.status}`);
    console.log(`Filled amount: ${orderStatus.filledAmount}`);
    console.log(`Average price: ${orderStatus.averagePrice}`);
    
    return order;
  } catch (error) {
    console.error('Execution failed:', error);
    return null;
  }
}

// Batch execution for multiple opportunities
async function executeBatchOpportunities(opportunities) {
  const batchRequest = opportunities.map(opp => ({
    opportunityId: opp.id,
    amount: 50000, // $50K each
    priority: 'medium',
    metadata: {
      strategy: opp.strategy,
      chain: opp.chain,
      expectedProfit: opp.estimatedProfit
    }
  }));
  
  const results = await poipoe.execution.submitBatchOrder({
    orders: batchRequest,
    maxConcurrent: 3, // Execute max 3 orders simultaneously
    failFast: false // Continue with other orders if one fails
  });
  
  console.log(`Batch submitted: ${results.batchId}`);
  console.log(`Successful: ${results.successful.length}`);
  console.log(`Failed: ${results.failed.length}`);
  
  return results;
}

Portfolio Analytics & Risk Management

Comprehensive portfolio tracking with real-time risk monitoring:

Portfolio Analytics
// Go SDK example
package main

import (
    "fmt"
    "github.com/poipoe/go-sdk"
)

func main() {
    client := poipoe.NewClient(&poipoe.Config{
        APIKey: "your_api_key",
        Environment: "production",
    })
    
    // Get comprehensive portfolio analytics
    portfolio, err := client.Portfolio.GetAnalytics(&poipoe.PortfolioRequest{
        TimeRange: "30d",
        Metrics: []string{
            "total_return",
            "sharpe_ratio", 
            "max_drawdown",
            "win_rate",
            "profit_factor",
            "var_95",
            "expected_shortfall"
        },
        Breakdown: &poipoe.BreakdownOptions{
            ByStrategy: true,
            ByChain: true,
            ByTime: "1d",
        },
    })
    
    if err != nil {
        panic(err)
    }
    
    fmt.Printf("Portfolio Analytics (Last 30 Days)\n")
    fmt.Printf("Total Return: %.2f%%\n", portfolio.TotalReturn*100)
    fmt.Printf("Sharpe Ratio: %.2f\n", portfolio.SharpeRatio)
    fmt.Printf("Max Drawdown: %.2f%%\n", portfolio.MaxDrawdown*100)
    fmt.Printf("Win Rate: %.2f%%\n", portfolio.WinRate*100)
    fmt.Printf("VaR (95%%): %.2f%%\n", portfolio.VaR95*100)
    fmt.Printf("Total P&L: $%.2f\n", portfolio.TotalPnL)
    
    // Strategy breakdown
    fmt.Println("\nStrategy Performance:")
    for _, strategy := range portfolio.StrategyBreakdown {
        fmt.Printf("  %s: %.2f%% (%.0f trades)\n", 
            strategy.Name, strategy.Return*100, strategy.TradeCount)
    }
    
    // Risk assessment
    risk, err := client.Portfolio.GetRiskAssessment()
    if err == nil {
        fmt.Println("\nRisk Assessment:")
        fmt.Printf("Risk Score: %.1f/10\n", risk.Score)
        fmt.Printf("Risk Level: %s\n", risk.Level)
        fmt.Printf("Recommendations: %s\n", risk.Recommendations)
    }
    
    // Set position limits
    limits := &poipoe.PositionLimits{
        MaxPositionSize: 0.05,    // 5% max position
        MaxDrawdown: 0.10,        // 10% max drawdown
        MaxSingleTrade: 0.02,     // 2% max single trade
        StopLoss: 0.01,           // 1% stop loss
    }
    
    err = client.Portfolio.SetRiskLimits(limits)
    if err != nil {
        fmt.Printf("Error setting risk limits: %v\n", err)
    } else {
        fmt.Println("Risk limits updated successfully")
    }
}

Rate Limits & Performance

API v2.0 provides generous rate limits optimized for high-frequency trading:

Tier-Based Rate Limits

Tier Requests/Minute WebSocket Connections Data Retention Support
Basic 100 1 7 days Community
Professional 1,000 5 90 days Email
Enterprise 10,000 50 Unlimited 24/7 Dedicated

WebSocket API for Real-Time Data

For the lowest latency and highest frequency updates, use our WebSocket API:

WebSocket Real-Time Streaming
// WebSocket connection for real-time opportunities
const ws = new WebSocket('wss://api.poipoe.com/v2/ws');

ws.onopen = function() {
    // Subscribe to opportunity streams
    ws.send(JSON.stringify({
        action: 'subscribe',
        channel: 'opportunities',
        filters: {
            min_profit: 5000,
            strategies: ['arbitrage', 'liquidation'],
            chains: ['ethereum', 'arbitrum']
        }
    }));
    
    // Subscribe to portfolio updates
    ws.send(JSON.stringify({
        action: 'subscribe', 
        channel: 'portfolio',
        events: ['trade_executed', 'pnl_update', 'risk_alert']
    }));
};

ws.onmessage = function(event) {
    const message = JSON.parse(event.data);
    
    switch(message.type) {
        case 'opportunity':
            // Process new MEV opportunity
            if (message.data.confidence > 0.8) {
                executeHighConfidenceOpportunity(message.data);
            }
            break;
            
        case 'trade_executed':
            // Update portfolio on trade completion
            updatePortfolio(message.data);
            break;
            
        case 'risk_alert':
            // Handle risk management alerts
            handleRiskAlert(message.data);
            break;
            
        case 'heartbeat':
            // WebSocket health check
            ws.send(JSON.stringify({action: 'pong'}));
            break;
    }
};

function executeHighConfidenceOpportunity(opportunity) {
    poipoe.execution.submitOrder({
        opportunityId: opportunity.id,
        amount: calculateOptimalSize(opportunity),
        priority: 'urgent',
        metadata: {
            confidence: opportunity.confidence,
            source: 'websocket'
        }
    }).then(result => {
        console.log(`High-confidence order submitted: ${result.orderId}`);
    }).catch(error => {
        console.error('Order submission failed:', error);
    });
}

Migrating from v1.0

Existing v1.0 users can migrate to v2.0 with minimal code changes:

Key Changes

  • Base URL: Changed from /v1 to /v2
  • Authentication: Now uses Bearer token instead of API key header
  • Response Format: Enhanced with additional metadata and pagination
  • Rate Limits: More generous limits for Professional and Enterprise tiers

Migration Example

v1.0 vs v2.0 Comparison
# v1.0 (deprecated)
curl -H "X-API-Key: your_api_key" \
     https://api.poipoe.com/v1/opportunities

# v2.0 (current)
curl -H "Authorization: Bearer your_api_key" \
     -H "Content-Type: application/json" \
     https://api.poipoe.com/v2/opportunities/discover

# v2.0 response includes additional metadata
{
  "data": [...],
  "meta": {
    "total": 1247,
    "page": 1,
    "per_page": 50,
    "filters_applied": {
      "min_profit": 1000,
      "strategies": ["arbitrage", "liquidation"]
    },
    "rate_limits": {
      "remaining": 987,
      "reset_at": "2025-10-20T15:30:00Z"
    }
  }
}

SDKs and Integration Examples

We provide official SDKs for popular programming languages:

Python SDK

pip install poipoe
from poipoe import PoipoeClient
client = PoipoeClient(api_key="your_key")
opps = client.get_opportunities()

JavaScript SDK

npm install @poipoe/sdk
const { PoipoeClient } = require('@poipoe/sdk');
const client = new PoipoeClient({apiKey: 'your_key'});

Go SDK

go get github.com/poipoe/go-sdk
client := poipoe.NewClient(&poipoe.Config{
  APIKey: "your_key",
})

Rust SDK

cargo add poipoe-sdk
use poipoe_sdk::Client;
let client = Client::new("your_key");

Best Practices

Follow these best practices for optimal API performance:

Connection Management

  • Use connection pooling for HTTP clients
  • Implement exponential backoff for retries
  • Monitor WebSocket connection health
  • Use persistent connections when possible

Rate Limit Management

  • Cache frequently accessed data
  • Implement local rate limiting
  • Use WebSocket for high-frequency updates
  • Batch requests when possible

Error Handling

  • Implement comprehensive error handling
  • Log API errors for debugging
  • Have fallback mechanisms for critical operations
  • Monitor API health and availability

Security

  • Store API keys securely (environment variables)
  • Rotate keys regularly
  • Use HTTPS for all requests
  • Implement request signing for sensitive operations

What's Next

We're already working on exciting features for future releases:

  • AI-Powered Strategy Optimization: Machine learning models for automatic strategy improvement
  • Multi-Chain MEV Bundles: Cross-chain transaction bundles for maximum efficiency
  • Advanced Risk Modeling: Real-time VaR and stress testing
  • Social Trading Features: Copy trading and strategy sharing
  • Mobile SDKs: Native iOS and Android support

Getting Started

Ready to start building with PoIPoE API v2.0? Here's how to get started:

  1. Sign up for an API key at app.poipoe.com
  2. Choose your plan based on your expected usage and requirements
  3. Install the SDK for your preferred programming language
  4. Review the documentation at docs.poipoe.com
  5. Start building your MEV trading system

Support and Community

Get help and stay connected with the PoIPoE developer community:

  • Documentation: Comprehensive guides and API reference
  • Discord Community: Real-time support and discussions
  • GitHub: SDK source code and examples
  • Blog: Technical deep-dives and tutorials
  • Email Support: Professional and Enterprise tiers

Conclusion

PoIPoE API v2.0 represents a significant step forward in MEV technology, providing developers with powerful tools to build sophisticated trading systems. With real-time opportunity detection, advanced analytics, and enterprise-grade infrastructure, the platform enables both beginners and experts to participate in the MEV ecosystem effectively.

Whether you're building a simple arbitrage bot or a complex multi-strategy trading system, our API provides the foundation you need to succeed in the rapidly evolving world of MEV.

About the Dev Team

PoIPoE's Dev Team consists of senior engineers from top technology companies, with expertise in high-frequency trading, blockchain infrastructure, and distributed systems. They have built and scaled trading systems processing billions of dollars in volume and maintain 99.99% uptime for our API infrastructure.