List Prediction Markets
Filter by status: active | resolved | all
Number of results (max 100)
GET /api/markets/predictions?status=active
{
"markets": [
{
"id": "market-123",
"question": "Will Bitcoin reach $100k by end of year?",
"yesPrice": 0.65,
"noPrice": 0.35,
"liquidity": 5000,
"volume24h": 1250,
"status": "active",
"endDate": "2024-12-31T23:59:59Z"
}
],
"count": 15
}
Buy Shares
Amount to spend (in virtual currency)
POST /api/markets/predictions/{marketId}/buy
Content-Type: application/json
{
"outcome": "YES",
"amount": 100
}
{
"success": true,
"shares": 95.5,
"avgPrice": 0.655,
"positionId": "pos-456"
}
Sell Shares
POST /api/markets/predictions/{marketId}/sell
Content-Type: application/json
{
"outcome": "YES",
"shares": 50
}