HivePredict now has a public, read-only API for anyone building on Hive.
If you run a frontend, analytics site, dashboard, bot, or community tool, you can now pull markets and platform data directly from https://hivepredict.app/api/....
This API is designed for integration:
- Read-only responses
- Pagination + filtering
- Stable public market IDs (on-chain IDs)
- JSON-first, simple to consume from any stack
Base URL
https://hivepredict.app
Quick Start
Discover the API surface
curl -s https://hivepredict.app/api/public | jq
Check service health
curl -s https://hivepredict.app/api/health | jq
Load newest open markets
curl -s "https://hivepredict.app/api/markets/new?limit=5" | jq
Core Endpoints
Market feeds
GET /api/marketsGET /api/markets/featuredGET /api/markets/openGET /api/markets/newGET /api/markets/trendingGET /api/markets/ending-soonGET /api/markets/resolvedGET /api/markets/closed
Common query params:
categorytokenpagelimitsort(on/api/marketsand/api/markets/open)
Examples:
# Open sports markets, ending soon
curl -s "https://hivepredict.app/api/markets/open?category=sports&sort=ending_soon&limit=20" | jq
# Recently resolved HIVE markets
curl -s "https://hivepredict.app/api/markets/resolved?token=HIVE&limit=20" | jq
Market detail
GET /api/markets/:idGET /api/markets/:id/predictionsGET /api/markets/:id/payoutsGET /api/markets/:id/snapshotsGET /api/markets/:id/commentsGET /api/markets/:id/proofsGET /api/markets/:id/stake/:username
Example:
MARKET_ID="24d7cdc5-88e7-4b1c-934f-039d363c4ef9"
curl -s "https://hivepredict.app/api/markets/${MARKET_ID}" | jq
Activity + users
GET /api/activityGET /api/users/:usernameGET /api/users/:username/eligibilityGET /api/users/:username/predictionsGET /api/users/:username/markets
Example:
# Latest resolution + payout events
curl -s "https://hivepredict.app/api/activity?types=market_resolved,payout_sent&limit=50" | jq
Platform endpoints
GET /api/statsGET /api/categoriesGET /api/sports/:league/events
Integration Examples
Example: show a “Trending Markets” widget in JavaScript
const res = await fetch('https://hivepredict.app/api/markets/trending?limit=6');
const data = await res.json();
for (const market of data.markets) {
console.log(`${market.title} -> /markets/${market.id}`);
}
Example: build a profile panel in Python
import requests
username = "tehox"
profile = requests.get(f"https://hivepredict.app/api/users/{username}").json()
preds = requests.get(f"https://hivepredict.app/api/users/{username}/predictions?limit=10").json()
print("user:", profile["user"]["hiveUsername"])
print("win rate:", profile["stats"]["winRate"])
print("recent predictions:", len(preds["predictions"]))
Example: market URL generation
Use:
market.id(public on-chain market ID)
URL pattern:
https://hivepredict.app/markets/{market.id}
Read-only by design
The public API is read-only.
- Public integration routes support
GET/HEAD/OPTIONS - Write operations happen on-chain through Hive transactions, not public API writes
This unlocks:
- Market discovery embeds in other Hive frontends
- Community dashboards and analytics
- Notification bots (market open/close/resolution)
- Historical transparency views (predictions, payouts, activity)
Over time the API will be improved depending on use cases and analytics. So some things might be subject to change, but they will be versioned accordingly and communicated well in advance if any breaking changes are introduced.
If you build something with it, tag @hivepredict on Hive. We want to highlight ecosystem integrations.