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

# Aggregated latency metrics

> Aggregated latency metrics



## OpenAPI

````yaml openapi.oms.vi.json GET /api/v1/util/latency/metrics
openapi: 3.0.3
info:
  title: VOS OMS Public API
  version: 1.0.0
  description: >-
    Public REST API surface for Vero OMS. Authentication requests use
    platform.verolabs.co. REST API requests use api-oms.verolabs.co.
servers:
  - url: https://platform.verolabs.co
    description: Authentication host
  - url: https://api-oms.verolabs.co
    description: REST API host
security: []
tags:
  - name: Authentication
    description: Xác thực tài khoản và khôi phục mật khẩu.
  - name: Trading
    description: Order entry, quote, IOI, and trading activity APIs.
  - name: Portfolio & Risk
    description: Accounts, holdings, mappings, and risk-rule read APIs.
  - name: Administration
    description: Permissions, groups, workflow, reference data, and audit APIs.
  - name: System & Diagnostics
    description: Health and latency endpoints.
paths:
  /api/v1/util/latency/metrics:
    get:
      tags:
        - System & Diagnostics
      summary: Aggregated latency metrics
      description: |-
        Returns count, min, max, avg, p50, p95, p99, and a time-bucketed series.

        Requires `Authorization: Bearer <jwt>` from `POST /api/auth/login`.

        Required JWT role: `admin`.
      operationId: get_api_v1_util_latency_metrics
      parameters:
        - $ref: '#/components/parameters/FromNs'
        - $ref: '#/components/parameters/ToNs'
        - $ref: '#/components/parameters/MessageType'
        - $ref: '#/components/parameters/TimeField'
        - name: bucket_ns
          in: query
          description: Bucket size in nanoseconds (default 1000000000).
          schema:
            type: integer
            minimum: 1
      responses:
        '200':
          description: Metrics result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MetricsResult'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
      servers:
        - url: https://api-oms.verolabs.co
components:
  parameters:
    FromNs:
      name: from_ns
      in: query
      description: Start of the time window as epoch nanoseconds.
      schema:
        type: integer
        format: int64
    ToNs:
      name: to_ns
      in: query
      description: End of the time window as epoch nanoseconds.
      schema:
        type: integer
        format: int64
    MessageType:
      name: message_type
      in: query
      schema:
        type: string
      description: Optional message type filter.
    TimeField:
      name: time_field
      in: query
      description: Which timestamp to filter/aggregate on.
      schema:
        type: string
        enum:
          - complete_time
          - create_time
        default: complete_time
  schemas:
    MetricsResult:
      type: object
      properties:
        from_time:
          type: integer
          format: int64
          description: Start of the response time window in epoch nanoseconds.
        to_time:
          type: integer
          format: int64
          description: End of the response time window in epoch nanoseconds.
        bucket_size_ns:
          type: integer
          format: int64
          description: Bucket size for time-series aggregation in nanoseconds.
        message_type:
          type: string
          description: Message type filter or message type reported by the record.
        time_field:
          type: string
          description: Timestamp field used for filtering or aggregation.
        summary:
          $ref: '#/components/schemas/LatencyStats'
        buckets:
          type: array
          items:
            $ref: '#/components/schemas/MetricsBucket'
          description: Time-bucketed metric rows.
      description: Aggregated latency metrics response.
    LatencyStats:
      type: object
      properties:
        count:
          type: integer
          format: int64
          description: Number of records in the response page or aggregation.
        min_latency_ns:
          type: integer
          format: int64
          description: Minimum latency in nanoseconds.
        max_latency_ns:
          type: integer
          format: int64
          description: Maximum latency in nanoseconds.
        avg_latency_ns:
          type: number
          format: double
          description: Average latency in nanoseconds.
        p50_latency_ns:
          type: number
          format: double
          description: 50th percentile latency in nanoseconds.
        p95_latency_ns:
          type: number
          format: double
          description: 95th percentile latency in nanoseconds.
        p99_latency_ns:
          type: number
          format: double
          description: 99th percentile latency in nanoseconds.
      description: Aggregate latency statistics.
    MetricsBucket:
      type: object
      properties:
        bucket_start_time:
          type: integer
          format: int64
          description: Bucket start timestamp in epoch nanoseconds.
        bucket_end_time:
          type: integer
          format: int64
          description: Bucket end timestamp in epoch nanoseconds.
        count:
          type: integer
          format: int64
          description: Number of records in the response page or aggregation.
        min_latency_ns:
          type: integer
          format: int64
          description: Minimum latency in nanoseconds.
        max_latency_ns:
          type: integer
          format: int64
          description: Maximum latency in nanoseconds.
        avg_latency_ns:
          type: number
          format: double
          description: Average latency in nanoseconds.
        p50_latency_ns:
          type: number
          format: double
          description: 50th percentile latency in nanoseconds.
        p95_latency_ns:
          type: number
          format: double
          description: 95th percentile latency in nanoseconds.
        p99_latency_ns:
          type: number
          format: double
          description: 99th percentile latency in nanoseconds.
      description: Latency metrics for one time bucket.
    Error:
      type: object
      properties:
        error:
          type: string
          description: Machine-readable error code or error category.
        status:
          type: integer
          description: Status value returned by the API.
      description: Standard error response envelope.
  responses:
    BadRequest:
      description: Invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    ServerError:
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````