> ## 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.

# Độ mới dữ liệu

> GET /v1/sources — kiểm tra độ mới dữ liệu

Kiểm tra thời điểm từng nhóm dữ liệu được cập nhật lần cuối.

<CardGroup cols={2}>
  <Card title="Quan sát độ mới" icon="circle-check">
    Dùng timestamp để biết dữ liệu có mới không.
  </Card>

  <Card title="Tín hiệu độ phủ" icon="circle-check">
    Dùng số lượng để hiểu độ phủ theo nhóm dữ liệu.
  </Card>
</CardGroup>

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

* Hiển thị trạng thái dữ liệu trong admin hoặc màn hình giám sát.
* Kiểm tra nhóm dữ liệu có cập nhật gần đây không.
* Giúp người dùng hiểu dữ liệu bị thiếu hoặc trễ.

## Trường quan trọng

* `name`: tên nhóm dữ liệu.
* `last_message_at`: timestamp cập nhật mới nhất khi có.
* `instruments_count`: số lượng thể hiện độ phủ khi có.


## OpenAPI

````yaml openapi/openapi.vi.yaml GET /v1/sources
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/sources:
    get:
      tags:
        - ops
      summary: Độ mới dữ liệu
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SourceInfo'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '503':
          $ref: '#/components/responses/Unavailable'
components:
  schemas:
    SourceInfo:
      type: object
      properties:
        name:
          type: string
        kind:
          type: string
          nullable: true
        last_message_at:
          type: string
          format: date-time
          nullable: true
        instruments_count:
          type: integer
    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:
    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.

````