Description
Develop a comprehensive REST API to enable third-party integrations, mobile app development, and programmatic access to Markstr prediction markets.
API Endpoints to Implement
Market Management
GET /api/v1/markets - List all markets with filtering/pagination
GET /api/v1/markets/{id} - Get specific market details
POST /api/v1/markets - Create new market (authenticated)
PUT /api/v1/markets/{id} - Update market details (authorized users only)
DELETE /api/v1/markets/{id} - Cancel market (authorized users only)
Betting Operations
POST /api/v1/markets/{id}/bets - Place a bet
GET /api/v1/markets/{id}/bets - List market bets
GET /api/v1/users/{id}/bets - Get user's betting history
GET /api/v1/markets/{id}/odds - Get current market odds
Oracle Management
GET /api/v1/oracles - List available oracles
GET /api/v1/oracles/{id} - Get oracle details and reputation
POST /api/v1/oracles/{id}/settle - Settle market (oracle only)
GET /api/v1/oracles/{id}/markets - Get oracle's markets
Analytics & Stats
GET /api/v1/stats/platform - Platform-wide statistics
GET /api/v1/stats/markets/{id} - Market-specific analytics
GET /api/v1/stats/users/{id} - User statistics and performance
Technical Requirements
Documentation & Tooling
Security & Performance
Acceptance Criteria
- All CRUD operations work correctly via API
- API documentation is comprehensive and up-to-date
- Rate limiting prevents abuse while allowing legitimate usage
- Authentication and authorization work securely
- API responses are fast (<200ms for simple queries)
- Third-party developers can easily integrate with the platform
Description
Develop a comprehensive REST API to enable third-party integrations, mobile app development, and programmatic access to Markstr prediction markets.
API Endpoints to Implement
Market Management
GET /api/v1/markets- List all markets with filtering/paginationGET /api/v1/markets/{id}- Get specific market detailsPOST /api/v1/markets- Create new market (authenticated)PUT /api/v1/markets/{id}- Update market details (authorized users only)DELETE /api/v1/markets/{id}- Cancel market (authorized users only)Betting Operations
POST /api/v1/markets/{id}/bets- Place a betGET /api/v1/markets/{id}/bets- List market betsGET /api/v1/users/{id}/bets- Get user's betting historyGET /api/v1/markets/{id}/odds- Get current market oddsOracle Management
GET /api/v1/oracles- List available oraclesGET /api/v1/oracles/{id}- Get oracle details and reputationPOST /api/v1/oracles/{id}/settle- Settle market (oracle only)GET /api/v1/oracles/{id}/markets- Get oracle's marketsAnalytics & Stats
GET /api/v1/stats/platform- Platform-wide statisticsGET /api/v1/stats/markets/{id}- Market-specific analyticsGET /api/v1/stats/users/{id}- User statistics and performanceTechnical Requirements
Documentation & Tooling
Security & Performance
Acceptance Criteria