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:
https://hivepredict.app
curl -s https://hivepredict.app/api/public | jq
curl -s https://hivepredict.app/api/health | jq
curl -s "https://hivepredict.app/api/markets/new?limit=5" | jq
GET /api/marketsGET /api/markets/featuredGET /api/markets/openGET /api/markets/newGET /api/markets/trendingGET /api/markets/ending-soonGET /api/markets/resolvedGET /api/markets/closedCommon query params:
categorytokenpagelimitsort (on /api/markets and /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
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/:usernameExample:
MARKET_ID="24d7cdc5-88e7-4b1c-934f-039d363c4ef9"
curl -s "https://hivepredict.app/api/markets/${MARKET_ID}" | jq
GET /api/activityGET /api/users/:usernameGET /api/users/:username/eligibilityGET /api/users/:username/predictionsGET /api/users/:username/marketsExample:
# Latest resolution + payout events
curl -s "https://hivepredict.app/api/activity?types=market_resolved,payout_sent&limit=50" | jq
GET /api/statsGET /api/categoriesGET /api/sports/:league/eventsconst 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}`);
}
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"]))
Use:
market.id (public on-chain market ID)URL pattern:
https://hivepredict.app/markets/{market.id}The public API is read-only.
GET/HEAD/OPTIONSThis unlocks:
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.