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

# Development

> Integrate Parallax analytics into your applications

Build Parallax's institutional-grade analytics directly into your applications using our REST API.

## Getting Started

<Steps>
  <Step title="Get Your API Key">
    Contact [parallax@chicago.global](mailto:parallax@chicago.global) to request API access and receive your credentials.
  </Step>

  <Step title="Make Your First Request">
    Test your connection with a simple authenticated request:

    ```bash theme={null}
    curl -X GET "https://api.chicago.global/v1/health" \
      -H "Authorization: Bearer YOUR_API_KEY"
    ```
  </Step>

  <Step title="Explore the API">
    Review our [API Reference](/api-reference/introduction) for complete endpoint documentation.
  </Step>
</Steps>

## Core Capabilities

<CardGroup cols={2}>
  <Card title="Portfolio Analysis" icon="chart-pie" href="/api-reference/portfolio/analyze">
    Submit portfolios for comprehensive factor analysis, risk metrics, and AI-powered recommendations.
  </Card>

  <Card title="Stock Reports" icon="file-lines" href="/api-reference/stock/report">
    Generate detailed reports on individual securities with factor scores and analysis.
  </Card>

  <Card title="Financial Analysis" icon="magnifying-glass-dollar" href="/api-reference/analysis/financial">
    Access fundamental data and financial metrics for securities.
  </Card>

  <Card title="Technical Analysis" icon="chart-line" href="/api-reference/analysis/technical">
    Retrieve technical indicators and price-based signals.
  </Card>
</CardGroup>

## Authentication

All API requests require a Bearer token:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

<Warning>
  Keep your API key secure. Never expose it in client-side code or public repositories.
</Warning>

## Async Job Processing

Long-running operations like portfolio analysis use async processing:

```javascript theme={null}
// 1. Submit the request
const response = await fetch('https://api.chicago.global/v1/portfolio/analyze', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    holdings: [
      { ticker: 'AAPL', weight: 0.25 },
      { ticker: 'MSFT', weight: 0.25 },
      { ticker: 'GOOGL', weight: 0.25 },
      { ticker: 'AMZN', weight: 0.25 }
    ]
  })
});

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

// 2. Poll for completion
let result;
while (!result) {
  const status = await fetch(check_url, {
    headers: { 'Authorization': `Bearer ${API_KEY}` }
  }).then(r => r.json());

  if (status.status === 'completed') {
    result = status.result;
  } else if (status.status === 'failed') {
    throw new Error(status.error);
  } else {
    await new Promise(r => setTimeout(r, 3000)); // Wait 3 seconds
  }
}

// 3. Use the results
console.log(result.factor_scores);
console.log(result.risk_metrics);
```

## Response Codes

| Code | Description                               |
| ---- | ----------------------------------------- |
| 200  | Success                                   |
| 401  | Unauthorized - Invalid or missing API key |
| 404  | Not found                                 |
| 422  | Validation error - Check request body     |
| 500  | Server error                              |

## Example Use Cases

<AccordionGroup>
  <Accordion title="Portfolio Monitoring Dashboard">
    Build a dashboard that tracks portfolio factor exposures over time:

    1. Store portfolio holdings in your database
    2. Call `/v1/portfolio/analyze` daily or on-demand
    3. Track changes in factor scores and risk metrics
    4. Alert when exposures drift beyond thresholds
  </Accordion>

  <Accordion title="Client Reporting">
    Generate white-labeled reports for clients:

    1. Fetch portfolio analysis via API
    2. Combine with your branding and commentary
    3. Export as PDF or embed in client portal
  </Accordion>

  <Accordion title="Investment Screening">
    Integrate factor scores into your stock selection process:

    1. Screen universe with your criteria
    2. Fetch Parallax scores for candidates
    3. Rank by multi-factor composite score
    4. Apply to portfolio construction
  </Accordion>
</AccordionGroup>

## Rate Limits

Contact [parallax@chicago.global](mailto:parallax@chicago.global) for rate limit information based on your plan.

## Next Steps

<CardGroup cols={2}>
  <Card title="API Reference" icon="book" href="/api-reference/introduction">
    Complete endpoint documentation with examples.
  </Card>

  <Card title="Methodology" icon="microscope" href="/methodology/overview">
    Understand the analytics behind the API.
  </Card>
</CardGroup>
