API Documentation
The AIPaul platform provides a set of RESTful APIs that allow external developers, integrators, and dApps to programmatically interact with prediction markets, retrieve prediction results, and access token staking information.
All APIs are secured via API keys or public access verification, depending on endpoint sensitivity.
API Base URL
https://api.aipaul.club/v1Authentication
Public Endpoints: No authentication required.
Private Endpoints (e.g., staking records, governance voting history): Require API Key authentication.
Authorization Header Example:
Authorization: Bearer YOUR_API_KEYAvailable Endpoints
1. Retrieve Live Prediction Events
GET /events/live
Returns a list of currently active prediction events.
Request:
Response Example:
2. Submit Prediction
POST /predictions/submit
Submit a user's prediction for a given event.
Request Example:
Payload:
Response Example:
3. Fetch Prediction Results
GET /predictions/results/:eventId
Retrieve the official result and settlement status for a completed event.
Request Example:
Response Example:
4. View User Staking Information
GET /staking/user/:walletAddress
Fetch staking records associated with a user's wallet address.
Request Example:
Response Example:
Error Codes
200
OK
Successful request
400
Bad Request
Invalid input parameters
401
Unauthorized
Invalid or missing API key
404
Not Found
Resource does not exist
500
Internal Error
Server error
Last updated
