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
| Data | Source | Cache TTL |
|---|
| Symbol availability | CCXT load_markets() | 4 hours |
| Price, volume, 24h change | CoinGecko API | 60 seconds |
| Coin ID mapping | CoinGecko /coins/list | 24 hours |
Supported Exchanges
| Exchange | Spot | Perp |
|---|
| Binance | Yes | Yes |
| Bybit | Yes | Yes |
| Gate.io | Yes | Yes |
| Kraken | Yes | Yes |
| OKX | Yes | Yes |
| Hyperliquid | No | Yes |
Authentication
All endpoints require authentication via Bearer token. Include the Authorization header in your requests:
Authorization: Bearer <your-access-token>
| Endpoint | Required Roles |
|---|
| GET /symbols | admin, trader, viewer |
| GET /symbol/ | admin, trader, viewer |
| GET /exchanges | admin, trader, viewer |
| GET /stats | admin, trader, viewer |
| POST /refresh | admin |
Endpoints
List Symbols
Get aggregated symbols across exchanges with ticker data.
Market type: “spot” or “perp”
Comma-separated exchange filter (e.g., “binance,bybit”)
Filter by symbol substring (e.g., “BTC”)
Filter by quote currency (e.g., “USDT”)
Sort order: “volume”, “change”, or “symbol”
# 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"e=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.
Trading pair (e.g., “BTC/USDT” or “BTC-USDT”)
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).
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.