Scheduled Jobs
Schedule price checks and AI resolutions to run at a specific time. Perfect for automating market resolution at close time.
Schedule Price Check
POST
/price/scheduleSchedule a price check to run at a specific time. Useful for price-based market resolution.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Token symbol or mint address |
| resolutionTimestamp | string | Yes | ISO 8601 timestamp (must be in future) |
| callbackUrl | string | Yes | URL to receive result (HTTPS required) |
Request
cURL
curl -X POST "https://api.predikt.fun/api/v1/price/schedule" \-H "Authorization: Bearer pk_live_your_api_key" \-H "Content-Type: application/json" \-d '{"symbol": "SOL","resolutionTimestamp": "2026-01-20T00:00:00.000Z","callbackUrl": "https://your-server.com/webhook"}'
Response
Response (200)
{"jobId": "job_abc123","jobType": "PRICE_RESOLUTION","scheduledFor": "2026-01-20T00:00:00.000Z","status": "PENDING","costUsd": "0.05","remainingBalanceUsd": "45.95","canCancel": true}
Schedule AI Resolution
POST
/ai/scheduleSchedule an AI resolution to run at a specific time. The question will be resolved automatically when the scheduled time arrives.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| question | string | Yes | The question to resolve |
| outcomes | string[] | Yes | Possible outcomes |
| resolutionTimestamp | string | Yes | ISO 8601 timestamp (must be in future) |
| context | string | No | Additional context |
| callbackUrl | string | Yes | URL to receive result (HTTPS required) |
Request
cURL
curl -X POST "https://api.predikt.fun/api/v1/ai/schedule" \-H "Authorization: Bearer pk_live_your_api_key" \-H "Content-Type: application/json" \-d '{"question": "Will SOL reach $200 by January 31, 2026?","outcomes": ["Yes", "No"],"resolutionTimestamp": "2026-01-31T00:00:00.000Z","callbackUrl": "https://your-server.com/webhook"}'
Response
Response (200)
{"jobId": "job_def456","jobType": "AI_RESOLUTION","scheduledFor": "2026-01-31T00:00:00.000Z","status": "PENDING","costUsd": "0.50","remainingBalanceUsd": "45.50","canCancel": true}
List Scheduled Jobs
GET
/price/scheduledor/ai/scheduledList all your scheduled jobs for price checks or AI resolutions.
Response
Response (200)
{"jobs": [{"jobId": "job_abc123","jobType": "PRICE_RESOLUTION","scheduledFor": "2026-01-20T00:00:00.000Z","status": "PENDING","createdAt": "2026-01-17T12:00:00.000Z","canCancel": true},{"jobId": "job_xyz789","jobType": "PRICE_RESOLUTION","scheduledFor": "2026-01-21T00:00:00.000Z","status": "PENDING","createdAt": "2026-01-17T12:30:00.000Z","canCancel": true}],"total": 2}
Cancel Scheduled Job
POST
/price/scheduled/:jobId/cancelor/ai/scheduled/:jobId/cancelCancel a scheduled job. Jobs can only be cancelled at least 5 minutes before their scheduled execution time.
Request
cURL
curl -X POST "https://api.predikt.fun/api/v1/price/scheduled/job_abc123/cancel" \-H "Authorization: Bearer pk_live_your_api_key"
Response
Response (200)
{"jobId": "job_abc123","status": "cancelled","refundUsd": "0.02","remainingBalanceUsd": "46.00"}
Note: Cancelled jobs are fully refunded. Jobs cannot be cancelled within 5 minutes of their scheduled time.
Job Statuses
| Status | Description |
|---|---|
| PENDING | Job is scheduled and waiting |
| PROCESSING | Job is currently executing |
| COMPLETED | Job completed successfully |
| FAILED | Job failed (no charge) |
| CANCELLED | Job was cancelled (refunded) |