DexPal Docs

API Specification

Required API endpoints for DEX integration with DexPal.

DexPal requires partner DEXs to provide two API endpoints for integration. These endpoints enable real-time market data display and aggregate statistics on the DexPal platform.

All endpoints must return JSON responses over HTTPS with data updated at least every 2 minutes. All monetary values should be pre-calculated in USD.


General Requirements

RequirementDescription
ProtocolHTTPS only
FormatJSON response
ValuesPre-calculated in USD
Update Frequency≤2 minutes

Endpoint 1: Markets

GET /dexpal/v1/markets

Real-time market data for all trading pairs.

Required Fields

FieldTypeDescriptionExample
base_assetsarray[object]Base assets (single-item array for standard pairs). Each object contains symbol (string, required) and optionally asset_type (string: crypto, equity, index, commodity, forex)[{"symbol": "BTC", "asset_type": "crypto"}]
quote_assetsarray[object]Quote assets (single-item array for standard pairs). Each object contains symbol (string, required) and optionally asset_type (string: crypto, equity, index, commodity, forex)[{"symbol": "USD", "asset_type": "forex"}]
trade_urlstringDirect URL to trade this market on your platform"https://app.example.com/trade/BTC-USD"
pricenumberCurrent mark/last price in quote currency67543.21
volume_24hnumber24-hour trading volume in USD (pre-calculated)1234567890.5
open_interestnumberOpen interest in USD (pre-calculated)98765432.1
funding_ratenumberCurrent funding rate as percentage (0.01 = 0.01%)0.0125

Optional Fields

FieldTypeDescriptionExample
index_pricenumberOracle/index price67540.0
change_24hnumber24-hour price change percentage2.34
high_24hnumber24-hour high price68000.0
low_24hnumber24-hour low price66500.0
max_leverageintegerMaximum leverage available for this market100
funding_intervalintegerFunding interval in hours (default: 8)8
next_fundingISO8601Timestamp of next funding payment"2026-01-20T22:00:00Z"
min_order_sizenumberMinimum order size in base currency0.001
maker_or_open_feenumberBASE maker/open position fee as percentage (0.01 = 0.01%)0.02
taker_or_close_feenumberBASE taker/close position fee as percentage (0.01 = 0.01%)0.05

Example Response

{
  "markets": [
    {
      "base_assets": [
        {
          "symbol": "BTC",
          "asset_type": "crypto"
        }
      ],
      "quote_assets": [
        {
          "symbol": "USD"
        }
      ],
      "trade_url": "https://app.example.com/trade/BTC-USD",
      "price": 67543.21,
      "volume_24h": 1234567890.5,
      "open_interest": 98765432.1,
      "funding_rate": 0.0125,
      "index_price": 67540.0,
      "change_24h": 2.34,
      "max_leverage": 100,
      "funding_interval": 8,
      "maker_or_open_fee": 0.02,
      "taker_or_close_fee": 0.05
    },
    {
      "base_assets": [
        {
          "symbol": "ETH",
          "asset_type": "crypto"
        }
      ],
      "quote_assets": [
        {
          "symbol": "USD"
        }
      ],
      "trade_url": "https://app.example.com/trade/ETH-USD",
      "price": 3456.78,
      "volume_24h": 567890123.45,
      "open_interest": 45678901.23,
      "funding_rate": 0.008,
      "index_price": 3455.5,
      "change_24h": 1.56,
      "max_leverage": 50,
      "funding_interval": 8
    }
  ],
  "timestamp": "2026-01-20T21:00:00Z"
}

Endpoint 2: Metrics

GET /dexpal/v1/metrics

Aggregate DEX volume, fees, and statistics.

Required Fields

FieldTypeDescriptionExample
volume_24hnumber24-hour total trading volume in USD1234567890.5
open_interest_24hnumber24-hour open interest in USD98765432.1
fees_24hnumber24-hour fees collected in USD12345.0

Optional Fields

FieldTypeDescriptionExample
volume_7dnumber7-day total trading volume in USD8765432100.0
volume_all_timenumberAll-time total trading volume in USD999999999999.0
volume_change_1dnumber24-hour volume change percentage5.25
volume_change_7dnumber7-day volume change percentage-2.1
volume_change_24hnumber24-hour volume change percentage15.3
open_interest_7dnumber7-day open interest in USD105000000.0
open_interest_30dnumber30-day open interest in USD120000000.0
open_interest_all_timenumberAll-time open interest in USD150000000.0
fees_7dnumber7-day fees collected in USD123456.0
fees_30dnumber30-day fees collected in USD456789.0
revenue_24hnumber24-hour revenue in USD12345.0
revenue_7dnumber7-day revenue in USD67890.0
tvlnumberTotal value locked in USD500000000.0
traders_24hintegerNumber of unique traders in 24 hours12500
markets_countintegerTotal number of active markets150
token_staked_pctnumberPercentage of platform token staked (0-100)45.5
token_staking_apynumberToken staking APY as percentage12.5

Example Response

{
  "volume_24h": 1234567890.5,
  "volume_7d": 8765432100.0,
  "volume_all_time": 999999999999.0,
  "volume_change_1d": 5.25,
  "volume_change_7d": -2.1,
  "volume_change_24h": 15.3,
  "open_interest_24h": 98765432.1,
  "open_interest_7d": 105000000.0,
  "open_interest_30d": 120000000.0,
  "open_interest_all_time": 150000000.0,
  "fees_24h": 12345.0,
  "fees_7d": 123456.0,
  "fees_30d": 456789.0,
  "tvl": 500000000.0,
  "traders_24h": 12500,
  "markets_count": 150,
  "token_staked_pct": 45.5,
  "token_staking_apy": 12.5,
  "timestamp": "2026-01-20T21:00:00Z"
}

Integration Process

Implement Endpoints

Build the /dexpal/v1/markets and /dexpal/v1/metrics endpoints on your infrastructure.

Validate Response Format

Ensure your endpoints return valid JSON with all required fields and correct data types.

Test with DexPal

Share your base URL with your DexPal account manager. We'll validate the integration within 24 hours.

Go Live

Once validated, your DEX will appear on the DexPal platform with live data.


Need Help?

For technical integration support: