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

# Leaderboard

> Get the top traders with combined PnL across selected chains. Returns a flat list of traders sorted by total PnL.

<Note>
  **V2 is the recommended leaderboard API.** It provides a simpler, filter-based approach compared to the section-based V1 endpoint.
</Note>

## V2 vs V1 Comparison

| Feature             | V1 (`/v1/leaderboard`)                   | V2 (`/v2/leaderboard`)                 |
| ------------------- | ---------------------------------------- | -------------------------------------- |
| **Structure**       | Section-based (multiple categories)      | Filter-based (flat list)               |
| **Chain selection** | Pre-defined sections like `chain-solana` | `chains` query param                   |
| **PnL data**        | Single `pnl30` value                     | `pnl.total` + `pnl.perChain` breakdown |
| **Response**        | `{ sections: [...] }`                    | `{ traders: [...] }`                   |

## Key Features

### Chain Filtering

Filter traders by one or more chains:

```bash theme={null}
# Single chain
GET /v2/leaderboard?chains=solana

# Multiple chains (combined PnL)
GET /v2/leaderboard?chains=base&chains=solana
```

When multiple chains are selected, `pnl.total` is the sum of PnL across those chains.

### Commenters Filter

Show only traders who have posted swap comments:

```bash theme={null}
GET /v2/leaderboard?onlyWithComments=true
```

### Per-Chain PnL Breakdown

The V2 response includes a breakdown of PnL per chain:

```json theme={null}
{
  "traders": [
    {
      "profile": { ... },
      "pnl": {
        "total": 125000,
        "perChain": {
          "base": 80000,
          "solana": 45000,
          "ethereum": 0,
          "hyperliquid": 0
        }
      },
      "hasComments": true
    }
  ]
}
```

## Supported Chains

* `base` - Base (Coinbase L2)
* `solana` - Solana
* `ethereum` - Ethereum mainnet
* `hyperliquid` - Hyperliquid

## Migration from V1

If you're currently using V1 section-based leaderboards:

| V1 Section          | V2 Equivalent                                                                            |
| ------------------- | ---------------------------------------------------------------------------------------- |
| `chain-solana`      | `?chains=solana`                                                                         |
| `chain-base`        | `?chains=base`                                                                           |
| `chain-ethereum`    | `?chains=ethereum`                                                                       |
| `chain-hyperliquid` | `?chains=hyperliquid`                                                                    |
| `all`               | `?chains=base&chains=solana&chains=ethereum&chains=hyperliquid` (or omit `chains` param) |


## OpenAPI

````yaml GET /v2/leaderboard
openapi: 3.0.0
info:
  version: 1.0.0
  title: Daylight.xyz API
  description: >-
    Welcome to the Daylight API! API endpoints require a Daylight partner API
    key passed in the HTTP Authorization header.
servers:
  - url: https://api.clicker.xyz
security:
  - {}
  - bearerAuth: []
paths:
  /v2/leaderboard:
    get:
      tags:
        - Social - Feed, Profiles and Discovery
      summary: Get PnL Leaderboard (V2)
      description: >-
        Get the top traders with combined PnL across selected chains. Returns a
        flat list of traders sorted by total PnL.
      parameters:
        - schema:
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 250
            default: 50
          required: false
          name: limit
          in: query
        - schema:
            anyOf:
              - type: string
                enum:
                  - base
                  - solana
                  - ethereum
                  - hyperliquid
              - type: array
                items:
                  type: string
                  enum:
                    - base
                    - solana
                    - ethereum
                    - hyperliquid
          required: false
          name: chains
          in: query
        - schema:
            type: array
            description: >-
              Optional viewer address(es) to populate isFollowedByUser. Accepts
              a single address or an array of the viewer’s linked wallets
              (additional addresses beyond 10 are ignored).
            items:
              type: string
          required: false
          description: >-
            Optional viewer address(es) to populate isFollowedByUser. Accepts a
            single address or an array of the viewer’s linked wallets
            (additional addresses beyond 10 are ignored).
          name: viewerAddresses
          in: query
        - schema:
            type: string
            enum:
              - 'true'
              - 'false'
            default: 'false'
          required: false
          name: onlyWithComments
          in: query
        - schema:
            type: string
            enum:
              - 7d
              - 30d
            default: 30d
          required: false
          name: timeframe
          in: query
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LeaderboardV2Response'
        '400':
          description: >-
            The request payload or query string parameter you passed was not
            valid
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
components:
  schemas:
    LeaderboardV2Response:
      type: object
      properties:
        traders:
          type: array
          items:
            type: object
            properties:
              profile:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  images:
                    type: object
                    properties:
                      raw:
                        type: string
                        nullable: true
                        description: The full-sized image
                      xs:
                        type: string
                        nullable: true
                        description: 75x75
                      sm:
                        type: string
                        nullable: true
                        description: 300x300
                    required:
                      - raw
                      - xs
                      - sm
                    description: URLs for different size squares.
                  addresses:
                    type: array
                    items:
                      type: string
                  externalId:
                    type: string
                  metadata:
                    type: object
                    properties:
                      farcasterUsername:
                        type: string
                        nullable: true
                      farcasterId:
                        type: number
                        nullable: true
                      lensHandle:
                        type: string
                        nullable: true
                      ensName:
                        type: string
                        nullable: true
                      twitterHandle:
                        type: string
                        nullable: true
                      debankName:
                        type: string
                        nullable: true
                      hlName:
                        type: string
                        nullable: true
                      commentCount30d:
                        type: number
                        nullable: true
                      pnl30d:
                        type: number
                        nullable: true
                      winRate30d:
                        type: number
                        nullable: true
                      tradeCount30d:
                        type: number
                        nullable: true
                      roiPercent30d:
                        type: number
                        nullable: true
                      pnl7d:
                        type: number
                        nullable: true
                      winRate7d:
                        type: number
                        nullable: true
                      tradeCount7d:
                        type: number
                        nullable: true
                      roiPercent7d:
                        type: number
                        nullable: true
                      medianHoldingTimeMinutes:
                        type: number
                        nullable: true
                      perAddressPnl30d:
                        type: object
                        additionalProperties:
                          type: number
                      perAddressRoiPercent30d:
                        type: object
                        additionalProperties:
                          type: number
                          nullable: true
                      perChainPnl30d:
                        type: object
                        properties:
                          solana:
                            type: number
                            nullable: true
                          ethereum:
                            type: number
                            nullable: true
                          base:
                            type: number
                            nullable: true
                          hyperliquid:
                            type: number
                            nullable: true
                        required:
                          - solana
                          - ethereum
                          - base
                          - hyperliquid
                      perChainRoiPercent30d:
                        type: object
                        properties:
                          solana:
                            type: number
                            nullable: true
                          ethereum:
                            type: number
                            nullable: true
                          base:
                            type: number
                            nullable: true
                          hyperliquid:
                            type: number
                            nullable: true
                        required:
                          - solana
                          - ethereum
                          - base
                          - hyperliquid
                      perChainVolumeUsd30d:
                        type: object
                        properties:
                          solana:
                            type: number
                            nullable: true
                          ethereum:
                            type: number
                            nullable: true
                          base:
                            type: number
                            nullable: true
                          hyperliquid:
                            type: number
                            nullable: true
                        required:
                          - solana
                          - ethereum
                          - base
                          - hyperliquid
                      perChainPnl7d:
                        type: object
                        properties:
                          solana:
                            type: number
                            nullable: true
                          ethereum:
                            type: number
                            nullable: true
                          base:
                            type: number
                            nullable: true
                          hyperliquid:
                            type: number
                            nullable: true
                        required:
                          - solana
                          - ethereum
                          - base
                          - hyperliquid
                      perChainRoiPercent7d:
                        type: object
                        properties:
                          solana:
                            type: number
                            nullable: true
                          ethereum:
                            type: number
                            nullable: true
                          base:
                            type: number
                            nullable: true
                          hyperliquid:
                            type: number
                            nullable: true
                        required:
                          - solana
                          - ethereum
                          - base
                          - hyperliquid
                      perChainVolumeUsd7d:
                        type: object
                        properties:
                          solana:
                            type: number
                            nullable: true
                          ethereum:
                            type: number
                            nullable: true
                          base:
                            type: number
                            nullable: true
                          hyperliquid:
                            type: number
                            nullable: true
                        required:
                          - solana
                          - ethereum
                          - base
                          - hyperliquid
                    required:
                      - farcasterUsername
                      - farcasterId
                      - lensHandle
                      - ensName
                      - twitterHandle
                      - debankName
                      - hlName
                      - commentCount30d
                      - pnl30d
                      - winRate30d
                      - tradeCount30d
                      - roiPercent30d
                      - pnl7d
                      - winRate7d
                      - tradeCount7d
                      - roiPercent7d
                      - medianHoldingTimeMinutes
                  isNSFW:
                    anyOf:
                      - type: boolean
                        enum:
                          - false
                      - type: object
                        properties:
                          nsfwImage:
                            type: boolean
                          nsfwText:
                            type: boolean
                        required:
                          - nsfwImage
                          - nsfwText
                    description: >-
                      `false` when the profile is clean. Otherwise an object
                      with `nsfwImage` and `nsfwText` booleans indicating which
                      axes the scanner flagged. Clients decide whether to
                      render, censor, or hide the underlying content.
                  metrics:
                    type: object
                    properties:
                      thisPartner:
                        type: object
                        properties:
                          followingCount:
                            type: number
                            nullable: true
                          followerCount:
                            type: number
                            nullable: true
                        required:
                          - followingCount
                          - followerCount
                      allPartners:
                        type: object
                        properties:
                          followingCount:
                            type: number
                            nullable: true
                          followerCount:
                            type: number
                            nullable: true
                        required:
                          - followingCount
                          - followerCount
                      comments:
                        type: object
                        properties:
                          commentCount30d:
                            type: number
                            nullable: true
                          commentCountAllTime:
                            type: number
                            nullable: true
                        required:
                          - commentCount30d
                          - commentCountAllTime
                      copytradedAllTime:
                        type: object
                        properties:
                          count:
                            type: number
                            nullable: true
                          distinctActors:
                            type: number
                            nullable: true
                          volumeUSD:
                            type: number
                            nullable: true
                        required:
                          - count
                          - distinctActors
                          - volumeUSD
                    required:
                      - thisPartner
                      - allPartners
                      - comments
                      - copytradedAllTime
                    description: Social metrics for the profile
                  isFollowedByUser:
                    type: boolean
                    description: >-
                      Whether the viewer follows this profile. Only populated on
                      endpoints that accept a `viewerAddresses` query param
                      (e.g. `GET /v1/addresses/:identifier/profile`). Absent on
                      endpoints that do not surface follow status.
                  status:
                    type: string
                    enum:
                      - unnamed
                      - backfilling
                      - active
                    description: >-
                      Indicates whether the profile's addresses are being
                      tracked by the swaps indexer. `unnamed` means no
                      addresses-to-check entries exist yet, `backfilling` means
                      at least one is still pending backfill, `active` means all
                      entries exist and have finished backfilling.
                required:
                  - id
                  - name
                  - images
                  - addresses
                  - metadata
                  - isNSFW
                  - metrics
                  - status
              pnl:
                type: object
                properties:
                  total:
                    type: number
                  perChain:
                    type: object
                    properties:
                      base:
                        type: number
                      solana:
                        type: number
                      ethereum:
                        type: number
                      hyperliquid:
                        type: number
                required:
                  - total
              hasComments:
                type: boolean
              isFollowedByUser:
                type: boolean
            required:
              - profile
              - pnl
              - hasComments
      required:
        - traders
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````