Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
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{
"job_id": "<string>",
"progress": {
"step": "<string>",
"percent": 123,
"message": "<string>"
},
"result": {
"success": true,
"result": {
"portfolio_parameters": {
"start_date": "<string>",
"end_date": "<string>",
"base_currency": "<string>",
"benchmark": "<string>",
"initial_value": 123,
"include_transaction_costs": true,
"transaction_costs_applied": {}
},
"data_quality": {
"total_rics_requested": 123,
"rics_found_in_database": 123,
"missing_rics": [
"<string>"
],
"missing_rics_count": 123,
"data_completeness_pct": 123
},
"portfolio_summary": {
"final_value": 123,
"total_return": 123,
"total_price_pl": 123,
"total_fx_pl": 123,
"total_pl": 123,
"total_transaction_cost": 123,
"transaction_cost_pct_of_initial": 123,
"include_transaction_costs": true
},
"turnover_analysis": {
"summary": {
"days_in_period": 123,
"num_rebalances": 123,
"annualized_turnover_pct": 123,
"total_transaction_cost": 123,
"annualized_cost_pct": 123,
"total_buy_value": 123,
"total_sell_value": 123,
"include_transaction_costs": true
},
"by_rebalance": "<array>",
"by_market": {}
},
"performance_metrics": {
"portfolio": {
"total_return": 123,
"annualized_return": 123,
"annualized_volatility": 123,
"max_drawdown": 123,
"sharpe_ratio": 123,
"sortino_ratio": 123,
"calmar_ratio": 123,
"win_rate": 123,
"var_95": 123,
"var_99": 123
},
"benchmark": {
"total_return": 123,
"annualized_return": 123,
"sharpe_ratio": 123,
"max_drawdown": 123
},
"relative": {
"beta": 123,
"alpha_annualized": 123,
"correlation": 123,
"information_ratio": 123,
"tracking_error": 123,
"excess_return": 123
}
},
"rolling_metrics": {},
"drawdown_analysis": {},
"portfolio_scores": {
"value": 123,
"quality": 123,
"momentum": 123,
"defensive": 123,
"tactical": 123,
"total": 123,
"coverage": 123
},
"concentration_metrics": {},
"transactions": [
{
"date": "<string>",
"ric": "<string>",
"transaction_qty": 123,
"transaction_value": 123
}
],
"latest_holdings": [
{
"ric": "<string>",
"name": "<string>",
"quantity": 123,
"weight": 123,
"ending_value": 123,
"market": "<string>",
"sector": "<string>"
}
],
"market_allocation": "<array>",
"sector_allocation": "<array>",
"currency_allocation": "<array>",
"company_contribution": "<array>",
"sector_contribution": "<array>",
"market_contribution": "<array>",
"time_period_returns": {},
"monthly_returns": "<array>",
"annual_returns": "<array>",
"benchmark_prices": "<array>",
"daily_summary": [
{
"date": "<string>",
"portfolio_value": 123,
"daily_return": 123,
"cumulative_return": 123,
"benchmark_value": 123,
"benchmark_daily_return": 123,
"benchmark_cumulative_return": 123
}
]
},
"error": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"error": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Check the status of an async job. Poll this endpoint until status is ‘completed’ or ‘failed’.
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{
"job_id": "<string>",
"progress": {
"step": "<string>",
"percent": 123,
"message": "<string>"
},
"result": {
"success": true,
"result": {
"portfolio_parameters": {
"start_date": "<string>",
"end_date": "<string>",
"base_currency": "<string>",
"benchmark": "<string>",
"initial_value": 123,
"include_transaction_costs": true,
"transaction_costs_applied": {}
},
"data_quality": {
"total_rics_requested": 123,
"rics_found_in_database": 123,
"missing_rics": [
"<string>"
],
"missing_rics_count": 123,
"data_completeness_pct": 123
},
"portfolio_summary": {
"final_value": 123,
"total_return": 123,
"total_price_pl": 123,
"total_fx_pl": 123,
"total_pl": 123,
"total_transaction_cost": 123,
"transaction_cost_pct_of_initial": 123,
"include_transaction_costs": true
},
"turnover_analysis": {
"summary": {
"days_in_period": 123,
"num_rebalances": 123,
"annualized_turnover_pct": 123,
"total_transaction_cost": 123,
"annualized_cost_pct": 123,
"total_buy_value": 123,
"total_sell_value": 123,
"include_transaction_costs": true
},
"by_rebalance": "<array>",
"by_market": {}
},
"performance_metrics": {
"portfolio": {
"total_return": 123,
"annualized_return": 123,
"annualized_volatility": 123,
"max_drawdown": 123,
"sharpe_ratio": 123,
"sortino_ratio": 123,
"calmar_ratio": 123,
"win_rate": 123,
"var_95": 123,
"var_99": 123
},
"benchmark": {
"total_return": 123,
"annualized_return": 123,
"sharpe_ratio": 123,
"max_drawdown": 123
},
"relative": {
"beta": 123,
"alpha_annualized": 123,
"correlation": 123,
"information_ratio": 123,
"tracking_error": 123,
"excess_return": 123
}
},
"rolling_metrics": {},
"drawdown_analysis": {},
"portfolio_scores": {
"value": 123,
"quality": 123,
"momentum": 123,
"defensive": 123,
"tactical": 123,
"total": 123,
"coverage": 123
},
"concentration_metrics": {},
"transactions": [
{
"date": "<string>",
"ric": "<string>",
"transaction_qty": 123,
"transaction_value": 123
}
],
"latest_holdings": [
{
"ric": "<string>",
"name": "<string>",
"quantity": 123,
"weight": 123,
"ending_value": 123,
"market": "<string>",
"sector": "<string>"
}
],
"market_allocation": "<array>",
"sector_allocation": "<array>",
"currency_allocation": "<array>",
"company_contribution": "<array>",
"sector_contribution": "<array>",
"market_contribution": "<array>",
"time_period_returns": {},
"monthly_returns": "<array>",
"annual_returns": "<array>",
"benchmark_prices": "<array>",
"daily_summary": [
{
"date": "<string>",
"portfolio_value": 123,
"daily_return": 123,
"cumulative_return": 123,
"benchmark_value": 123,
"benchmark_daily_return": 123,
"benchmark_cumulative_return": 123
}
]
},
"error": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
},
"error": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}| 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 |
{
"job_id": "port-xxx",
"status": "processing",
"progress": {
"step": "Processing portfolio",
"percent": 40,
"message": "Calculating daily positions and P&L..."
}
}
completed, 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://..."
}
}
API key passed as Bearer token
The job ID returned from the analyze endpoint
Job status retrieved
Job identifier
Current job status
pending, processing, completed, failed Progress information (when processing)
Show child attributes
Analysis result (when completed)
Show child attributes
Error message (when failed)