OpaMev Docs

Back to Home

📚 OpaMev MEV API Documentation

Complete guide to MEV extraction API. Monad Mainnet | 0.47ms latency | 500+ req/sec

⚡ Quick Start

1. Get Your API Key

Sign up and get access immediately.

Get API Key →

2. Monad Mainnet Config

Production endpoint:

https://rpc.monad.xyz
Chain ID: 143 | Latency: 0.47ms

3. Test Health Endpoint

curl -X GET http://localhost:4001/api/v1/health   -H "X-API-Key: opacus_live_your_key"

💼 Use Cases & Applications

One API key powers everything simultaneously:

⚡ MEV Extraction

Sandwich, arbitrage, liquidation

$2K-$50K/day

🔄 DeFi Operations

Swaps, liquidity, lending

Enterprise-grade

🤖 Trading Bots

Automated strategies, monitoring

<100ms latency

📜 Smart Contracts

Call contracts, read state

EVM compatible

💳 Wallets & Payments

Multi-sig, batch transfers

Atomic txs

📊 Analytics & Indexing

Blockchain data, events

Real-time

🔗 API Endpoints

Health Check

GET /api/v1/health

Server status check

{
  "status": "ok",
  "timestamp": "2025-12-27T23:05:19Z",
  "chain_id": 143,
  "network": "Monad Mainnet"
}

📊Real-time Metrics

GET /api/v1/metrics

Performance metrics (16 fields)

{
  "avgLatency": 0.47,
  "blocksSynced": 197,
  "successRate": 100,
  "throughput": 500,
  "nodeStatus": "healthy"
}

📈Historical Stats

GET /api/v1/stats

Cumulative data (16 fields)

{
  "blocksSynced": 1850,
  "totalRequests": 500000,
  "uptime": 99.99
}

🤖Bot Management

GET /api/v1/bots

List running bots

[
  {
    "botId": "bot_abc123",
    "type": "sandwich",
    "status": "running"
  }
]

💎TX Discovery

POST /api/v1/tx/discoverMEV

Discover MEV opportunities (20 per request)

Request:
{
  "min_profit_eth": 0.05,
  "max_slippage": 3.0
}
Response fields (12):
transaction_hash, from, to, value_eth,
gas_price_gwei, estimated_profit_eth,
slippage_percent, mev_type, timestamp

🚀Bot Launch

POST /api/v1/bot/launch

Launch MEV extraction bot

Request:
{
  "strategy": "sandwich",
  "min_profit_eth": 0.1
}
Response (7 fields):
{
  "bot_id": "uuid",
  "status": "launching",
  "created_at": "timestamp"
}

🔐 Authentication

API Key Format

opacus_live_1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p

Pass in Headers

X-API-Key: opacus_live_your_key_here

⏱️ Rate Limits & Quotas

🚀 Starter

Req/sec:10
Daily:100K

⚡ Pro

Req/sec:100
Daily:10M

🏢 Enterprise

Req/sec:Custom
Daily:Unlimited

⚠️ Error Handling

429 - Rate Limited

Use exponential backoff

401 - Unauthorized

Check API key in headers

500 - Server Error

Temporary issue, retry later

💻 Code Examples

JavaScript/Node.js

const axios = require('axios');

const API_KEY = process.env.OPACUS_API_KEY;
const API_URL = 'http://localhost:4001/api/v1';

async function discoverMEV() {
  const res = await axios.post(`${API_URL}/tx/discover`,
    { min_profit_eth: 0.05, max_slippage: 3.0 },
    { headers: { 'X-API-Key': API_KEY } }
  );
  return res.data;
}

async function launchBot(strategy) {
  const res = await axios.post(`${API_URL}/bot/launch`,
    { strategy, min_profit_eth: 0.1 },
    { headers: { 'X-API-Key': API_KEY } }
  );
  return res.data;
}

(async () => {
  const opps = await discoverMEV();
  console.log(`Found ${opps.count} opportunities`);
  
  const bot = await launchBot('sandwich');
  console.log('Bot ID:', bot.bot_id);
})();

Python

import requests, os

API_KEY = os.getenv('OPACUS_API_KEY')
URL = 'http://localhost:4001/api/v1'

def discover_mev():
    r = requests.post(
        f'{URL}/tx/discover',
        json={'min_profit_eth': 0.05, 'max_slippage': 3.0},
        headers={'X-API-Key': API_KEY}
    )
    return r.json()

def launch_bot(strategy):
    r = requests.post(
        f'{URL}/bot/launch',
        json={'strategy': strategy, 'min_profit_eth': 0.1},
        headers={'X-API-Key': API_KEY}
    )
    return r.json()

# Main
opps = discover_mev()
print(f'Found {opps["count"]} opportunities')

bot = launch_bot('sandwich')
print(f'Bot: {bot["bot_id"]}')

cURL

# Health
curl -X GET http://localhost:4001/api/v1/health \
  -H "X-API-Key: opacus_live_key"

# Discover MEV
curl -X POST http://localhost:4001/api/v1/tx/discover \
  -H "X-API-Key: opacus_live_key" \
  -H "Content-Type: application/json" \
  -d '{"min_profit_eth": 0.05, "max_slippage": 3.0}'

# Launch Bot
curl -X POST http://localhost:4001/api/v1/bot/launch \
  -H "X-API-Key: opacus_live_key" \
  -H "Content-Type: application/json" \
  -d '{"strategy": "sandwich", "min_profit_eth": 0.1}'

✅ Best Practices

Secure Keys

  • • Use environment variables
  • • Never commit keys
  • • Rotate regularly

Error Handling

  • • Implement retries
  • • Use exponential backoff
  • • Log errors

Rate Limiting

  • • Check rate headers
  • • Batch requests
  • • Monitor usage

Monitoring

  • • Track latency
  • • Monitor success rate
  • • Set up alerts

🚀 Advanced Usage

Monitor Mempool in Real-time

async function monitorMempool() {
  setInterval(async () => {
    const opps = await axios.post(
      `${API_URL}/tx/discover`,
      { min_profit_eth: 0.05 },
      { headers: { 'X-API-Key': API_KEY } }
    );

    for (const opp of opps.data.opportunities) {
      if (opp.estimated_profit_eth > 0.1) {
        console.log('Profitable:', opp.mev_type);
        
        // Auto-launch
        await axios.post(`${API_URL}/bot/launch`,
          { strategy: opp.mev_type, min_profit_eth: 0.1 },
          { headers: { 'X-API-Key': API_KEY } }
        );
      }
    }
  }, 1000);
}

monitorMempool();

Performance Monitoring

async function trackPerformance() {
  const metrics = await axios.get(
    `${API_URL}/metrics`,
    { headers: { 'X-API-Key': API_KEY } }
  );

  const m = metrics.data;
  console.log(`⚡ Latency: ${m.avgLatency}ms`);
  console.log(`📊 Throughput: ${m.throughput} req/sec`);
  console.log(`✅ Success: ${m.successRate}%`);

  if (m.avgLatency > 50) {
    console.warn('⚠️ High latency!');
  }
}

setInterval(trackPerformance, 60000);

💡 Who Uses This API

🏛️ Trading Firms

Alameda, Genesis, Wintermute

  • Income: $50K-$500K/day
  • Strategy: Multi-network MEV bots
  • Scale: 30+ networks

👤 Individual Traders

Crypto traders, DeFi enthusiasts

  • Income: $1K-$10K/month
  • Strategy: Side-income MEV bots
  • Scale: Personal operation

🔗 DeFi Protocols

Aave, Compound, dYdX, Uniswap

  • Use: Liquidation engine
  • Impact: Protocol solvency
  • Scale: Enterprise

💱 DEX & Aggregators

1inch, 0x Protocol, Curve

  • Use: Slippage optimization
  • Impact: Better user rates
  • Scale: Millions daily

⚙️ Validators

Lido, Rocket Pool

  • Use: MEV rewards capture
  • Impact: +20-30% APY
  • Scale: Billions TVL

🌍 Monad vs Other Networks

✅ Monad Best For
  • • Lowest latency (0.47ms)
  • • Fastest blocks (1s)
  • • Lowest fees
  • • Arbitrage optimal
📊 Other Networks
  • • Ethereum: Most liquidity
  • • Polygon: Faster blocks
  • • Arbitrum: Lower latency
  • • All: EVM compatible

Need Help?

Get support for your MEV strategy.