API Dökümanları
PredictAPI REST API ve WebSocket akışları için kapsamlı referans
Base URL
https://api.predictapi.netWebSocket
wss://ws.predictapi.net/wsAuthentication
Partner API endpoints use API key authentication. Include your key in the X-API-Key header:
curl -H "X-API-Key: pk_live_abc123..." \
https://api.predictapi.net/api/v1/partner/marketsResponse Format
All responses follow a consistent envelope format:
Success
{
"success": true,
"data": { ... },
"meta": { "page": 1, ... }
}Error
{
"success": false,
"error": {
"code": "INVALID_INPUT",
"message": "description"
}
}Obtain JWT tokens for panel access. Partner API endpoints use API key authentication instead.
POST
/api/v1/auth/loginAuthenticate with email and password. Returns a JWT token for panel/admin access.
Request
{
"email": "[email protected]",
"password": "your_password"
}Response
{
"success": true,
"data": {
"token": "eyJhbGciOiJIUzI1NiIs...",
"user": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "[email protected]",
"role": "partner_admin",
"full_name": "John Doe"
}
}
}GET
/api/v1/auth/meBearer JWT
Get the currently authenticated user profile.
Response
{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"email": "[email protected]",
"role": "partner_admin",
"full_name": "John Doe"
}
}Rate Limiting
API requests are rate-limited per API key. Default limits vary by plan:
Starter
60 req/min
Professional
300 req/min
Enterprise
Custom
Integration Flow
- 1Apply — Submit a partner application via the form or API.
- 2Get API Keys — Once approved, log into the partner panel and create API keys.
- 3Browse Markets — Use
GET /partner/marketsto list available markets. - 4Place Orders — Submit orders via
POST /partner/orderson behalf of your users. - 5Handle Settlements — Poll
GET /partner/settlementsor receive webhooks to credit winning users.