Skip to main content
POST
/
v1
/
technical-analysis
Technical Analysis
curl --request POST \
  --url https://api.chicago.global/v1/technical-analysis \
  --header 'Authorization: Bearer <token>'
{
  "job_id": "tech-a3522a92-87ed-4be0-a912-ad56ed6a8806",
  "status": "pending",
  "symbol": "AAPL.O",
  "force": false,
  "check_url": "/v1/jobs/tech-a3522a92-87ed-4be0-a912-ad56ed6a8806",
  "estimated_duration_seconds": 30,
  "message": "Technical analysis started for AAPL.O."
}

How It Works

This endpoint uses async job processing for AI-powered technical analysis:
  1. Submit Request: POST with stock symbol as query parameter
  2. Receive Job ID: Get a job ID and polling URL immediately
  3. Poll for Status: Check /v1/jobs/{job_id} until status is completed
  4. Get Analysis: The completed job contains comprehensive technical analysis
Analysis typically takes 15-30 seconds. Results are cached daily - subsequent requests return cached analysis instantly.

Query Parameters

ParameterTypeRequiredDefaultDescription
symbolstringYes-Stock symbol (e.g., AAPL.O for Apple Inc)
forcebooleanNofalseForce regeneration even if cached analysis exists
If force is false and analysis was generated today, the cached result will be returned.

Response (202 Accepted)

{
  "job_id": "tech-a3522a92-87ed-4be0-a912-ad56ed6a8806",
  "status": "pending",
  "symbol": "AAPL.O",
  "force": false,
  "check_url": "/v1/jobs/tech-a3522a92-87ed-4be0-a912-ad56ed6a8806",
  "estimated_duration_seconds": 30,
  "message": "Technical analysis started for AAPL.O."
}

Completed Response

When the job completes, GET /v1/jobs/{job_id} returns:
{
  "job_id": "tech-a3522a92-87ed-4be0-a912-ad56ed6a8806",
  "job_type": "technical_analysis",
  "status": "completed",
  "result": {
    "symbol": "AAPL.O",
    "executive_summary": "AAPL trading at $178.52, down 1.2% from 5-day high. RSI at 52 (neutral), MACD showing bearish crossover. Short-term consolidation within broader uptrend.",

    "technical_analysis": {
      "trend_analysis": "Price 2.3% above SMA50 ($174.52) and 8.1% above SMA200 ($165.12). 30-day trend bullish with higher lows.",

      "momentum_indicators": "RSI at 52.3 (neutral zone). MACD histogram negative at -0.42, signal line crossover occurred 2 days ago indicating short-term weakness.",

      "price_action": "Trading between support at $175.20 (1.9% below) and resistance at $182.50 (2.2% above). Key breakout level at $183.",

      "volume_analysis": "Volume at 0.85x 30-day average. Declining volume on recent pullback suggests lack of selling conviction.",

      "volatility_assessment": "ATR at 2.1% of price. Trading in middle of Bollinger Bands, indicating normal volatility conditions."
    },

    "risk_assessment": {
      "volatility_level": "Moderate volatility with 2.1% daily ATR, typical for large-cap tech.",
      "risk_factors": "Key stop level at $174.50 (SMA50). Watch for breakdown below $172 which would signal trend reversal."
    }
  }
}

Response Fields

FieldDescription
executive_summary2-3 sentence overview with price, key indicators, and directional bias
technical_analysis.trend_analysisPrice vs moving averages, trend direction
technical_analysis.momentum_indicatorsRSI, MACD readings and interpretation
technical_analysis.price_actionSupport/resistance levels, key price zones
technical_analysis.volume_analysisVolume patterns and implications
technical_analysis.volatility_assessmentATR, Bollinger Bands, volatility level
risk_assessment.volatility_levelVolatility classification
risk_assessment.risk_factorsKey risk levels and stop-loss guidance

Example: Polling for Results

const response = await fetch(
  'https://api.chicago.global/v1/technical-analysis?symbol=AAPL.O',
  {
    method: 'POST',
    headers: { 'Authorization': `Bearer ${API_KEY}` }
  }
);

const { job_id } = await response.json();

// Poll every 5 seconds
const interval = setInterval(async () => {
  const status = await fetch(
    `https://api.chicago.global/v1/jobs/${job_id}`,
    { headers: { 'Authorization': `Bearer ${API_KEY}` } }
  ).then(r => r.json());

  if (status.status === 'completed') {
    clearInterval(interval);
    console.log('Summary:', status.result.executive_summary);
    console.log('Trend:', status.result.technical_analysis.trend_analysis);
  } else if (status.status === 'failed') {
    clearInterval(interval);
    console.error('Failed:', status.error);
  }
}, 5000);

Error Responses

StatusDescription
401Invalid or missing API key
500Failed to create job

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Query Parameters

symbol
string
required

Stock symbol (e.g., AAPL.O for Apple Inc)

force
boolean
default:false

Force regeneration even if cached analysis exists

Response

Job created successfully. Poll the check_url for results.

job_id
string

Unique job identifier

status
enum<string>

Initial job status

Available options:
pending
symbol
string

Stock symbol being analyzed

force
boolean

Whether force regeneration was requested

check_url
string

URL to poll for job status

estimated_duration_seconds
integer

Estimated processing time in seconds

message
string

Human-readable status message