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

# Lịch sử OHLC

> Truy vấn thông tin lịch sử nến (open, high, low, close, volume) cho Cổ phiếu, Phái sinh và Chỉ số thị trường theo khung thời gian và khoảng thời gian cụ thể.



## OpenAPI

````yaml https://cdn.entrade.com.vn/dnse-openapi/doc/dnse-openapi-2026-05-07.yaml get /price/ohlc
openapi: 3.0.0
info:
  title: DNSE-OpenAPI-V2
  version: 1.0.0
  description: DNSE OpenAPI spec and tests
servers:
  - url: https://openapi-uat.dnse.com.vn
security: []
paths:
  /price/ohlc:
    get:
      tags:
        - market-data
      summary: Lịch sử OHLC
      description: >-
        Truy vấn thông tin lịch sử nến (open, high, low, close, volume) cho Cổ
        phiếu, Phái sinh và Chỉ số thị trường theo khung thời gian và khoảng
        thời gian cụ thể.
      parameters:
        - name: symbol
          in: query
          required: true
          description: 'Mã chứng khoán '
          deprecated: false
          schema:
            type: string
          example: ACB
        - name: type
          in: query
          required: true
          description: |-
            Loại thị trường
            - STOCK: Cổ phiếu
            - DERIVATIVE: Phái sinh
            - INDEX: Chỉ số thị trường
          deprecated: false
          schema:
            type: string
          example: STOCK
        - name: resolution
          in: query
          required: true
          description: |-
            Khung thời gian nến
            - 1,3,5,15,30,1h,1D,1W
          deprecated: false
          schema:
            type: string
          example: '15'
        - name: from
          in: query
          required: true
          description: Thời gian bắt đầu
          deprecated: false
          schema:
            type: string
          example: '1773657310'
        - name: to
          in: query
          required: true
          description: Thời gian kết thúc
          deprecated: false
          schema:
            type: string
          example: '1773830110'
        - name: X-API-Key
          in: header
          required: true
          description: API Key được cấp khi đăng ký dịch vụ
          deprecated: false
          schema:
            type: string
          example: '{{apiKey}}'
        - name: X-Aux-Date
          in: header
          required: true
          description: Thời gian thực hiện yêu cầu
          deprecated: false
          schema:
            type: string
          example: '{{date}}'
        - name: X-Signature
          in: header
          required: true
          description: Chữ ký xác thực yêu cầu
          deprecated: false
          schema:
            type: string
          example: '{{signature}}'
        - name: version
          in: header
          description: 'Phiên bản API '
          schema:
            type: string
            format: date
          example: '2026-05-07'
      responses:
        '200':
          description: OK
          headers:
            Content-Length:
              schema:
                type: integer
              example: 450
            Date:
              schema:
                type: string
              example: Tue, 24 Mar 2026 03:01:24 GMT
            Vary:
              schema:
                type: string
              example: Origin
            X-Content-Type-Options:
              schema:
                type: string
              example: nosniff
            X-Frame-Options:
              schema:
                type: string
              example: SAMEORIGIN
            X-Ratelimit-Limit:
              schema:
                type: integer
              example: -1
            X-Ratelimit-Remaining:
              schema:
                type: integer
              example: 0
            X-Ratelimit-Reset:
              schema:
                type: integer
              example: 0
            X-Request-Id:
              schema:
                type: string
              example: 1DSZCcoZ9h5P6OTR0NgZwGUPw1C9lsEd
            X-Tyk-Api-Expires:
              schema:
                type: string
              example: Thu, 02 Jan 3000 15:04:00 UTC
            X-Xss-Protection:
              schema:
                type: string
              example: 1; mode=block
          content:
            application/json:
              schema:
                type: object
                properties:
                  t:
                    type: array
                    example:
                      - 1773715500
                    description: Danh sách thời gian nến
                    items:
                      type: integer
                      description: Thời gian nến (timestamp)
                  o:
                    type: array
                    example:
                      - 23.8
                    description: Danh sách giá mở cửa của nến theo thời gian tương ứng
                    items:
                      type: number
                      description: Giá mở cửa của nến
                  h:
                    type: array
                    example:
                      - 23.8
                    description: Danh sách giá cao nhất trong nến theo thời gian tương ứng
                    items:
                      type: number
                      description: Giá cao nhất trong nến
                  l:
                    type: array
                    example:
                      - 23.7
                    description: Danh sách giá thấp nhất trong nến theo thời gian tương ứng
                    items:
                      type: number
                      description: Giá thấp nhất trong nến
                  c:
                    type: array
                    example:
                      - 23.75
                    description: Danh sách giá đóng cửa của nến theo thời gian tương ứng
                    items:
                      type: number
                      description: Giá đóng cửa của nến
                  v:
                    type: array
                    example:
                      - 2530900
                    description: Danh sách khối lượng giao dịch theo thời gian tương ứng
                    items:
                      type: integer
                      description: Khối lượng giao dịch
                  nextTime:
                    type: integer
                    example: 0
                    description: Timestamp của cây nến tiếp theo (nếu có), 0 nếu không còn
                    format: int32
              example:
                t:
                  - 1773715500
                  - 1773716400
                  - 1773800100
                  - 1773801000
                  - 1773801900
                  - 1773802800
                  - 1773803700
                  - 1773804600
                  - 1773805500
                  - 1773806400
                o:
                  - 23.8
                  - 23.75
                  - 23.75
                  - 23.85
                  - 23.8
                  - 23.85
                  - 23.9
                  - 23.75
                  - 23.8
                  - 23.8
                h:
                  - 23.8
                  - 23.8
                  - 23.9
                  - 23.9
                  - 23.85
                  - 23.9
                  - 23.9
                  - 23.85
                  - 23.8
                  - 23.8
                l:
                  - 23.7
                  - 23.7
                  - 23.7
                  - 23.8
                  - 23.75
                  - 23.8
                  - 23.7
                  - 23.75
                  - 23.7
                  - 23.75
                c:
                  - 23.75
                  - 23.75
                  - 23.8
                  - 23.85
                  - 23.8
                  - 23.9
                  - 23.85
                  - 23.75
                  - 23.75
                  - 23.75
                v:
                  - 2530900
                  - 514100
                  - 494000
                  - 344400
                  - 429000
                  - 315300
                  - 582100
                  - 205300
                  - 361300
                  - 3040800
                nextTime: 0
        '400':
          description: Yêu cầu không hợp lệ
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 400
                    description: Mã HTTP
                    format: int32
                  code:
                    type: string
                    example: OA-003
                    description: Mã lỗi
                  message:
                    type: string
                    example: Thông tin nhập không hợp lệ
                    description: Thông điệp lỗi
              example:
                code: OA-003
                message: Thông tin nhập không hợp lệ
                status: 400
        '500':
          description: Lỗi hệ thống
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 500
                    description: Mã HTTP
                    format: int32
                  code:
                    type: string
                    example: OA-009
                    description: Mã lỗi
                  message:
                    type: string
                    example: Lỗi hệ thống
                    description: Thông điệp lỗi
              example:
                code: OA-009
                message: Lỗi hệ thống
                status: 500

````

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