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

# CQ Aggregated Spot OHLCV

> Open / high / low / close prices with base- and quote-denominated volume, aggregated into `day`, `hour`, `10min`, or `min` candles.

## What it measures

Open / high / low / close prices with base- and quote-denominated volume, aggregated into `day`, `hour`, `10min`, or `min` candles.

This endpoint serves **CryptoQuant aggregated spot** data — all-exchange aggregated symbols (e.g. `btc_all`).


## OpenAPI

````yaml openapi/v2-market.json GET /market/cq/spot/ohlcv
openapi: 3.0.0
info:
  version: 2.0.0-beta
  title: CryptoQuant Data API v2 — Market
  description: >-
    Market data endpoints of the CryptoQuant Data API v2 — exchange-level and
    CryptoQuant-aggregated spot & derivatives data (OHLCV, trade, funding rate,
    open interest, liquidation). Built on the v1 conventions: the
    `status`/`result` envelope, Bearer token authentication, and the
    `window`/`from`/`to` time parameters.
  termsOfService: https://cryptoquant.com/terms-of-service
  contact:
    name: API Support
    email: contact@cryptoquant.com
servers:
  - url: https://api.cryptoquant.com/v2
    description: Default server
security: []
tags:
  - name: Market Data
  - name: Market Discovery
paths:
  /market/cq/spot/ohlcv:
    get:
      tags:
        - Market Data
      summary: CQ Aggregated Spot OHLCV
      description: >-
        Open / high / low / close prices with base- and quote-denominated
        volume, aggregated into `day`, `hour`, `10min`, or `min` candles.
      operationId: V2marketCqSpotOhlcv
      parameters:
        - name: symbol
          in: query
          required: true
          description: Aggregated symbol, e.g. `btc_all` (all quotes, all exchanges).
          schema:
            type: string
          example: btc_all
        - name: window
          in: query
          required: false
          description: 'Aggregation window: `day` (default), `hour`, `10min`, or `min`.'
          schema:
            type: string
            enum:
              - day
              - hour
              - 10min
              - min
            default: day
          example: day
        - name: from
          in: query
          required: false
          description: >-
            Inclusive start time, `YYYYMMDDTHHMMSS` (UTC). If `window=day`,
            `YYYYMMDD` is also accepted.
          schema:
            type: string
        - name: to
          in: query
          required: false
          description: >-
            Inclusive end time, `YYYYMMDDTHHMMSS` (UTC). If `window=day`,
            `YYYYMMDD` is also accepted.
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: Maximum rows returned (default 100, max 10000).
          schema:
            type: integer
            default: 100
            maximum: 10000
        - name: format
          in: query
          required: false
          description: 'Response format: `json` (default) or `csv`.'
          schema:
            type: string
            enum:
              - json
              - csv
            default: json
      responses:
        '200':
          description: CQ Aggregated Spot OHLCV time-series.
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - result
                properties:
                  status:
                    $ref: '#/components/schemas/Status'
                  result:
                    type: object
                    properties:
                      window:
                        type: string
                      data:
                        type: array
                        items:
                          type: object
                          properties:
                            datetime:
                              type: string
                              description: >-
                                Interval start timestamp, `YYYY-MM-DD HH:MM:SS`
                                (UTC).
                            symbol:
                              type: string
                              description: >-
                                Trading pair. Exchange origin uses per-quote
                                pairs (e.g. `btc_usdt`); cq origin uses
                                aggregated symbols (e.g. `btc_all`).
                            base:
                              type: string
                              description: Base asset, e.g. `btc`.
                            quote:
                              type: string
                              description: >-
                                Quote asset, e.g. `usdt`. `all` for aggregated
                                (all-quote) symbols.
                            open:
                              type: number
                              description: Opening price of the interval.
                            high:
                              type: number
                              description: Highest price during the interval.
                            low:
                              type: number
                              description: Lowest price during the interval.
                            close:
                              type: number
                              description: Closing price of the interval.
                            volume:
                              type: number
                              description: Traded volume in the base asset.
                            quote_volume:
                              type: number
                              description: Traded volume in the quote asset (notional).
      security:
        - AccessToken: []
      x-codeSamples:
        - lang: Shell
          source: >-
            curl -X GET
            "https://api.cryptoquant.com/v2/market/cq/spot/ohlcv?symbol=btc_all&window=day"
            \

            -H "Authorization: Bearer <YOUR_API_KEY>"
        - lang: JavaScript
          source: >-
            fetch("https://api.cryptoquant.com/v2/market/cq/spot/ohlcv?symbol=btc_all&window=day",
            { headers: { "Authorization": "Bearer <YOUR_API_KEY>"} })
              .then(response => response.json())
              .then(data => console.log(data))
        - lang: NodeJS
          source: |-
            require('axios')
              .get("https://api.cryptoquant.com/v2/market/cq/spot/ohlcv?symbol=btc_all&window=day", { headers: { Authorization: 'Bearer <YOUR_API_KEY>' } })
              .then(response => console.log(response))
        - lang: Ruby
          source: >-
            require 'net/http'

            uri =
            URI("https://api.cryptoquant.com/v2/market/cq/spot/ohlcv?symbol=btc_all&window=day")

            req = Net::HTTP::Get.new(uri)

            req["Authorization"] = "Bearer <YOUR_API_KEY>"

            res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) {
            |http| http.request(req) }

            puts res.body
        - lang: Python
          source: >-
            import requests

            headers = {'Authorization': 'Bearer <YOUR_API_KEY>'}

            url =
            "https://api.cryptoquant.com/v2/market/cq/spot/ohlcv?symbol=btc_all&window=day"

            print(requests.get(url, headers=headers).json())
components:
  schemas:
    Status:
      type: object
      description: >-
        Returned with every response; indicates whether the request was
        successful.
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code.
        message:
          type: string
          description: Text description of the error or success.
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        For each API request, include the `Authorization` HTTP header with
        `Bearer {access_token}`.

````