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

# Get apiv1usercompetitions leaderboard



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/user/competitions/{competition_id}/leaderboard
openapi: 3.1.0
info:
  title: ekiden-gateway
  description: >-
    API Gateway and WebSocket proxy based on Axum and Utoipa, handling auth,
    rate limiting, and connection buffering.
  license:
    name: ''
  version: 0.1.1
servers:
  - url: https://api.cnt.ekiden.fi/
    description: Testnet
  - url: https://api.canton.ekiden.fi/
    description: Staging
security: []
paths:
  /api/v1/user/competitions/{competition_id}/leaderboard:
    get:
      tags:
        - user
      operationId: get_competition_leaderboard
      parameters:
        - name: competition_id
          in: path
          description: Competition UUID
          required: true
          schema:
            type: string
        - name: offset
          in: query
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int32
            minimum: 0
        - name: limit
          in: query
          required: false
          schema:
            type:
              - integer
              - 'null'
            format: int32
            minimum: 0
        - name: sub_account
          in: query
          required: false
          schema:
            type:
              - string
              - 'null'
      responses:
        '200':
          description: Competition leaderboard
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CompetitionLeaderboardResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Competition not found
      security:
        - bearer_auth: []
components:
  schemas:
    CompetitionLeaderboardResponse:
      type: object
      required:
        - competition
        - data
        - meta
      properties:
        competition:
          $ref: '#/components/schemas/CompetitionSummary'
        data:
          type: array
          items:
            $ref: '#/components/schemas/CompetitionLeaderboardData'
        meta:
          $ref: '#/components/schemas/CompetitionLeaderboardMeta'
    CompetitionSummary:
      type: object
      required:
        - id
        - slug
        - title
        - status
        - start_time_ms
        - end_time_ms
        - prize_usdc
        - description_md
        - scoring
      properties:
        description_md:
          type: string
        end_time_ms:
          type: integer
          format: int64
        id:
          type: string
        prize_usdc:
          type: integer
          format: int32
          minimum: 0
        scoring:
          $ref: '#/components/schemas/CompetitionScoringConfig'
        slug:
          type: string
        start_time_ms:
          type: integer
          format: int64
        status:
          $ref: '#/components/schemas/CompetitionStatus'
        symbol:
          type:
            - string
            - 'null'
        title:
          type: string
    CompetitionLeaderboardData:
      type: object
      required:
        - sub_account_address
        - score
        - metric_value
        - active_days
        - eligible
        - projected_xp
      properties:
        active_days:
          type: integer
          format: int32
          description: Number of days that met the daily-activity threshold.
          minimum: 0
        eligible:
          type: boolean
          description: >-
            Whether this entry is eligible to be ranked (min active days met,
            score > 0).
        ineligible_reason:
          type:
            - string
            - 'null'
        metric_value:
          type: string
          description: Raw metric total across all days (before capping / weighting).
        projected_xp:
          type: string
          description: >-
            Live display-only XP projected from the current eligible leaderboard
            scores.
        rank:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        score:
          type: string
          description: Weighted, capped score summed across all days.
        sub_account_address:
          type: string
    CompetitionLeaderboardMeta:
      type: object
      required:
        - offset
        - limit
        - total
      properties:
        limit:
          type: integer
          format: int32
          minimum: 0
        offset:
          type: integer
          format: int32
          minimum: 0
        total:
          type: integer
          format: int64
          minimum: 0
    CompetitionScoringConfig:
      type: object
      description: |-
        Parameters that drive score calculation.

        - min_daily_activity_units is raw USDC 1e6 units.
        - All bps values are basis points (1 bp = 0.01%).
      required:
        - metric
        - min_daily_activity_units
        - min_active_days
        - max_daily_contribution_bps
        - start_weight_bps
        - end_weight_bps
      properties:
        consistency_max_bonus_bps:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Max bonus (bps) granted when a participant hits
            `consistency_target_days`.
          minimum: 0
        consistency_target_days:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Target active day count for maximum bonus; required when
            `use_consistency_multiplier`.
          minimum: 0
        end_weight_bps:
          type: integer
          format: int32
          description: >-
            Weight applied to the last day, in bps. Linear interpolation between
            start and end.
          minimum: 0
        max_daily_contribution_bps:
          type: integer
          format: int32
          description: >-
            Per-day contribution cap as a fraction (bps) of the positive sum
            across the window.
          minimum: 0
        metric:
          $ref: '#/components/schemas/CompetitionMetric'
          description: Which metric to score.
        min_active_days:
          type: integer
          format: int32
          description: Required active days for a sub-account to qualify for a rank.
          minimum: 0
        min_daily_activity_units:
          type: integer
          format: int64
          description: >-
            Minimum daily raw metric value (USDC 1e6 units) for a day to count
            toward `active_days`.
          minimum: 0
        start_weight_bps:
          type: integer
          format: int32
          description: 'Weight applied to the first day, in bps (typical: 10000 = 100%).'
          minimum: 0
        use_consistency_multiplier:
          type: boolean
          description: >-
            Whether to apply the consistency multiplier (scales with active
            days).
    CompetitionStatus:
      type: string
      enum:
        - draft
        - scheduled
        - active
        - ended
        - cancelled
    CompetitionMetric:
      type: string
      enum:
        - volume
        - pnl
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````