Skip to main content

Markets API

The Markets API provides aggregated market data across supported exchanges, including:
  • Trading pairs available on each exchange (spot + perps)
  • Current price, 24h change, and volume from CoinGecko
  • Exchange capability information

Data Sources

DataSourceCache TTL
Symbol availabilityCCXT load_markets()4 hours
Price, volume, 24h changeCoinGecko API60 seconds
Coin ID mappingCoinGecko /coins/list24 hours

Supported Exchanges

ExchangeSpotPerp
BinanceYesYes
BybitYesYes
Gate.ioYesYes
KrakenYesYes
OKXYesYes
HyperliquidNoYes

Authentication

All endpoints require authentication via Bearer token. Include the Authorization header in your requests:
Authorization: Bearer <your-access-token>
EndpointRequired Roles
GET /symbolsadmin, trader, viewer
GET /symbol/admin, trader, viewer
GET /exchangesadmin, trader, viewer
GET /statsadmin, trader, viewer
POST /refreshadmin

Endpoints

List Symbols

Get aggregated symbols across exchanges with ticker data.
market_type
string
default:"spot"
Market type: “spot” or “perp”
exchanges
string
Comma-separated exchange filter (e.g., “binance,bybit”)
Filter by symbol substring (e.g., “BTC”)
quote
string
Filter by quote currency (e.g., “USDT”)
sort_by
string
default:"volume"
Sort order: “volume”, “change”, or “symbol”
limit
number
default:"100"
Max results (1-500)
# Get top 20 spot symbols by volume
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.renesis.fi/oems/markets/symbols?market_type=spot&limit=20"

# Get perp symbols for Binance and Bybit
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.renesis.fi/oems/markets/symbols?market_type=perp&exchanges=binance,bybit"

# Search for BTC pairs with USDT quote
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.renesis.fi/oems/markets/symbols?search=BTC&quote=USDT"
{
  "isError": false,
  "message": "Success",
  "statusCode": 200,
  "data": {
    "symbols": [
      {
        "symbol": "BTC/USDT",
        "base": "BTC",
        "quote": "USDT",
        "price": 98500.50,
        "change_24h_pct": -2.15,
        "volume_24h_usd": 2990000000,
        "exchanges": ["binance", "bybit", "gateio", "kraken", "okx"]
      },
      {
        "symbol": "ETH/USDT",
        "base": "ETH",
        "quote": "USDT",
        "price": 3450.25,
        "change_24h_pct": 1.82,
        "volume_24h_usd": 1250000000,
        "exchanges": ["binance", "bybit", "gateio", "kraken", "okx"]
      }
    ],
    "total": 1523,
    "market_type": "spot"
  }
}

Get Symbol Detail

Get detailed info for a single symbol with exchange availability.
symbol
string
required
Trading pair (e.g., “BTC/USDT” or “BTC-USDT”)
market_type
string
default:"spot"
Market type: “spot” or “perp”
# Get BTC/USDT spot details
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.renesis.fi/oems/markets/symbol/BTC-USDT?market_type=spot"

# Get ETH/USDT perp details
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.renesis.fi/oems/markets/symbol/ETH-USDT?market_type=perp"
{
  "isError": false,
  "message": "Success",
  "statusCode": 200,
  "data": {
    "symbol": "BTC/USDT",
    "base": "BTC",
    "quote": "USDT",
    "price": 98500.50,
    "change_24h_pct": -2.15,
    "volume_24h_usd": 2990000000,
    "by_exchange": {
      "binance": {"available": true},
      "bybit": {"available": true},
      "gateio": {"available": true},
      "kraken": {"available": true},
      "okx": {"available": true}
    }
  }
}

List Exchanges

Get supported exchanges with their capabilities.
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.renesis.fi/oems/markets/exchanges"
{
  "isError": false,
  "message": "Success",
  "statusCode": 200,
  "data": {
    "exchanges": [
      {"id": "binance", "name": "Binance", "spot": true, "perp": true},
      {"id": "bybit", "name": "Bybit", "spot": true, "perp": true},
      {"id": "gateio", "name": "Gate.io", "spot": true, "perp": true},
      {"id": "kraken", "name": "Kraken", "spot": true, "perp": true},
      {"id": "okx", "name": "OKX", "spot": true, "perp": true},
      {"id": "hyperliquid", "name": "Hyperliquid", "spot": false, "perp": true}
    ]
  }
}

Get Market Stats

Get statistics about loaded markets.
curl -H "Authorization: Bearer $TOKEN" \
  "https://api.renesis.fi/oems/markets/stats"
{
  "isError": false,
  "message": "Success",
  "statusCode": 200,
  "data": {
    "spot_symbols": 1523,
    "perp_symbols": 892,
    "exchanges_loaded": 6,
    "markets_by_exchange": {
      "binance": 2400,
      "bybit": 1800,
      "gateio": 3200,
      "kraken": 600,
      "okx": 1500,
      "hyperliquid": 150
    }
  }
}

Refresh Markets

Force refresh markets cache (admin only).
exchange
string
Specific exchange to refresh (omit for all)
# Refresh all exchanges (admin only)
curl -X POST -H "Authorization: Bearer $TOKEN" \
  "https://api.renesis.fi/oems/markets/refresh"

# Refresh only Binance (admin only)
curl -X POST -H "Authorization: Bearer $TOKEN" \
  "https://api.renesis.fi/oems/markets/refresh?exchange=binance"
{
  "isError": false,
  "message": "Success",
  "statusCode": 200,
  "data": {
    "refreshed": ["binance", "bybit", "gateio", "kraken", "okx", "hyperliquid"]
  }
}

Error Responses

Unauthorized (401)

{
  "isError": true,
  "message": "Unauthorized - Invalid or missing token.",
  "statusCode": 401
}

Forbidden (403)

{
  "isError": true,
  "message": "Forbidden - Insufficient permissions.",
  "statusCode": 403
}

Invalid Market Type

{
  "isError": true,
  "message": "Error - market_type must be 'spot' or 'perp'.",
  "statusCode": 400
}

Symbol Not Found

{
  "isError": true,
  "message": "Error - Symbol 'INVALID/USDT' not found for market_type='spot'.",
  "statusCode": 404
}

Exchange Not Supported

{
  "isError": true,
  "message": "Error - Exchange 'invalid' not supported.",
  "statusCode": 400
}

Notes

  • First Request: The first request may be slow as markets are loaded from all exchanges. Subsequent requests use cached data.
  • CoinGecko Rate Limits: Free tier allows 10-30 calls/minute. Set COINGECKO_API_KEY for Pro tier with higher limits.
  • Symbol Format: Accepts both / and - as separators (e.g., “BTC/USDT” or “BTC-USDT”).
  • Perp Symbols: Perpetual contracts are identified as “swap” type in CCXT.