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

# Macro Report

> Fetch macro economic report for a specific market. Returns report metadata and optionally the full report content. This is a synchronous endpoint - results are returned immediately.

<Note>
  This is a synchronous endpoint - results are returned immediately without job polling.
</Note>

## Response Formats

### JSON Format (default)

When `format=json`, the response includes the report file URL:

```json theme={null}
{
  "success": true,
  "market": "United States",
  "report_date": "2024-01-15",
  "format": "json",
  "file_url": "https://storage.example.com/reports/us-2024-01-15.json",
  "content": null
}
```

When `include_content=true`, the `content` field contains the full report data instead of `null`.

### PDF Format

When `format=pdf`, the response includes the PDF URL:

```json theme={null}
{
  "success": true,
  "market": "United States",
  "report_date": "2024-01-15",
  "format": "pdf",
  "pdf_url": "https://storage.example.com/reports/us-2024-01-15.pdf"
}
```

## List Available Markets

To get a list of all markets with available reports:

```bash theme={null}
GET /v1/macro-report/markets
```

```json theme={null}
{
  "success": true,
  "markets": ["China", "Germany", "Japan", "United States"]
}
```

## Example: Fetch Report with Content

```javascript theme={null}
const response = await fetch(
  'https://api.chicago.global/v1/macro-report?market=United%20States&include_content=true',
  {
    headers: { 'Authorization': `Bearer ${API_KEY}` }
  }
);

const report = await response.json();

if (report.success) {
  console.log(`Market: ${report.market}`);
  console.log(`Report Date: ${report.report_date}`);
  console.log(`Content:`, report.content);
}
```


## OpenAPI

````yaml GET /v1/macro-report
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/macro-report:
    get:
      tags:
        - Macro Reports
      summary: Get Macro Report
      description: >-
        Fetch macro economic report for a specific market. Returns report
        metadata and optionally the full report content. This is a synchronous
        endpoint - results are returned immediately.
      operationId: getMacroReport
      parameters:
        - name: market
          in: query
          required: true
          description: Market name (e.g., 'United States', 'Japan', 'Germany')
          schema:
            type: string
          example: United States
        - name: format
          in: query
          required: false
          description: 'Response format: ''json'' or ''pdf'''
          schema:
            type: string
            enum:
              - json
              - pdf
            default: json
        - name: include_content
          in: query
          required: false
          description: 'For JSON format: embed the full report content in the response'
          schema:
            type: boolean
            default: false
        - name: date
          in: query
          required: false
          description: Report date in YYYY-MM-DD format. Omit to get the latest report.
          schema:
            type: string
            format: date
          example: '2024-01-15'
      responses:
        '200':
          description: Macro report retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroReportResponse'
              examples:
                json_format:
                  summary: JSON format response
                  value:
                    success: true
                    market: United States
                    report_date: '2024-01-15'
                    format: json
                    file_url: https://storage.example.com/reports/us-2024-01-15.json
                    content: null
                pdf_format:
                  summary: PDF format response
                  value:
                    success: true
                    market: United States
                    report_date: '2024-01-15'
                    format: pdf
                    pdf_url: https://storage.example.com/reports/us-2024-01-15.pdf
        '400':
          description: Invalid format or date parameter
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                detail: format must be 'json' or 'pdf'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Market not found or no report available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                detail: No macro report found for market 'Atlantis'
components:
  schemas:
    MacroReportResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Whether the request was successful
        market:
          type: string
          description: Market name
        report_date:
          type: string
          format: date
          description: Report date
        format:
          type: string
          enum:
            - json
            - pdf
          description: Response format
        file_url:
          type: string
          nullable: true
          description: URL to JSON report file (when format=json)
        content:
          type: object
          nullable: true
          description: Full report content (when format=json and include_content=true)
        pdf_url:
          type: string
          nullable: true
          description: URL to PDF report file (when format=pdf)
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: API key passed as Bearer token

````