Examples
End-to-end examples covering the most common API workflows. All examples use curl — adapt to your preferred HTTP client or language.
Replace qapi_... with your actual API token from Console → Account → API Tokens.
export QUANTINAL_TOKEN="qapi_your_token"
List Your Spaces
Retrieve all spaces in your account.
curl https://api.quantinal.ai/v1/api/spaces \
-H "Authorization: Bearer $QUANTINAL_TOKEN"
Create a Tracker
Create a manual tracker inside a space to monitor Tesla stock sentiment.
curl -X POST https://api.quantinal.ai/v1/api/spaces/spc_abc123/trackers \
-H "Authorization: Bearer $QUANTINAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Tesla Sentiment",
"description": "Tracks Tesla stock sentiment from news and social media",
"run_mode": "manual",
"agent_config": {
"instruction": "Analyze Tesla (TSLA) considering recent news, analyst reports, social media sentiment, and price momentum.",
"score_meaning": "Market Sentiment",
"skills": ["stock_research"],
"reasoning_mode": "basic"
}
}'
Create a Scheduled Tracker
Create a tracker that runs automatically every 24 hours with email notifications on poor signals.
curl -X POST https://api.quantinal.ai/v1/api/spaces/spc_abc123/trackers \
-H "Authorization: Bearer $QUANTINAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Daily Market Pulse",
"description": "Daily overview of S&P 500 sentiment",
"run_mode": "scheduled",
"agent_config": {
"instruction": "Analyze the overall market sentiment for the S&P 500 index using major financial news sources and recent economic data releases.",
"score_meaning": "Market Sentiment",
"skills": ["stock_research"],
"reasoning_mode": "advanced"
},
"schedule": {
"start_time": "2026-03-18T09:00:00Z",
"interval_minutes": 1440
},
"notification_config": {
"signal_level": "Poor",
"email_enabled": true
}
}'
Run a Tracker (Sync)
Trigger a run and wait for the result in a single request.
curl -X POST https://api.quantinal.ai/v1/api/trackers/trk_xyz789/runs \
-H "Authorization: Bearer $QUANTINAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{"sync": true}'
The response includes the full result:
{
"run_id": "run_abc123",
"tracker_id": "trk_xyz789",
"status": "completed",
"started_at": "2026-02-18T10:00:00Z",
"completed_at": "2026-02-18T10:00:45Z",
"execution_time_seconds": 45.2,
"result": {
"score": 7,
"signal": "Positive",
"analysis": "Tesla sentiment is moderately bullish..."
},
"error_message": null
}
Run a Tracker (Async + Poll)
Trigger a run asynchronously, then poll for the result.
Step 1 — Trigger
curl -X POST https://api.quantinal.ai/v1/api/trackers/trk_xyz789/runs \
-H "Authorization: Bearer $QUANTINAL_TOKEN"
Returns 202 Accepted with a run_id:
{
"run_id": "run_abc123",
"tracker_id": "trk_xyz789",
"status": "pending",
"created_at": "2026-02-18T10:00:00Z"
}
Step 2 — Poll until completed
curl https://api.quantinal.ai/v1/api/trackers/trk_xyz789/runs/run_abc123 \
-H "Authorization: Bearer $QUANTINAL_TOKEN"
Repeat until "status": "completed".
Upload Data to Tracker Vault
Upload a File
Upload a PDF report as private context for the tracker's agent.
curl -X POST https://api.quantinal.ai/v1/api/trackers/trk_xyz789/vault/sources \
-H "Authorization: Bearer $QUANTINAL_TOKEN" \
-F "file=@earnings-report.pdf" \
-F "source_name=Q4 Earnings Report"
Upload JSON Data
Push structured data (single record or batch) to the vault.
curl -X POST https://api.quantinal.ai/v1/api/trackers/trk_xyz789/vault/sources \
-H "Authorization: Bearer $QUANTINAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source_name": "earnings-data",
"data": [
{"ticker": "AAPL", "eps": 1.53, "date": "2025-Q4"},
{"ticker": "MSFT", "eps": 3.23, "date": "2025-Q4"},
{"ticker": "GOOGL", "eps": 2.12, "date": "2025-Q4"}
]
}'
List and Filter Runs
Get All Completed Runs
curl "https://api.quantinal.ai/v1/api/trackers/trk_xyz789/runs?status=completed" \
-H "Authorization: Bearer $QUANTINAL_TOKEN"
Filter by Signal and Date Range
Retrieve only "Poor" or "Negative" runs from the past week.
curl "https://api.quantinal.ai/v1/api/trackers/trk_xyz789/runs?signal=Poor&start_date=2026-03-10T00:00:00Z&end_date=2026-03-17T23:59:59Z" \
-H "Authorization: Bearer $QUANTINAL_TOKEN"
Filter by Score Range
Get runs with scores between 1 and 3 (bearish signals).
curl "https://api.quantinal.ai/v1/api/trackers/trk_xyz789/runs?min_score=1&max_score=3" \
-H "Authorization: Bearer $QUANTINAL_TOKEN"
Get Recent Vault Data
Fetch the latest data items added to a tracker's vault in the last 24 hours.
curl "https://api.quantinal.ai/v1/api/trackers/trk_xyz789/vault/recent?limit=10&since_hours=24" \
-H "Authorization: Bearer $QUANTINAL_TOKEN"
Update a Tracker
Change a tracker from manual to scheduled mode.
curl -X PATCH https://api.quantinal.ai/v1/api/trackers/trk_xyz789 \
-H "Authorization: Bearer $QUANTINAL_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"run_mode": "scheduled",
"schedule": {
"start_time": "2026-03-18T09:00:00Z",
"interval_minutes": 360
}
}'
Delete Resources
Delete a Run
curl -X DELETE https://api.quantinal.ai/v1/api/trackers/trk_xyz789/runs/run_abc123 \
-H "Authorization: Bearer $QUANTINAL_TOKEN"
Delete a Data Source
curl -X DELETE https://api.quantinal.ai/v1/api/trackers/trk_xyz789/vault/sources/src_jkl345 \
-H "Authorization: Bearer $QUANTINAL_TOKEN"
Delete a Tracker
curl -X DELETE https://api.quantinal.ai/v1/api/trackers/trk_xyz789 \
-H "Authorization: Bearer $QUANTINAL_TOKEN"
Delete operations are permanent and irreversible. Deleting a tracker also removes all its runs, results, vault, and data sources.