API Documentation

AlphaLoop API

Integrate real-time MEV data, bot intelligence, and wallet analytics into your applications with our powerful REST API and WebSocket streaming.

Getting Started

Base URL

https://api.alphaloop.io

Quick Start

  1. Create an account and choose a subscription plan
  2. Generate an API key in Settings → API Keys
  3. Include your API key in the Authorization header
  4. Start making requests to the API endpoints

Example Request

curl -X GET "https://api.alphaloop.io/api/v1/mev/sandwich?timeframe=24h" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

Authentication

AlphaLoop uses API key authentication. Include your API key in the Authorization header of every request:

Authorization: Bearer YOUR_API_KEY

Security Best Practices

  • • Never expose your API key in client-side code
  • • Store API keys in environment variables
  • • Rotate API keys regularly (every 90 days)
  • • Use different keys for development and production
  • • Monitor API usage for unusual activity

REST API Endpoints

MEV Events

GET
/api/v1/mev/sandwich

Get sandwich attack events with filters

Parameters: timeframe, minProfit, limit
GET
/api/v1/mev/arbitrage

Get arbitrage opportunities

Parameters: timeframe, dex, minProfit, limit
GET
/api/v1/mev/jit

Get JIT liquidity events

Parameters: timeframe, strategy, limit
GET
/api/v1/mev/liquidations

Get liquidation events

Parameters: timeframe, protocol, limit

Bot Intelligence

GET
/api/v1/bots

Get top MEV bots

Parameters: timeframe, strategy, minProfit, limit
GET
/api/v1/bots/:address

Get detailed bot profile

Parameters: address

Wallet Analytics

GET
/api/v1/wallets/:address

Get wallet analytics

Parameters: address, timeframe
GET
/api/v1/wallets/:address/trades

Get wallet trade history

Parameters: address, timeframe, limit

Analytics

GET
/api/v1/stats

Get platform statistics

Parameters: timeframe
GET
/api/v1/pools/hot

Get hot trading pools

Parameters: timeframe, limit

WebSocket Streaming

Connection URL

wss://api.alphaloop.io/ws/enhanced

Features

  • Real-time MEV event streaming
  • Sub-second latency
  • Custom event filtering
  • Automatic reconnection

Example (JavaScript)

const ws = new WebSocket('wss://api.alphaloop.io/ws/enhanced');

ws.onopen = () => {
  // Subscribe to channels
  ws.send(JSON.stringify({
    type: 'subscribe',
    channels: ['sandwich', 'arbitrage']
  }));
};

ws.onmessage = (event) => {
  const data = JSON.parse(event.data);
  console.log('MEV Event:', data);
};

Pro & Enterprise Only

WebSocket streaming is available on Pro and Enterprise plans. Upgrade your subscription to access real-time data feeds.

Rate Limits

Rate limits vary by subscription tier. All limits are per hour.

Free

100

requests/hour

Explorer

500

requests/hour

Alpha

2,000

requests/hour

Pro

10,000

requests/hour

Rate Limit Headers

X-RateLimit-Limit - Your rate limit ceiling

X-RateLimit-Remaining - Requests remaining

X-RateLimit-Reset - Unix timestamp when limit resets

Error Handling

The API uses standard HTTP status codes and returns errors in JSON format:

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "Rate limit exceeded. Please try again later.",
    "statusCode": 429
  }
}

Common Error Codes

400
Bad Request

Invalid request parameters or malformed JSON

401
Unauthorized

Missing or invalid API key

403
Forbidden

Insufficient permissions for this resource

429
Rate Limit Exceeded

Too many requests, please slow down

500
Internal Server Error

Something went wrong on our end

Need Help?

Join our developer community, view code examples, or contact our support team for assistance with integration.