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/schedule

Schedule a price check to run at a specific time. Useful for price-based market resolution.

Request Body

FieldTypeRequiredDescription
symbolstringYesToken symbol or mint address
resolutionTimestampstringYesISO 8601 timestamp (must be in future)
callbackUrlstringYesURL 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/schedule

Schedule an AI resolution to run at a specific time. The question will be resolved automatically when the scheduled time arrives.

Request Body

FieldTypeRequiredDescription
questionstringYesThe question to resolve
outcomesstring[]YesPossible outcomes
resolutionTimestampstringYesISO 8601 timestamp (must be in future)
contextstringNoAdditional context
callbackUrlstringYesURL 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/scheduled

List 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/cancel

Cancel 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

StatusDescription
PENDINGJob is scheduled and waiting
PROCESSINGJob is currently executing
COMPLETEDJob completed successfully
FAILEDJob failed (no charge)
CANCELLEDJob was cancelled (refunded)

Related