Peers Analysis
curl --request POST \
--url https://api.chicago.global/v1/peers-analysis \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chicago.global/v1/peers-analysis"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chicago.global/v1/peers-analysis', 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/peers-analysis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/peers-analysis"
req, _ := http.NewRequest("POST", 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.post("https://api.chicago.global/v1/peers-analysis")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chicago.global/v1/peers-analysis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Analysis
Peers Analysis
Get AI-generated peers comparison analysis (ASYNC - returns job_id immediately).
Creates a background job for AI-powered peer comparison. Analysis typically takes 30-60 seconds. Use GET /jobs/ to check status and retrieve results.
POST
/
v1
/
peers-analysis
Peers Analysis
curl --request POST \
--url https://api.chicago.global/v1/peers-analysis \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chicago.global/v1/peers-analysis"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chicago.global/v1/peers-analysis', 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/peers-analysis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/peers-analysis"
req, _ := http.NewRequest("POST", 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.post("https://api.chicago.global/v1/peers-analysis")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chicago.global/v1/peers-analysis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Generate an AI-powered peer comparison analysis for a stock. Compares the company against its sector peers on valuation, performance, and fundamentals.
How It Works
This endpoint uses async job processing:- Submit Request: POST with a stock symbol
- Receive Job ID: Get a job ID and polling URL immediately
- Poll for Status: Check
/v1/jobs/{job_id}until status iscompleted - Get Analysis: The completed job contains a narrative peer comparison
Analysis typically takes 30-60 seconds.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Stock symbol (e.g., AAPL, MSFT) |
Response (202 Accepted)
{
"job_id": "stock-66afc3d6-0409-4aa5-bb2d-be34e38efadb",
"status": "pending",
"symbol": "AAPL.O",
"check_url": "/v1/jobs/stock-66afc3d6-0409-4aa5-bb2d-be34e38efadb",
"estimated_duration_seconds": 60,
"message": "Peers analysis started for AAPL.O."
}
Completed Response
When the job completes,GET /v1/jobs/{job_id} returns:
{
"job_id": "stock-66afc3d6-...",
"status": "completed",
"result": {
"symbol": "AAPL.O",
"analysis": "Apple trades at a premium 32x PE multiple while generating an exceptional 171% ROE that dwarfs every peer except Ubiquiti's niche operation, yet the stock sits down 6% year-to-date as investors question growth sustainability in a maturing smartphone market. The company's $3.7 trillion market cap represents more than half the combined value of all technology hardware peers, supported by an EV/EBITDA of 24.6x that reflects consistent cash generation but signals limited upside at current valuations. While competitors like Western Digital surge 44% and Dell climbs 28% on AI infrastructure plays, Apple's ecosystem moat and services expansion provide defensive qualities that justify the valuation premium, though the current Hold consensus suggests analysts see limited catalysts for near-term outperformance."
}
}
Result Fields
| Field | Description |
|---|---|
symbol | Resolved RIC |
analysis | AI-generated narrative comparing the stock against its sector peers on valuation, performance, returns, and competitive positioning |
Example
curl -X POST "https://api.chicago.global/v1/peers-analysis?symbol=AAPL" \
-H "Authorization: Bearer YOUR_API_KEY"
const response = await fetch(
'https://api.chicago.global/v1/peers-analysis?symbol=AAPL',
{
method: 'POST',
headers: { 'Authorization': `Bearer ${API_KEY}` }
}
);
const { job_id, check_url } = await response.json();
const interval = setInterval(async () => {
const status = await fetch(
`https://api.chicago.global${check_url}`,
{ headers: { 'Authorization': `Bearer ${API_KEY}` } }
).then(r => r.json());
if (status.status === 'completed') {
clearInterval(interval);
console.log(status.result.analysis);
} else if (status.status === 'failed') {
clearInterval(interval);
console.error('Failed:', status.error);
}
}, 5000);
Last modified on April 1, 2026
⌘I