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

# Get leaderboard

> Returns the public leaderboard ranked by total P&L, including account value (cash + options mark-to-market) per eligible user. Wallets disqualified by admin review or automatic anti-abuse checks are excluded.



## OpenAPI

````yaml /_generated/openapi.yaml get /v1/social/leaderboard
openapi: 3.1.0
info:
  title: Joyride Exchange REST API
  version: 1.0.0
  description: >
    REST API for the Joyride 0DTE Options Exchange.


    ## Authentication


    **Public endpoints** (`/health`, `/v1/market/*`, `/v1/spot/*`,
    `/v1/oracle/*`) require no authentication.


    **Competition prize claims** (`/v1/competition/claim`) are
    self-authenticated

    by a Solana ed25519 signature over the wallet, Discord handle, and payout

    destination in the request body. No JWT is required for that endpoint.


    **Account endpoints** (`/v1/account/*`, `/v1/orders/*`,
    `/v1/social/profile`, `/v1/social/avatar`) require JWT authentication via
    one of:

    1. `Authorization: Bearer <jwt>` header (primary — native clients)

    2. `Cookie: joyride_session=<jwt>` (web clients, set automatically by
    `/v1/auth/verify`)


    **Withdrawal endpoints** (`/withdrawals`, `/v1/withdrawals`) require the

    `Authorization: Bearer <jwt>` header. A session cookie alone is not
    accepted.


    Obtain a JWT by completing the SIWS (Sign In With Solana) flow:

    1. `POST /v1/auth/nonce` with your wallet address to get a nonce

    2. Sign the canonical SIWS message with your wallet

    3. `POST /v1/auth/verify` with wallet, signature, and message to receive a
    JWT


    **Mutating admin endpoints** require a bearer token:

    ```

    Authorization: Bearer <ADMIN_TOKEN>

    ```


    ## Data Conventions


    - **Prices**: Integer values in USDC micros (1 USDC = 1,000,000 micros).
      Example: `1500000` = $1.50
    - **Sizes**: Integer values in millicontracts (1 contract = 1000
    millicontracts).
      Example: `1000` = 1 contract
    - **Balances**: USDC micros. Example: `10_000_000_000` = $10,000

    - **Timestamps**: Unix microseconds (µs since epoch)

    - **Instrument IDs**: Format `{ASSET}_USDC-{DMMMYY}-{STRIKE}-{C|P}`.
      Example: `SOL_USDC-28FEB26-150-C`

    ## Trading


    **Trading is WebSocket-only.** The HTTP API has no order placement
    endpoints.

    See the AsyncAPI spec for WebSocket trading methods.
  contact:
    name: Joyride Engineering
    email: engineering@joyride.exchange
  license:
    name: Proprietary
servers:
  - url: https://joyride.exchange/api
    description: Production
security: []
tags:
  - name: Authentication
    description: |
      SIWS (Sign In With Solana) authentication flow. Obtain a JWT for use
      with all authenticated endpoints. No prior authentication required.
  - name: Health
    description: Service health check.
  - name: Market Data
    description: Publicly accessible market data. No authentication required.
  - name: Account
    description: User-specific account data. Requires user identification.
  - name: Orders
    description: User order history. Requires user identification.
  - name: Withdrawals
    description: Request signed withdrawal authorizations and list withdrawal history.
  - name: Social
    description: Social features — profiles, leaderboard, and activity.
  - name: Referrals
    description: Referral-code validation and attribution surfaces.
  - name: Competition
    description: Competition-specific collection flows.
  - name: Spot
    description: Spot prices and volatility data.
  - name: Oracle
    description: Oracle data — prices, TWAP previews, and settlement timing.
  - name: AI Chat
    description: >
      AI-powered trading assistant. Uses SIWS (Sign In With Solana)
      authentication

      and JWT sessions. Returns responses as Server-Sent Events (SSE).
  - name: Admin
    description: Administrative operations. Requires admin bearer token.
paths:
  /v1/social/leaderboard:
    get:
      tags:
        - Social
      summary: Get leaderboard
      description: >-
        Returns the public leaderboard ranked by total P&L, including account
        value (cash + options mark-to-market) per eligible user. Wallets
        disqualified by admin review or automatic anti-abuse checks are
        excluded.
      operationId: getLeaderboard
      parameters:
        - in: query
          name: page
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: 1-based leaderboard page number.
        - in: query
          name: per_page
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 100
          description: Number of leaderboard entries per page.
      responses:
        '200':
          description: Paginated leaderboard entries
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeaderboardPage'
      security: []
components:
  schemas:
    LeaderboardPage:
      type: object
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/LeaderboardEntry'
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - entries
        - pagination
    LeaderboardEntry:
      type: object
      properties:
        rank:
          type: integer
          description: 1-based global leaderboard rank ordered by descending total P&L.
          example: 1
        wallet:
          type: string
          example: GmQozSzrtMjXt5F1Bed8Vrt55zCbiga8vDZr47RX9wC8
        username:
          type: string
          nullable: true
          example: alice_sol
        avatar_url:
          type: string
          nullable: true
          example: /v1/identicon/GmQozSzrtMjXt5F1Bed8Vrt55zCbiga8vDZr47RX9wC8
        available:
          type: integer
          description: Available balance (USDC micros)
          example: 10500000000
        locked:
          type: integer
          description: Locked balance (USDC micros)
          example: 500000000
        total_pnl:
          type: integer
          description: >-
            Total P&L: (available + locked - initial_balance) + options_value.
            Includes both cash P&L and signed mark-to-market value of open
            positions (USDC micros).
          example: 2500000000
        return_pct:
          type: number
          format: double
          description: 'Percentage return: total_pnl / initial_balance * 100.'
          example: 25
        unrealized_pnl:
          type: integer
          description: Sum of per-position mark-to-market P&L (USDC micros).
          example: 2500000000
        options_value:
          type: integer
          description: >-
            Net signed mark-to-market value of open positions (USDC micros).
            Positive for longs, negative for shorts.
          example: 10000000000
        equity:
          type: integer
          description: >-
            Total account value: available + locked + options_value (USDC
            micros).
          example: 12500000000
      required:
        - rank
        - wallet
        - available
        - locked
        - total_pnl
        - return_pct
        - unrealized_pnl
        - options_value
        - equity
    Pagination:
      type: object
      properties:
        page:
          type: integer
          example: 1
        per_page:
          type: integer
          example: 100
        total:
          type: integer
          example: 237
        total_pages:
          type: integer
          example: 3
        has_next:
          type: boolean
          example: true
        has_prev:
          type: boolean
          example: false
      required:
        - page
        - per_page
        - total
        - total_pages
        - has_next
        - has_prev

````