> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chicago.global/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Job Status

> Check the status of an async job. Poll this endpoint until status is 'completed' or 'failed'.

Poll this endpoint to check the status of any async job (portfolio analysis, stock reports, etc.).

## 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:

```json theme={null}
{
  "job_id": "port-xxx",
  "status": "processing",
  "progress": {
    "step": "Processing portfolio",
    "percent": 40,
    "message": "Calculating daily positions and P&L..."
  }
}
```

## Completed Response

When status is `completed`, the results are in the `result` field. The structure depends on the job type:

**Portfolio Analysis:**

```json theme={null}
{
  "job_id": "port-xxx",
  "status": "completed",
  "result": {
    "success": true,
    "result": {
      "portfolio_summary": { ... },
      "performance_metrics": { ... }
    }
  }
}
```

**Stock Report:**

```json theme={null}
{
  "job_id": "stock-xxx",
  "status": "completed",
  "result": {
    "success": true,
    "symbol": "AAPL.O",
    "pdf_url": "https://...",
    "html_url": "https://...",
    "json_url": "https://..."
  }
}
```

<Note>
  Jobs expire after 30 minutes. Retrieve results promptly after completion.
</Note>


## OpenAPI

````yaml GET /v1/jobs/{job_id}
openapi: 3.1.0
info:
  title: Parallax API
  description: >-
    Financial data and portfolio analytics API. Analyze portfolios with
    multi-currency support, rebalancing, and comprehensive metrics.
  version: 1.0.0
servers:
  - url: https://api.chicago.global
security:
  - bearerAuth: []
paths:
  /v1/jobs/{job_id}:
    get:
      summary: Get Job Status
      description: >-
        Check the status of an async job. Poll this endpoint until status is
        'completed' or 'failed'.
      operationId: getJobStatus
      parameters:
        - name: job_id
          in: path
          required: true
          description: The job ID returned from the analyze endpoint
          schema:
            type: string
          example: port-a3522a92-87ed-4be0-a912-ad56ed6a8806
      responses:
        '200':
          description: Job status retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    JobStatusResponse:
      type: object
      properties:
        job_id:
          type: string
          description: Job identifier
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
          description: Current job status
        progress:
          type: object
          description: Progress information (when processing)
          properties:
            step:
              type: string
              description: Current processing step
            percent:
              type: integer
              description: Completion percentage (0-100)
            message:
              type: string
              description: Progress message
        result:
          $ref: '#/components/schemas/PortfolioAnalysisResult'
          description: Analysis result (when completed)
        error:
          type: string
          description: Error message (when failed)
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Error message
    PortfolioAnalysisResult:
      type: object
      properties:
        success:
          type: boolean
        result:
          type: object
          properties:
            portfolio_parameters:
              type: object
              description: Echoed portfolio configuration
              properties:
                start_date:
                  type: string
                end_date:
                  type: string
                base_currency:
                  type: string
                benchmark:
                  type: string
                initial_value:
                  type: number
                include_transaction_costs:
                  type: boolean
                transaction_costs_applied:
                  type: object
                  nullable: true
            data_quality:
              type: object
              description: Data coverage and missing RICs
              properties:
                total_rics_requested:
                  type: integer
                rics_found_in_database:
                  type: integer
                missing_rics:
                  type: array
                  items:
                    type: string
                missing_rics_count:
                  type: integer
                data_completeness_pct:
                  type: number
            portfolio_summary:
              type: object
              description: High-level P&L summary
              properties:
                final_value:
                  type: number
                  description: Final portfolio value
                total_return:
                  type: number
                  description: Total return as decimal
                total_price_pl:
                  type: number
                  description: P&L from price changes
                total_fx_pl:
                  type: number
                  description: P&L from FX changes
                total_pl:
                  type: number
                  description: Total P&L
                total_transaction_cost:
                  type: number
                  description: Total transaction costs incurred
                transaction_cost_pct_of_initial:
                  type: number
                  description: Transaction costs as % of initial value
                include_transaction_costs:
                  type: boolean
                  description: Whether transaction costs were applied
            turnover_analysis:
              type: object
              description: Portfolio turnover and transaction cost analysis
              properties:
                summary:
                  type: object
                  properties:
                    days_in_period:
                      type: integer
                    num_rebalances:
                      type: integer
                    annualized_turnover_pct:
                      type: number
                    total_transaction_cost:
                      type: number
                    annualized_cost_pct:
                      type: number
                    total_buy_value:
                      type: number
                    total_sell_value:
                      type: number
                    include_transaction_costs:
                      type: boolean
                by_rebalance:
                  type: array
                  description: Turnover breakdown by rebalance date
                by_market:
                  type: object
                  description: Turnover breakdown by market
            performance_metrics:
              type: object
              description: Comprehensive risk-return metrics
              properties:
                portfolio:
                  type: object
                  properties:
                    total_return:
                      type: number
                    annualized_return:
                      type: number
                    annualized_volatility:
                      type: number
                    max_drawdown:
                      type: number
                    sharpe_ratio:
                      type: number
                    sortino_ratio:
                      type: number
                    calmar_ratio:
                      type: number
                    win_rate:
                      type: number
                    var_95:
                      type: number
                    var_99:
                      type: number
                benchmark:
                  type: object
                  properties:
                    total_return:
                      type: number
                    annualized_return:
                      type: number
                    sharpe_ratio:
                      type: number
                    max_drawdown:
                      type: number
                relative:
                  type: object
                  properties:
                    beta:
                      type: number
                    alpha_annualized:
                      type: number
                    correlation:
                      type: number
                    information_ratio:
                      type: number
                    tracking_error:
                      type: number
                    excess_return:
                      type: number
            rolling_metrics:
              type: object
              description: 30/60/90-day rolling metrics with timeseries
            drawdown_analysis:
              type: object
              description: Complete drawdown analysis with episodes
            portfolio_scores:
              type: object
              description: Quant factor scores
              properties:
                value:
                  type: number
                quality:
                  type: number
                momentum:
                  type: number
                defensive:
                  type: number
                tactical:
                  type: number
                total:
                  type: number
                coverage:
                  type: number
            concentration_metrics:
              type: object
              description: Portfolio concentration analysis
            transactions:
              type: array
              description: All buy/sell transactions
              items:
                type: object
                properties:
                  date:
                    type: string
                  ric:
                    type: string
                  transaction_qty:
                    type: number
                  transaction_value:
                    type: number
                  transaction_type:
                    type: string
                    enum:
                      - BUY
                      - SELL
            latest_holdings:
              type: array
              description: Current portfolio positions
              items:
                type: object
                properties:
                  ric:
                    type: string
                  name:
                    type: string
                  quantity:
                    type: number
                  weight:
                    type: number
                  ending_value:
                    type: number
                  market:
                    type: string
                  sector:
                    type: string
            market_allocation:
              type: array
              description: Market allocation over time
            sector_allocation:
              type: array
              description: Sector allocation over time
            currency_allocation:
              type: array
              description: Currency allocation over time
            company_contribution:
              type: array
              description: P&L contribution by company
            sector_contribution:
              type: array
              description: P&L contribution by sector
            market_contribution:
              type: array
              description: P&L contribution by market
            time_period_returns:
              type: object
              description: Returns for various lookback periods (MTD, YTD, 1Y, etc.)
            monthly_returns:
              type: array
              description: Monthly calendar returns
            annual_returns:
              type: array
              description: Annual calendar returns
            benchmark_prices:
              type: array
              description: Benchmark price timeseries
            daily_summary:
              type: array
              description: Daily portfolio values (equity curve)
              items:
                type: object
                properties:
                  date:
                    type: string
                  portfolio_value:
                    type: number
                  daily_return:
                    type: number
                  cumulative_return:
                    type: number
                  benchmark_value:
                    type: number
                  benchmark_daily_return:
                    type: number
                  benchmark_cumulative_return:
                    type: number
        error:
          type: string
          nullable: true
        timestamp:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key passed as Bearer token

````