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

# Trader Metrics

> Current public trader positioning and participation aggregates for a perp.



## OpenAPI

````yaml /proto-openapi/api/openapi.yaml get /api/v1/market/pairs/{tradingPairId}/trader-metrics
openapi: 3.0.3
info:
  title: Monaco Protocol API
  description: REST API for the Monaco Protocol hybrid CLOB exchange.
  version: 1.0.0
servers:
  - url: https://staging.apimonaco.xyz
    description: Staging server (Testnet)
security: []
tags:
  - name: AccountsService
  - name: ApplicationsService
  - name: AuthService
  - name: BuildercodeRewardsService
  - name: CopyTradingService
  - name: DelegatedAgentsService
  - name: FaucetService
  - name: FeesService
  - name: HealthService
  - name: ManagedMarketsService
    description: |-
      Wallet-authenticated maker assignments. The signed session must match both
       configured maker user and application. Owner IDs are process fences, never auth.
       Only wallet sessions are supported; delegated-agent sessions receive 403.
  - name: MarginAccountsService
    description: |-
      Current public isolated-margin semantics:
       - a user has one parent margin account per application scope
       - opening orders create or reuse isolated position buckets under that parent
       - parent account creation is handled internally by margin workflows
  - name: MarketService
  - name: OrderbookService
  - name: OrdersService
  - name: PositionsService
    description: |-
      Current public isolated-margin semantics:
       - positions link to a parent margin account and, when applicable, a bucket id
       - opening orders create or reuse isolated position buckets under the parent
       - users can open another isolated position by reusing the parent account with a different market bucket
  - name: PulseService
  - name: SweeperService
  - name: TraderCodeService
  - name: TradesService
  - name: WhitelistService
  - name: WithdrawalsService
paths:
  /api/v1/market/pairs/{tradingPairId}/trader-metrics:
    get:
      tags:
        - MarketService
        - Market
      summary: Trader Metrics
      description: >-
        Current public trader positioning and participation aggregates for a
        perp.
      operationId: get_trader_metrics
      parameters:
        - name: tradingPairId
          in: path
          required: true
          schema:
            type: string
            default: 893d2add-2f36-4ee7-b660-893d2add2f36
          example: 893d2add-2f36-4ee7-b660-893d2add2f36
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTraderMetricsResponse'
        '400':
          description: Invalid market request
        '404':
          description: Trading pair not found
        '500':
          description: Internal server error
components:
  schemas:
    GetTraderMetricsResponse:
      type: object
      properties:
        tradingPairId:
          type: string
          description: Trading pair UUID
          format: uuid
          nullable: true
        quoteAssetSymbol:
          example: USDC
          type: string
          description: Quote asset symbol for this trading pair
          nullable: true
        asOf:
          example: 1736742000000
          type: integer
          description: Snapshot calculation time in Unix milliseconds
          format: int64
          minimum: 0
          nullable: true
        positionMetricsSuppressed:
          type: boolean
          description: >-
            True when either net-long or net-short side has fewer than five
            margin accounts; all position split fields are then null
          nullable: true
        longAccountCount:
          type: integer
          description: >-
            Distinct margin accounts with positive net position across OPEN risk
            buckets; null when suppressed
          format: int64
          nullable: true
        shortAccountCount:
          type: integer
          description: >-
            Distinct margin accounts with negative net position across OPEN risk
            buckets; null when suppressed
          format: int64
          nullable: true
        longAccountShare:
          type: string
          description: >-
            Long account count divided by long plus short account counts,
            rounded to six decimal places; null when suppressed
          nullable: true
        shortAccountShare:
          type: string
          description: >-
            Short account count divided by long plus short account counts,
            rounded to six decimal places; null when suppressed
          nullable: true
        accountRatio:
          type: string
          description: >-
            Net-long account count divided by net-short account count, rounded
            to six decimal places; null when suppressed
          nullable: true
        activeTraderWindows:
          type: array
          items:
            $ref: '#/components/schemas/ActiveTraderWindow'
          description: Active-trader counts grouped by rolling time window.
          nullable: true
      description: >-
        Current public long/short account positioning and active trader
        aggregates. Accounts are classified by net position across OPEN risk
        buckets. Account identifiers are never returned; position metrics are
        null when either side has fewer than five accounts. Responses may be
        reused from a per-pair cache for up to 30 seconds.
    ActiveTraderWindow:
      type: object
      properties:
        window:
          example: 24h
          type: string
          description: 'Rolling window ending at asOf: 1h, 24h, or 7d'
          nullable: true
        activeTraderCount:
          type: integer
          description: >-
            Distinct maker or taker user IDs in executed trade records in this
            window, including system IDs on liquidation and ADL fills; all
            counts are null when this window is suppressed
          format: int64
          nullable: true
        takerBuyerCount:
          type: integer
          description: >-
            Distinct taker buyer user IDs in executed trade records in this
            window, including system IDs on liquidation and ADL fills; all
            counts are null when this window is suppressed
          format: int64
          nullable: true
        takerSellerCount:
          type: integer
          description: >-
            Distinct taker seller user IDs in executed trade records in this
            window, including system IDs on liquidation and ADL fills; all
            counts are null when this window is suppressed
          format: int64
          nullable: true
        suppressed:
          type: boolean
          description: >-
            True when any user count in this window is below five; all counts in
            the window are then null
          nullable: true

````

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