Get Job Status
curl --request GET \
--url https://api.chicago.global/v1/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chicago.global/v1/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chicago.global/v1/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chicago.global/v1/jobs/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chicago.global/v1/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chicago.global/v1/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chicago.global/v1/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Overview
Get Job Status
Get status of a background job.
Use this endpoint to check the status of long-running operations like:
- Stock report generation (/stock-report)
- Score analysis (/score-analysis-async)
- News analysis (/news-analysis-async)
- Financial analysis (/financial-analysis-async)
Status values:
- pending: Job created, not started yet
- processing: Job is currently running (check 'progress' field for details)
- completed: Job finished successfully (result contains the data)
- failed: Job failed (error contains the error message)
Example:
POST /v1/stock-report -> {"job_id": "abc-123", "status": "pending"}
GET /v1/jobs/abc-123 -> {"status": "processing", "progress": "Generating PDF..."}
GET /v1/jobs/abc-123 -> {"status": "completed", "result": {...}}
GET
/
v1
/
jobs
/
{job_id}
Get Job Status
curl --request GET \
--url https://api.chicago.global/v1/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chicago.global/v1/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chicago.global/v1/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.chicago.global/v1/jobs/{job_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chicago.global/v1/jobs/{job_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chicago.global/v1/jobs/{job_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chicago.global/v1/jobs/{job_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Poll this endpoint to check the status of any async job (portfolio analysis, stock reports, etc.).
Stock Report:
Job Status Values
| Status | Description |
|---|---|
pending | Job queued, not yet started |
processing | Job running, check progress for details |
completed | Job finished, results in result field |
failed | Job failed, error message in error field |
Progress Information
While processing, the response includes progress details:{
"job_id": "port-xxx",
"status": "processing",
"progress": {
"step": "Processing portfolio",
"percent": 40,
"message": "Calculating daily positions and P&L..."
}
}
Completed Response
When status iscompleted, the results are in the result field. The structure depends on the job type:
Portfolio Analysis:
{
"job_id": "port-xxx",
"status": "completed",
"result": {
"success": true,
"result": {
"portfolio_summary": { ... },
"performance_metrics": { ... }
}
}
}
{
"job_id": "stock-xxx",
"status": "completed",
"result": {
"success": true,
"symbol": "AAPL.O",
"pdf_url": "https://...",
"html_url": "https://...",
"json_url": "https://..."
}
}
Jobs expire after 30 minutes. Retrieve results promptly after completion.
Last modified on December 19, 2025
⌘I