DEX API Docs

DEX API Documentation

Track DEX to CEX spreads, CEX volume, liquidity quality, route history, symbol data, and webhook-ready payloads across major crypto venues. This page is built as a standalone exchange-style documentation surface, not just a scanner tab.

RESTapplication/json100 req / 60sDEX to CEXroute snapshotssymbol data
Base URL
https://your-domain.com
Version
1.0.0
Content-Type
application/json
Current module
DEX API
OverviewAccessAPI KeyAuthenticationRate LimitsResponse CodesEndpoints OverviewSystem & HealthExchangesRoutes & ArbitrageSymbol DataWebhooksData TypesBest PracticesSDK ExamplesIntegration NotesSupport

Overview

Real-time route data

Normalized DEX to CEX route rows with DEX price, CEX price, spread, liquidity, flow, and CEX volume.

Venue + chain visibility

Health, diagnostics, metrics, and chain-aware venue status for execution monitoring and automation safety.

Scanner-grade integration

Use the same data model to build your own scanner, bot, dashboard, alert router, or execution preview in minutes.

How To Get Access

Request your API key

To start using the API, first request an API key from the author. After you receive the key, add it directly to the endpoint URL as a query parameter and then use the route, symbol, or scanner endpoints exactly as shown below.

Contact The Author For API Key
Access includes
  • Route snapshots with spread, volume, and liquidity.
  • Symbol-level route breakdown across DEX and CEX venues.
  • Fast integration for custom scanners, bots, dashboards, and Telegram workflows.

API Key Usage

How to use your key

After the author sends you an API key, append it directly to the endpoint URL as the apiKey query parameter.

Put the key right after the endpoint, then continue with any other query params like minSpread, limit, hours, or interval.

This means your integration flow is simple: get key, add key to URL, call endpoint, render live routes in your own scanner or dashboard.

URL pattern
https://api.example.com/api/dex/routes?apiKey=YOUR_API_KEY&minSpread=0.5&limit=100
Example
curl "https://api.example.com/api/dex/routes?apiKey=YOUR_API_KEY&minSpread=0.5&limit=100"

Authentication

Public API access

Currently, the API is public with no authentication required. Rate limiting applies to all endpoints.

Rate Limits

Global limits

TypeLimitWindow
IP-based100 requests60 seconds
Burst10 requests1 second
Headers
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1705312800
429 Response
{
  "error": "rate_limit_exceeded",
  "message": "Too many requests. Please try again in 30 seconds.",
  "retryAfter": 30
}

Response Codes

200OK - Successful request
400Bad Request - Invalid parameters
404Not Found - Symbol or route not found
429Too Many Requests - Rate limit exceeded
500Internal Server Error
503Service Unavailable - Route snapshot initializing

Endpoints Overview

System & Health

GET /Service status
GET /healthHealth check with venue status
GET /api/statusScanner status
GET /metricsPrometheus metrics

Exchanges

GET /api/exchangesList all CEX / DEX venues
GET /api/exchanges/diagnosticsVenue diagnostics
GET /api/dex/statusDEX scanner status with chain coverage

Routes & Arbitrage

GET /api/dex/routesAll DEX to CEX routes
GET /api/dex/routes/cex-aboveCEX > DEX only
GET /api/dex/routes/dex-aboveDEX > CEX only
POST /api/dex/scanFull scan request

Symbol Data

GET /api/dex/symbolsList all DEX route symbols
GET /api/dex/symbol/:symbolSymbol details across DEX / CEX venues
GET /api/dex/routes/:symbolAll routes for symbol
GET /api/dex/symbol/:symbol/historyRoute history

System & Health

GET /

Service status and basic information.

Request
curl -X GET https://api.example.com/
Response
{
  "status": "online",
  "service": "dex-scanner-api",
  "version": "1.0.0",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "uptime": "3d 4h 12m",
  "environment": "production"
}

GET /health

Health check with detailed exchange and snapshot status.

Request
curl -X GET https://api.example.com/health
Response
{
  "status": "healthy",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "checks": {
    "database": "connected",
    "venues": {
      "total": 34,
      "online": 31,
      "offline": 3,
      "degraded": 0
    },
    "snapshot": {
      "lastUpdated": "2024-01-15T10:29:58.000Z",
      "ageMs": 2000,
      "rows": 612
    }
  },
  "latency": {
    "avg": 45,
    "max": 120,
    "unit": "ms"
  }
}

GET /api/status

{
  "scanner": "running",
  "alerts": "ready",
  "version": "1.0.0",
  "chains": "8 connected",
  "snapshotAge": "2 seconds",
  "activeRoutes": 612
}

GET /metrics

# HELP dex_routes_total Total route updates by venue
# TYPE dex_routes_total counter
dex_routes_total{venue="uniswap_v3"} 12482
dex_routes_total{venue="binance"} 88210
...

Exchanges

GET /api/exchanges

{
  "venues": [
    "uniswap_v3",
    "curve",
    "jupiter",
    "binance",
    "bybit",
    "okx",
    ...
  ],
  "count": 34,
  "categories": {
    "cex": 26,
    "dex": 8
  }
}

GET /api/exchanges/diagnostics

{
  "timestamp": "2024-01-15T10:30:00.000Z",
  "venues": [
    {
      "venue": "binance",
      "status": "online",
      "lastSuccess": "2024-01-15T10:29:58.000Z",
      "lastError": null,
      "errorCount": 0,
      "avgResponseTime": 234,
      "quoteCount": 1847
    },
    {
      "venue": "jupiter",
      "status": "online",
      "lastSuccess": "2024-01-15T10:29:57.000Z",
      "lastError": "2024-01-15T10:15:22.000Z",
      "errorCount": 2,
      "avgResponseTime": 189,
      "quoteCount": 654
    }
  ]
}

GET /api/dex/status

{
  "timestamp": "2024-01-15T10:30:00.000Z",
  "totalVenues": 34,
  "onlineVenues": 31,
  "chains": ["ethereum", "arbitrum", "solana", "base"],
  "venues": [
    {
      "venue": "jupiter",
      "status": "online",
      "lastUpdate": 1705312798000,
      "quoteCount": 234,
      "isDex": true,
      "chainId": "solana"
    },
    {
      "venue": "binance",
      "status": "online",
      "lastUpdate": 1705312798000,
      "quoteCount": 1847,
      "isDex": false
    }
  ]
}

Routes & Arbitrage

GET /api/dex/routes

Get all DEX to CEX opportunities above the minimum spread threshold.

ParameterTypeDefaultRangeDescription
minSpreadfloat00+Minimum spread percentage
limitinteger10001-5000Maximum results
Request
curl "https://api.example.com/api/dex/routes?minSpread=0.5&limit=100"
Response
{
  "generatedAt": "2024-01-15T10:30:00.000Z",
  "count": 247,
  "rows": [
    {
      "symbol": "ETHUSDC",
      "base": "ETH",
      "quote": "USDC",
      "dexPrice": 3182.42,
      "cexPrice": 3240.98,
      "spreadPercent": 1.84,
      "dexEx": "uniswap_v3",
      "cexEx": "binance",
      "cexVolumeUsd": 1860000,
      "timestamp": 1705312798000,
      "priceChange24h": 2.9,
      "dexUrl": "https://app.uniswap.org/",
      "dexChainId": "ethereum",
      "dexLiquidity": 2400000,
      "dexMarketCap": 780000000,
      "dexBuys": 128,
      "dexSells": 116
    }
  ]
}

GET /api/dex/routes/cex-above

Get only routes where CEX is trading above DEX.

ParameterTypeDefaultRangeDescription
limitinteger10001-5000Maximum results
minVolumefloat00+Minimum CEX quote volume
Request
curl "https://api.example.com/api/dex/routes/cex-above?minVolume=500000&limit=100"
Response
{
  "generatedAt": "2024-01-15T10:30:00.000Z",
  "count": 89,
  "rows": [
    {
      "symbol": "SOLUSDC",
      "base": "SOL",
      "quote": "USDC",
      "dexPrice": 186.11,
      "cexPrice": 187.86,
      "spreadPercent": 0.94,
      "dexEx": "jupiter",
      "cexEx": "bybit",
      "cexVolumeUsd": 2740000,
      "timestamp": 1705312798000
    }
  ]
}

GET /api/dex/routes/dex-above

Get only routes where DEX is trading above CEX.

Request
curl "https://api.example.com/api/dex/routes/dex-above?limit=100"
Response
{
  "generatedAt": "2024-01-15T10:30:00.000Z",
  "count": 41,
  "rows": [
    {
      "symbol": "ARBUSDC",
      "base": "ARB",
      "quote": "USDC",
      "dexPrice": 1.168,
      "cexPrice": 1.142,
      "spreadPercent": -2.28,
      "dexEx": "camelot",
      "cexEx": "bybit",
      "dexLiquidity": 1900000,
      "timestamp": 1705312798000
    }
  ]
}

POST /api/dex/scan

Programmatic route scan request. Same response shape as /api/dex/routes.

Request Body
{
  "minSpread": 0.5,
  "chains": ["ethereum", "arbitrum", "solana"],
  "cexExchanges": ["binance", "bybit", "okx"],
  "symbols": ["ETHUSDC", "SOLUSDC"],
  "includeDex": true
}

Symbol Data

GET /api/dex/symbols

Get a paginated list of all route symbols available in the scanner.

ParameterTypeDefaultRangeDescription
limitinteger501-100Results per page
offsetinteger00+Pagination offset
sortstringbestSpreadbestSpread/worstSpread/volumeSort field
Request
curl "https://api.example.com/api/dex/symbols?limit=50&offset=0&sort=bestSpread"
Response
{
  "generatedAt": "2024-01-15T10:30:00.000Z",
  "total": 247,
  "limit": 50,
  "offset": 0,
  "count": 50,
  "symbols": [
    {
      "symbol": "ETHUSDC",
      "base": "ETH",
      "quote": "USDC",
      "routeCount": 14,
      "bestSpread": 1.84,
      "worstSpread": -0.42
    },
    {
      "symbol": "SOLUSDC",
      "base": "SOL",
      "quote": "USDC",
      "routeCount": 11,
      "bestSpread": 0.94,
      "worstSpread": -0.31
    }
  ],
  "pagination": {
    "nextOffset": 50,
    "hasMore": true,
    "totalPages": 5
  }
}

GET /api/dex/symbol/:symbol

Get route data for a specific symbol across all supported venues.

Request
curl "https://api.example.com/api/dex/symbol/ETH" curl "https://api.example.com/api/dex/symbol/ETHUSDC" curl "https://api.example.com/api/dex/symbol/sol"
Response
{
  "generatedAt": "2024-01-15T10:30:00.000Z",
  "symbol": "ETHUSDC",
  "base": "ETH",
  "quote": "USDC",
  "venueCount": 12,
  "bestRoute": {
    "dexEx": "uniswap_v3",
    "cexEx": "binance",
    "spreadPercent": 1.84,
    "dexPrice": 3182.42,
    "cexPrice": 3240.98
  },
  "worstRoute": {
    "dexEx": "curve",
    "cexEx": "okx",
    "spreadPercent": -0.22,
    "dexPrice": 3196.25,
    "cexPrice": 3189.20
  },
  "routes": [
    {
      "dexEx": "uniswap_v3",
      "cexEx": "binance",
      "spreadPercent": 1.84,
      "dexPrice": 3182.42,
      "cexPrice": 3240.98
    }
  ]
}
404
{
  "error": "symbol_not_found",
  "message": "No route data for INVALID",
  "suggestions": ["ETH", "SOL", "ARB", "LINK"]
}

GET /api/dex/routes/:symbol

Get all route combinations for a specific symbol with detailed statistics.

Request
curl "https://api.example.com/api/dex/routes/ETHUSDC"
Response
{
  "generatedAt": "2024-01-15T10:30:00.000Z",
  "symbol": "ETHUSDC",
  "count": 14,
  "stats": {
    "best": 1.84,
    "worst": -0.42,
    "average": 0.61,
    "median": 0.55,
    "stdDev": 0.47
  },
  "routes": [
    {
      "symbol": "ETHUSDC",
      "base": "ETH",
      "quote": "USDC",
      "dexPrice": 3182.42,
      "cexPrice": 3240.98,
      "spreadPercent": 1.84,
      "dexEx": "uniswap_v3",
      "cexEx": "binance",
      "cexVolumeUsd": 1860000,
      "timestamp": 1705312798000,
      "dexData": {
        "chainId": "ethereum",
        "liquidity": 2400000,
        "marketCap": 780000000,
        "buys24h": 128,
        "sells24h": 116,
        "url": "https://app.uniswap.org/"
      }
    }
  ]
}

GET /api/dex/symbol/:symbol/history

Get historical route data for charting. For now, returns current snapshot only until the database-backed history layer is enabled.

ParameterTypeDefaultRangeDescription
hoursinteger241-168Hours of history
intervalstring1h1m/5m/15m/1h/4h/1dAggregation interval
Request
curl "https://api.example.com/api/dex/symbol/ETH/history?hours=24&interval=1h"
Response
{
  "generatedAt": "2024-01-15T10:30:00.000Z",
  "symbol": "ETHUSDC",
  "message": "History endpoint requires database implementation",
  "currentData": {
    "hours": 24,
    "note": "Returns current snapshot only. DB integration needed for historical route history.",
    "plannedFeatures": [
      "TimescaleDB integration",
      "OHLC route data",
      "Volume profile"
    ]
  },
  "snapshot": [
    {
      "timestamp": 1705312798000,
      "spreadPercent": 1.84,
      "dexPrice": 3182.42,
      "cexPrice": 3240.98,
      "dexEx": "uniswap_v3",
      "cexEx": "binance"
    }
  ]
}

Webhooks

POST /bot{token}

Telegram bot webhook endpoint.

Note

This endpoint is for Telegram integration only.

Request
curl -X POST "https://api.example.com/botYOUR_BOT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "update_id": 123456789,
    "message": {
      "message_id": 1,
      "from": {"id": 123456789, "is_bot": false, "first_name": "User"},
      "chat": {"id": 123456789, "type": "private"},
      "date": 1705312800,
      "text": "/start"
    }
  }'
Response
{
  "ok": true
}

Data Types

DexRouteRow

{
  symbol: string;              // "ETHUSDC"
  base: string;                // "ETH"
  quote: string;               // "USDC"
  dexPrice: number;            // 3182.42
  cexPrice: number;            // 3240.98
  spreadPercent: number;       // 1.84
  dexEx: ExchangeId;           // "uniswap_v3"
  cexEx: ExchangeId;           // "binance"
  cexVolumeUsd?: number;       // 1860000
  timestamp: number;           // Unix ms

  dexChainId?: string;         // "ethereum"
  dexUrl?: string;             // Router / pool URL
  dexBuys?: number;            // 24h buy count
  dexSells?: number;           // 24h sell count
  dexLiquidity?: number;       // USD
  dexMarketCap?: number;       // USD
  priceChange24h?: number;     // Percentage
}

ExchangeId

type ExchangeId =
  | "binance" | "bybit" | "okx" | "gateio"
  | "kucoin" | "mexc" | "whitebit" | "htx"
  | "uniswap_v3" | "curve" | "jupiter" | "orca"
  | "camelot" | "velodrome" | "balancer" | "pancakeswap";

Best Practices

Caching

  • Route snapshots update every 4-5 seconds.
  • Cache responses for 2-4 seconds to reduce load.
  • Use generatedAt for freshness checks before alerting or execution.
Error Handling
try {
  const response = await fetch('/api/dex/routes');

  if (response.status === 429) {
    const data = await response.json();
    await sleep(data.retryAfter * 1000);
    return retry();
  }

  if (response.status === 503) {
    await sleep(2000);
    return retry();
  }

  if (!response.ok) {
    throw new Error(`API error: ${response.status}`);
  }

  return await response.json();
} catch (error) {
  console.error('API request failed:', error);
}
Rate Limit Compliance
async function apiRequest(url, attempt = 1) {
  try {
    return await fetch(url);
  } catch (error) {
    if (error.status === 429 && attempt < 5) {
      const delay = Math.min(1000 * Math.pow(2, attempt), 30000);
      await sleep(delay);
      return apiRequest(url, attempt + 1);
    }
    throw error;
  }
}

SDK Examples

JavaScript / TypeScript

class DexScannerAPI {
  private baseURL: string;

  constructor(baseURL = 'https://api.example.com') {
    this.baseURL = baseURL;
  }

  async getRoutes(minSpread?: number): Promise<RoutesResponse> {
    const params = new URLSearchParams();
    if (minSpread) params.set('minSpread', minSpread.toString());

    const response = await fetch(this.baseURL + '/api/dex/routes?' + params.toString());
    if (!response.ok) throw new Error('HTTP ' + response.status);
    return response.json();
  }

  async getSymbol(symbol: string): Promise<SymbolResponse> {
    const response = await fetch(this.baseURL + '/api/dex/symbol/' + symbol);
    if (response.status === 404) throw new Error('Symbol ' + symbol + ' not found');
    if (!response.ok) throw new Error('HTTP ' + response.status);
    return response.json();
  }
}

const api = new DexScannerAPI();
const routes = await api.getRoutes(0.5);
const symbolData = await api.getSymbol('ETH');

Python

import requests
from typing import Optional, Dict, Any

class DexScannerAPI:
    def __init__(self, base_url: str = "https://api.example.com"):
        self.base_url = base_url
        self.session = requests.Session()

    def get_routes(self, min_spread: Optional[float] = None) -> Dict[str, Any]:
        params = {}
        if min_spread:
            params['minSpread'] = min_spread

        response = self.session.get(
            f"{self.base_url}/api/dex/routes",
            params=params
        )
        response.raise_for_status()
        return response.json()

    def get_symbol(self, symbol: str) -> Dict[str, Any]:
        response = self.session.get(
            f"{self.base_url}/api/dex/symbol/{symbol}"
        )
        if response.status_code == 404:
            raise ValueError(f"Symbol {symbol} not found")
        response.raise_for_status()
        return response.json()

api = DexScannerAPI()
routes = api.get_routes(min_spread=0.5)
symbol_data = api.get_symbol("ETH")

cURL

# Get all DEX routes
curl -s "https://api.example.com/api/dex/routes" | jq '.rows[0:5]'

# Get symbol data
curl -s "https://api.example.com/api/dex/symbol/ETH" | jq '.bestRoute'

# Get paginated symbols
curl -s "https://api.example.com/api/dex/symbols?limit=10&offset=0" | jq '.symbols'

# Get CEX-above opportunities
curl -s "https://api.example.com/api/dex/routes/cex-above?minVolume=500000" | jq '.count'

Integration Notes

What you can build in 2 minutes

Connect the route snapshot endpoint, filter by chain or spread, and show a live watchlist inside your own dashboard, bot, or execution panel.

How teams use the feed

Most integrations show symbol, chain, DEX price, CEX price, spread, liquidity, and CEX volume so traders can instantly see whether an edge is actually executable.

Why this matters for SEO pages

A strong docs page gives users a clear product surface: real endpoints, route data structure, and exact payloads they can plug into their own scanner in seconds.

How to use the API in practice

Use the route feed to display every live spread your own scanner should show: symbol, chain, DEX, CEX, DEX price, CEX price, CEX volume, liquidity, flow, and timestamp.

In most integrations, a user can connect this feed in under two minutes, map the route row into a table, and instantly see all available spreads from the endpoint without rebuilding the underlying data collection stack.

If you want extra data, higher limits, or a custom payload for your own product, message the developer and request access details.

What the DEX API can power

This API is designed for teams that want to show DEX to CEX spreads inside a private terminal, arbitrage dashboard, Telegram workflow, or execution monitor without rebuilding the route collection layer from scratch.

You can surface DEX venue, CEX venue, live spread, CEX volume, liquidity depth, market cap, route age, and symbol coverage in one consistent payload. That means a trader can open your interface and instantly see which opportunities are real, liquid, and worth monitoring.

For SEO and product clarity, a strong API page like this also helps users understand that the scanner is not just a UI. It is a data product they can connect directly into their own stack.

Fast setup for your own scanner

A simple integration usually starts with /api/dex/routes. Pull the rows, render symbol and venue columns, then highlight spread, liquidity, and CEX volume so the user sees execution quality immediately.

After that, add /api/dex/symbol/:symbol for a detail panel and /api/dex/routes/:symbol for route comparisons. With those two pieces, you already have enough to build a lean scanner, internal watchlist, or client-facing arbitrage feed.

If you need custom limits, dedicated coverage, or help wiring alerts and webhooks, use the access block above and message the developer directly.

Support

Access
To get an API key, custom limits, or a dedicated payload format, contact the author directly.
Request API key
Fast onboarding
You can plug the route snapshot endpoint into your own scanner in minutes and start showing live spreads immediately.
Last updated
2024-01-15