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

# Danh sách nến OHLCV

> GET /v1/candles — lấy nến OHLCV

Lấy nến OHLCV theo mã giao dịch, độ phân giải và khoảng thời gian UTC.

<CardGroup cols={2}>
  <Card title="Dữ liệu sẵn sàng cho biểu đồ" icon="circle-check">
    Dùng trực tiếp cho biểu đồ OHLCV.
  </Card>

  <Card title="Nhiều độ phân giải" icon="circle-check">
    Hỗ trợ khung thời gian theo phút, giờ, ngày và tuần.
  </Card>
</CardGroup>

## Trường hợp sử dụng

* Hiển thị biểu đồ thị trường.
* Chạy phân tích kỹ thuật.
* Tải dữ liệu giá lịch sử theo khoảng thời gian.

## Độ phân giải được hỗ trợ

* `1m`, `5m`, `15m`, `30m`.
* `1h`, `2h`, `4h`, `6h`, `12h`.
* `1d`, `1w`.


## OpenAPI

````yaml openapi/openapi.vi.yaml GET /v1/candles
openapi: 3.0.3
info:
  title: Vero Data Hub API
  version: 1.0.0
  description: >-
    REST API cho dữ liệu thị trường, dữ liệu tham chiếu, dữ liệu cơ bản, quỹ, dữ
    liệu vĩ mô, tin tức và độ mới dữ liệu.
servers:
  - url: https://api-gw.verolabs.co
    description: Base URL của API
security:
  - ApiKeyAuth: []
tags:
  - name: reference
  - name: tick
  - name: candles
  - name: fx
  - name: bonds
  - name: macro
  - name: sentiment
  - name: calendar
  - name: funds
  - name: fa
  - name: news
  - name: ops
paths:
  /v1/candles:
    get:
      tags:
        - candles
      summary: Danh sách nến OHLCV
      parameters:
        - name: symbol
          in: query
          required: true
          schema:
            type: string
            example: BTCUSDT
        - name: resolution
          in: query
          required: true
          schema:
            type: string
            example: 5m
          description: >-
            Độ phân giải OHLCV. Các nhãn được hỗ trợ gồm 1m, 5m, 15m, 30m, 1h,
            2h, 4h, 6h, 12h, 1d và 1w.
        - $ref: '#/components/parameters/From'
        - $ref: '#/components/parameters/To'
        - $ref: '#/components/parameters/Limit'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Candle'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  parameters:
    From:
      name: from
      in: query
      required: true
      schema:
        type: string
        format: date-time
        example: '2026-05-15T00:00:00Z'
      description: ISO 8601 UTC; phải kết thúc bằng "Z".
    To:
      name: to
      in: query
      required: true
      schema:
        type: string
        format: date-time
        example: '2026-05-15T01:00:00Z'
      description: ISO 8601 UTC; phải kết thúc bằng "Z" và nằm sau `from`.
    Limit:
      name: limit
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 10000
        default: 1000
        example: 100
  schemas:
    Candle:
      type: object
      properties:
        ts:
          type: string
          format: date-time
        open:
          type: number
          format: double
          nullable: true
        high:
          type: number
          format: double
          nullable: true
        low:
          type: number
          format: double
          nullable: true
        close:
          type: number
          format: double
          nullable: true
        volume:
          type: number
          format: double
          nullable: true
    Problem:
      type: object
      required:
        - type
        - title
        - status
      properties:
        type:
          type: string
          format: uri
          example: invalid-param
        title:
          type: string
          example: Tham số truy vấn không hợp lệ
        status:
          type: integer
          example: 400
        detail:
          type: string
          example: cần có tham số "from"
        instance:
          type: string
        request_id:
          type: string
  responses:
    BadRequest:
      description: Tham số yêu cầu không hợp lệ.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unauthorized:
      description: Thiếu hoặc sai API key.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unavailable:
      description: API tạm thời không sẵn sàng.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key được cấp cho tài khoản của bạn.

````