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

# Introduction

> Parallax API - Financial data and portfolio analytics

## Base URL

All API requests should be made to:

```
https://api.chicago.global
```

## Authentication

All API endpoints require a Bearer token in the Authorization header:

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

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

## Async Job Processing

Several endpoints (like Portfolio Analysis) use async job processing for long-running operations:

1. **Submit Request** - POST your data to the endpoint
2. **Receive Job ID** - Get a `job_id` and `check_url` immediately
3. **Poll for Status** - GET the `check_url` until status is `completed`
4. **Get Results** - The completed response contains your data

```javascript theme={null}
// 1. Submit
const { job_id, check_url } = await fetch('/v1/portfolio/analyze', {
  method: 'POST',
  headers: { 'Authorization': `Bearer ${API_KEY}` },
  body: JSON.stringify(payload)
}).then(r => r.json());

// 2. Poll
let result;
while (!result) {
  const status = await fetch(check_url).then(r => r.json());
  if (status.status === 'completed') result = status.result;
  else await new Promise(r => setTimeout(r, 3000));
}
```

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

## Rate Limits

Contact support for rate limit information based on your plan.
