> ## 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 Leaderboard Placement

> Placement(s) for the authenticated user. When sub_account is omitted, returns one entry per user trading subaccount; otherwise exactly one entry. When the user has no trading subaccounts, data is an empty array. If the account is not ranked, ranked is false and place is "0".



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/user/leaderboard/placement
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/leaderboard/placement:
    get:
      tags:
        - Leaderboard
      summary: Get Leaderboard Placement
      description: >-
        Placement(s) for the authenticated user. When sub_account is omitted,
        returns one entry per user trading subaccount; otherwise exactly one
        entry. When the user has no trading subaccounts, data is an empty array.
        If the account is not ranked, ranked is false and place is "0".
      operationId: get_leaderboard_placement
      parameters:
        - name: sub_account
          in: query
          description: >-
            When set, return placement for this subaccount only; otherwise one
            entry per subaccount.
          required: false
          schema:
            type:
              - string
              - 'null'
        - name: timeframe
          in: query
          description: Ranking window.
          required: true
          schema:
            type: string
            description: >-
              Leaderboard ranking window: today, last 7 days, last 30 days, or
              all time.
            enum:
              - today
              - 7d
              - 30d
              - all
      responses:
        '200':
          description: Placements (ranked false when not on board)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeaderboardPlacementResponse'
        '400':
          description: Bad Request (invalid sub_account or address)
        '401':
          description: Unauthorized
      security:
        - bearer_auth: []
components:
  schemas:
    LeaderboardPlacementResponse:
      type: object
      description: Response for the current user's placement(s) on the leaderboard.
      required:
        - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/LeaderboardData'
          description: >-
            One row per subaccount (or single row when sub_account query is
            set).
    LeaderboardData:
      type: object
      description: 'A single leaderboard row: subaccount, rank, and metrics.'
      required:
        - account_value
        - place
        - pnl
        - ranked
        - roi
        - sub_account_address
        - volume
        - trading_xp
        - referral_xp
        - total_xp
      properties:
        account_value:
          type: string
          description: Equity in quote units (e.g. USDC).
        place:
          type: string
          description: Rank position (1-based), or "0" when not ranked.
        pnl:
          type: string
          description: PnL in quote units for the selected ranking window.
        ranked:
          type: boolean
          description: Whether this entry is on the board (false when not ranked).
        referral_xp:
          type: integer
          format: int64
          description: XP earned from referral bonuses.
        roi:
          type: string
          description: Return on investment as a decimal string (e.g. "0.05" for 5%).
        sub_account_address:
          type: string
          description: Subaccount address.
        total_xp:
          type: integer
          format: int64
          description: Total XP balance.
        trading_xp:
          type: integer
          format: int64
          description: XP earned from trading activity.
        volume:
          type: string
          description: Cumulative volume in quote units.
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer

````