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

# Latency detail records và timing segments

> Latency detail records và timing segments



## OpenAPI

````yaml openapi.oms.vi.json GET /api/v1/util/latency/stages
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/stages:
    get:
      tags:
        - System & Diagnostics
      summary: Latency detail records and segments
      description: >-
        Returns matching latency detail records and derived per-segment
        latencies. When `request_id` is supplied without time parameters, the
        query uses the request identifier. Otherwise, the query uses the time
        window.


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


        Required JWT role: `admin`.
      operationId: get_api_v1_util_latency_stages
      parameters:
        - name: request_id
          in: query
          schema:
            type: string
          description: Request identifier.
        - $ref: '#/components/parameters/FromNs'
        - $ref: '#/components/parameters/ToNs'
        - $ref: '#/components/parameters/MessageType'
        - $ref: '#/components/parameters/Limit'
        - $ref: '#/components/parameters/Offset'
      responses:
        '200':
          description: Latency detail result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LatencyDetailResult'
        '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.
    Limit:
      name: limit
      in: query
      description: Page size. Defaults to 200; capped by the per-API max limit.
      schema:
        type: integer
        minimum: 1
    Offset:
      name: offset
      in: query
      schema:
        type: integer
        minimum: 0
      description: Zero-based number of records to skip.
  schemas:
    LatencyDetailResult:
      type: object
      properties:
        request_id:
          type: string
          description: Request identifier.
        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.
        message_type:
          type: string
          description: Message type filter or message type reported by the record.
        limit:
          type: integer
          description: Maximum number of records returned.
        offset:
          type: integer
          description: Zero-based number of records skipped before returning results.
        count:
          type: integer
          description: Number of records in the response page or aggregation.
        events:
          type: array
          items:
            $ref: '#/components/schemas/LatencyDetailRecord'
          description: Latency detail records returned for the current page.
        segments:
          type: array
          items:
            $ref: '#/components/schemas/LatencySegment'
          description: Latency segments returned for the current page.
      description: Latency detail response.
    LatencyDetailRecord:
      type: object
      properties:
        request_id:
          type: string
          description: Request identifier.
        message_type:
          type: string
          description: Message type filter or message type reported by the record.
        stage:
          type: string
          description: Timing step value.
        stage_time:
          type: integer
          format: int64
          description: Timestamp for the timing step.
        service:
          type: string
          description: Status label reported by the payload.
        source_service:
          type: string
          description: Source identifier reported by the payload.
        source_sequence:
          type: integer
          format: int64
          description: Source sequence number for ordering updates.
        client_id:
          type: string
          description: Client identifier reported by the record.
        hft_gateway:
          type: string
          description: Routing identifier reported in the payload.
        stream_id:
          type: integer
          description: Stream identifier reported by the record.
        status:
          type: string
          description: Status value returned by the API.
      description: Latency detail record.
    LatencySegment:
      type: object
      properties:
        from_stage:
          type: string
          description: Timing step where the latency segment starts.
        to_stage:
          type: string
          description: Timing step where the latency segment ends.
        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.
        latency_ns:
          type: integer
          format: int64
          description: Latency duration in nanoseconds.
      description: Derived latency segment.
    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

````