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

# Download split-adjusted stock history with automatic provider routing

> Q Download previews JSON and exports that exact snapshot as CSV/JSON. Provider coverage varies; missing bars are not fabricated. format=csv returns a CSV attachment. No uploaded workspace files are exposed here.



## OpenAPI

````yaml https://quantura.studio/api/openapi.json post /market-data/stocks/history
openapi: 3.1.0
info:
  title: Quantura Forecast Intelligence API
  version: 1.0.0
  description: >-
    Versioned access to Quantura forecasts, collaborator-aware workspaces,
    screeners, datasets, and provenance metadata.
  contact:
    name: Quantura
    url: https://quantura.studio/contact
  license:
    name: Quantura API Terms
    url: https://quantura.studio/terms
servers:
  - url: https://quantura.studio/api/v1
security:
  - bearerAuth: []
tags:
  - name: Access
    description: Identity, token scopes, plans, and effective workspace access.
  - name: Workspaces
    description: Resources are authorized against current membership on every request.
  - name: Uploaded CSVs
    description: Workspace-isolated CSV metadata, organization, and authorized exports.
  - name: Datasets
    description: Licensing-aware catalog and schema metadata.
  - name: Forecasts
    description: Prospective forecasts and immutable probability trajectories.
  - name: Ensemble Forecasts
    description: >-
      Asynchronous probabilistic time-series ensemble jobs and reproducible
      presets.
  - name: Backtests
    description: >-
      Asynchronous point-in-time ensemble-quantile simulations and versioned
      strategy exports; never live order execution.
paths:
  /market-data/stocks/history:
    servers:
      - url: https://quantura.studio/api
    post:
      tags:
        - Q Download
      summary: Download split-adjusted stock history with automatic provider routing
      description: >-
        Q Download previews JSON and exports that exact snapshot as CSV/JSON.
        Provider coverage varies; missing bars are not fabricated. format=csv
        returns a CSV attachment. No uploaded workspace files are exposed here.
      operationId: downloadQuanturaStockHistory
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - symbol
              properties:
                symbol:
                  type: string
                contractSymbol:
                  type: string
                source:
                  type: string
                  enum:
                    - auto
                    - alpaca
                    - yahoo
                    - dukascopy
                  default: auto
                price_side:
                  type: string
                  enum:
                    - bid
                    - ask
                  default: bid
                page_mode:
                  type: boolean
                  description: >-
                    Dukascopy: retrieve bounded candle file pages; follow
                    next_cursor using the same settings.
                cursor:
                  type: string
                start:
                  type: string
                  format: date-time
                end:
                  type: string
                  format: date-time
                timeframe:
                  type: string
                  enum:
                    - 1min
                    - 5min
                    - 15min
                    - 30min
                    - 1h
                    - 4h
                    - 1D
                    - 1W-MON
                    - 1MS
                    - 1Min
                    - 5Min
                    - 15Min
                    - 30Min
                    - 1Hour
                    - 4Hour
                    - 1Day
                    - 1Week
                    - 1Month
                    - 1m
                    - 5m
                    - 15m
                    - 30m
                    - 1w
                limit:
                  type: integer
                  enum:
                    - 500
                    - 1000
                    - 1500
                    - 2000
                    - 50000
                adjustment:
                  type: string
                  enum:
                    - raw
                    - split
                    - all
                session:
                  type: string
                  enum:
                    - regular
                    - extended
                format:
                  type: string
                  enum:
                    - json
                    - csv
            example:
              symbol: AAPL
              source: auto
              timeframe: 1Day
              limit: 500
              adjustment: split
              format: json
      responses:
        '200':
          description: JSON rows or CSV attachment
          content:
            application/json:
              schema:
                type: object
              example:
                ok: true
                provider: alpaca
                sourceRequested: auto
                fallbackUsed: false
                symbol: AAPL
                timeframe: 1Day
                count: 1
                rows:
                  - timestamp: '2026-09-18T04:00:00Z'
                    open: 100
                    high: 102
                    low: 99
                    close: 101
                    volume: 1000
        '400':
          description: Invalid request or provider unavailable
          content:
            application/json:
              schema:
                type: object
              example:
                ok: false
                error: event_query_invalid
                message: Choose a provider event and a valid continuation cursor.
        '422':
          description: Invalid request or provider unavailable
          content:
            application/json:
              schema:
                type: object
              example:
                ok: false
                error: event_query_invalid
                message: Choose a provider event and a valid continuation cursor.
        '429':
          description: Invalid request or provider unavailable
          content:
            application/json:
              schema:
                type: object
              example:
                ok: false
                error: event_query_invalid
                message: Choose a provider event and a valid continuation cursor.
        '503':
          description: Invalid request or provider unavailable
          content:
            application/json:
              schema:
                type: object
              example:
                ok: false
                error: event_query_invalid
                message: Choose a provider event and a valid continuation cursor.
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Quantura API key

````

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