List Markets
Retrieve a paginated list of prediction markets with filtering, sorting, and search.
GET
/api/markets
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| status | string | optional | Filter by status: active, resolved, cancelled, pending |
| category | string | optional | Filter by category (e.g., crypto, politics, sports) |
| market_type | string | optional | yesno, threeway, updown, custom |
| sort | string | optional | newest, volume, ending_soon, trending |
| q | string | optional | Full-text search query |
| page | integer | optional | Page number (default: 1) |
| limit | integer | optional | Items per page (default: 20, max: 100) |
Response
Response
200 OK
{
"success": true,
"data": [
{
"id": 142,
"title": "Will BTC reach $200K by end of 2026?",
"slug": "will-btc-reach-200k-by-end-of-2026",
"description": "Resolves YES if...",
"category": "crypto",
"market_type": "yesno",
"status": "active",
"yes_price": 0.62,
"no_price": 0.38,
"volume": 45230.50,
"volume_24h": 1250.00,
"liquidity": 8420.00,
"spread": 0.02,
"price_change_1d": 0.05,
"end_date": "2026-12-31T23:59:59.000Z",
"image_url": "/images/markets/btc-200k.jpg",
"created_at": "2026-01-15T10:00:00.000Z"
}
],
"total": 263,
"page": 1,
"limit": 20
}
Related Endpoints
GET
/api/markets/trending
Returns top markets sorted by 24h volume. No parameters required.
GET
/api/markets/featured
Returns the currently featured market (admin-selected).
GET
/api/markets/categories
Returns all available categories with market counts.
Example
# All active markets
curl https://oddsforge.org/api/markets?status=active
# Crypto markets sorted by volume
curl "https://oddsforge.org/api/markets?category=crypto&sort=volume"
# Search for Bitcoin markets
curl "https://oddsforge.org/api/markets?q=bitcoin"
# Trending markets
curl https://oddsforge.org/api/markets/trending
OddsForge