Fetches a paginated list of all available prediction markets with optional filtering.
Endpoint
GET https://app.kash.bot/api/markets
Query Parameters
Filter by market status: active, resolved, cancelled, paused
Filter by category (e.g., politics, crypto, sports)
Filter to only markets in a specific thread
Maximum number of results per page (max: 100)
Pagination offset for fetching subsequent pages
sort
string
default:"created_at"
Field to sort by: created_at, total_volume, current_probability, title
Sort direction: asc, desc
Response
Array of market objects
Market description (optional)
Current YES probability (0-1)
Total trading volume in cents
Market status: OPEN, FROZEN, RESOLVED, CANCELLED
Market end time (Unix timestamp in milliseconds)
ISO 8601 timestamp of market creation
URL of the original market tweet (for quote tweets)
Pagination metadata
Total number of matching markets
Whether more results are available
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
{
"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
Trending timeframe: 1d, 7d, 30d
Maximum results (max: 50)
Rate Limit
100 requests per minute per IP address
Example Request
curl "https://app.kash.bot/api/markets/trending?timeframe=1d&limit=5"
Example Response
{
"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 "https://app.kash.bot/api/markets/featured"
Example Response
{
"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;
}