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

# Download Public OpenAPI Contract

> Download the currently deployed public VQ API contract. Requires a VQ API key.

Use this endpoint to retrieve the public VQ contract used by the deployed API. The response includes only public VQ routes; internal and administrative endpoints are excluded.

> [!WARNING]
>
> The endpoint is available only after the core rollout reaches the target environment. A checked-in contract or SDK implementation does not guarantee that an endpoint is already live in production.

## Request

```bash theme={null}
curl "https://api.vectrade.io/v1/vq/openapi?version=latest" \
  -H "X-API-Key: vq_your_key_here"
```

`version` accepts `latest` or the currently deployed contract version. Historical contract versions are not retained; an unavailable version returns `404`.

## CLI

The VecTrade CLI wraps this endpoint:

```bash theme={null}
vectrade openapi download --version latest --output openapi.yaml
vectrade openapi diff
```

The CLI needs a VQ API key with access to the Developer resource. See [API key management](https://docs.vectrade.io/api-reference/developer/list-keys.md).


## OpenAPI

````yaml GET /vq/openapi
openapi: 3.1.0
info:
  title: VecTrade API
  version: 1.0.0
  description: |
    Financial data, AI-powered analysis, and trading intelligence.

    ## Authentication
    All requests require an API key in the `X-API-Key` header:
    ```
    X-API-Key: vq_your_key_here
    ```

    ## Rate Limits
    Response headers include rate limit info:
    - `X-VQ-RateLimit-Limit` — requests per window
    - `X-VQ-RateLimit-Remaining` — remaining requests
    - `X-VQ-RateLimit-Reset` — window reset timestamp (Unix)
  contact:
    name: VecTrade API Support
    email: api@vectrade.io
    url: https://docs.vectrade.io
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  x-contract-status: >-
    This source describes the intended VQ contract; verify production
    availability before relying on endpoints still rolling out.
servers:
  - url: https://api.vectrade.io/v1
    description: Production & Sandbox (mode determined by API key prefix)
security:
  - ApiKeyAuth: []
tags:
  - name: Quotes
  - name: Fundamentals
  - name: Technicals
  - name: News
  - name: Screener
  - name: AI
  - name: Webhooks
  - name: Options
  - name: Analyst
  - name: Earnings
  - name: Insider
  - name: Developer
  - name: Sentiment
  - name: ETF
paths:
  /vq/openapi:
    get:
      tags:
        - Developer
      summary: Download the deployed public API contract
      description: >-
        Returns the currently deployed public VQ OpenAPI document. Only the
        current version is retained.
      operationId: getPublicOpenApi
      parameters:
        - name: version
          in: query
          schema:
            type: string
            default: latest
      responses:
        '200':
          description: The public VQ OpenAPI document
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limit exceeded
      headers:
        Retry-After:
          schema:
            type: number
        X-VQ-RateLimit-Limit:
          schema:
            type: integer
        X-VQ-RateLimit-Remaining:
          schema:
            type: integer
        X-VQ-RateLimit-Reset:
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
            type:
              type: string
            docs_url:
              type: string
        request_id:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: VecTrade VQ API key (vq_...)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.