Skip to main content
Fetches a paginated list of all available prediction markets with optional filtering.

Endpoint

GET https://app.kash.bot/api/markets

Query Parameters

status
string
default:"active"
Filter by market status: active, resolved, cancelled, paused
category
string
Filter by category (e.g., politics, crypto, sports)
thread_id
string
Filter to only markets in a specific thread
limit
number
default:"50"
Maximum number of results per page (max: 100)
offset
number
default:"0"
Pagination offset for fetching subsequent pages
sort
string
default:"created_at"
Field to sort by: created_at, total_volume, current_probability, title
order
string
default:"desc"
Sort direction: asc, desc

Response

markets
array
Array of market objects
pagination
object
Pagination metadata

Rate Limit

100 requests per minute per IP address

Example Request

curl "https://app.kash.bot/api/markets?status=active&limit=10&sort=total_volume&order=desc"

Example Response

200 - Success
{
  "markets": [
    {
      "id": "market-abc123",
      "question": "Will BTC hit $100k by end of 2025?",
      "description": "Resolves YES if Bitcoin reaches $100,000 USD on any major exchange",
      "probability": 0.72,
      "yesPrice": 0.72,
      "noPrice": 0.28,
      "totalVolume": 1250000,
      "tradeCount": 450,
      "status": "OPEN",
      "endTime": 1735689600000,
      "category": "crypto",
      "createdAt": "2024-01-01T00:00:00Z",
      "sourceTweetUrl": "https://twitter.com/kash_bot/status/123..."
    }
  ],
  "pagination": {
    "offset": 0,
    "limit": 10,
    "total": 156,
    "hasMore": true
  }
}

GET /api/markets/trending

Get trending markets based on recent activity and momentum.

Endpoint

GET https://app.kash.bot/api/markets/trending

Query Parameters

timeframe
string
default:"7d"
Trending timeframe: 1d, 7d, 30d
limit
number
default:"10"
Maximum results (max: 50)
category
string
Filter by category
minVolume
number
Minimum volume threshold

Rate Limit

100 requests per minute per IP address

Example Request

cURL
curl "https://app.kash.bot/api/markets/trending?timeframe=1d&limit=5"

Example Response

200 - Success
{
  "markets": [
    {
      "id": "market-xyz789",
      "question": "Will ETH flip BTC this year?",
      "probability": 0.15,
      "totalVolume": 890000,
      "tradeCount": 234,
      "trendingScore": 95.4,
      "trendingRank": 1,
      "recentMetrics": {
        "tradeCount": 45,
        "volume": 125000,
        "uniqueTraders": 28
      }
    }
  ],
  "timeframe": {
    "trending": "1d"
  }
}

GET /api/markets/featured

Get featured high-volume markets curated by Kash.

Endpoint

GET https://app.kash.bot/api/markets/featured

Rate Limit

100 requests per minute per IP address

Example Request

cURL
curl "https://app.kash.bot/api/markets/featured"

Example Response

200 - Success
{
  "markets": [
    {
      "id": "market-featured-1",
      "question": "Who will win the 2024 Presidential Election?",
      "probability": 0.52,
      "totalVolume": 5600000,
      "tradeCount": 1250,
      "featured": true
    }
  ],
  "_meta": {
    "count": 6
  }
}

Common Use Cases

Fetch high-volume markets

curl "https://app.kash.bot/api/markets?sort=total_volume&order=desc&limit=10"

Filter by category

curl "https://app.kash.bot/api/markets?category=crypto&status=active"

Get markets from a specific thread

curl "https://app.kash.bot/api/markets?thread_id=thread123"

Build a dynamic market feed

async function fetchMarketFeed() {
  // Get trending markets
  const trendingRes = await fetch('https://app.kash.bot/api/markets/trending?limit=5');
  const trending = await trendingRes.json();
  
  // Get featured markets
  const featuredRes = await fetch('https://app.kash.bot/api/markets/featured');
  const featured = await featuredRes.json();
  
  // Combine and dedupe
  const allMarkets = [...featured.markets, ...trending.markets];
  const uniqueMarkets = allMarkets.filter((m, i, arr) => 
    arr.findIndex(x => x.id === m.id) === i
  );
  
  return uniqueMarkets;
}