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

# Top Traders by Token

> Leaderboard of top traders for a (chain, token) pair, ranked by a selectable PnL metric, with per-trader volumes and realized/unrealized profit.

export const EndpointMeta = ({premium, cus, cusUnit, mainnetOnly}) => {
  const items = [];
  const planName = typeof premium === "string" ? premium : "Pro";
  if (premium) {
    items.push({
      icon: "\u26a0\ufe0f",
      label: "Premium endpoint",
      text: <>
          Requires the <strong>{planName} plan</strong> or above.{" "}
          <a href="/data-api/introduction/resources/premium-endpoints">
            View all
          </a>
          .
        </>
    });
  }
  if (cus) {
    const isDynamic = !!cusUnit;
    items.push({
      icon: "\u26a1",
      label: isDynamic ? "Dynamic cost" : "Endpoint cost",
      text: isDynamic ? <>
          {cus} CUs per {cusUnit}.{" "}
          <a href="/get-started/pricing#dynamic-endpoints">Learn more</a>.
        </> : <>
          {cus} CUs.{" "}
          <a href="/get-started/pricing">Learn more</a>.
        </>
    });
  }
  if (mainnetOnly) {
    items.push({
      icon: "\ud83d\udd17",
      label: "Mainnet only",
      text: <>Testnet chains are not supported.</>
    });
  }
  if (items.length === 0) return null;
  return <div className="endpoint-meta" style={{
    border: "1px solid var(--border-color, #e2e8f0)",
    borderRadius: "8px",
    overflow: "hidden",
    marginBottom: "16px",
    fontSize: "14px",
    lineHeight: "1.6",
    maxWidth: "100%"
  }}>
      <style dangerouslySetInnerHTML={{
    __html: `
            .endpoint-meta {
              --border-color: #e2e8f0;
              --row-bg: #f8fafc;
              --label-color: #0f172a;
              --text-color: #1f2937;
            }
            .endpoint-meta a {
              color: #0f7fff !important;
              text-decoration: underline;
            }
            @media (prefers-color-scheme: dark) {
              .endpoint-meta {
                --border-color: #374151 !important;
                --row-bg: #1e293b !important;
                --label-color: #f9fafb !important;
                --text-color: #e5e7eb !important;
              }
              .endpoint-meta a {
                color: #60a5fa !important;
              }
            }
            html.dark .endpoint-meta,
            [data-theme="dark"] .endpoint-meta {
              --border-color: #374151 !important;
              --row-bg: #1e293b !important;
              --label-color: #f9fafb !important;
              --text-color: #e5e7eb !important;
            }
            html.dark .endpoint-meta a,
            [data-theme="dark"] .endpoint-meta a {
              color: #60a5fa !important;
            }
          `
  }} />
      {items.map((item, i) => <div key={i} style={{
    display: "flex",
    alignItems: "baseline",
    gap: "8px",
    padding: "10px 14px",
    borderBottom: i < items.length - 1 ? "1px solid var(--border-color, #e2e8f0)" : "none",
    backgroundColor: "var(--row-bg, #f8fafc)"
  }}>
          <span style={{
    flexShrink: 0
  }}>{item.icon}</span>
          <span style={{
    wordBreak: "break-word",
    color: "var(--text-color, #1f2937)"
  }}>
            <strong style={{
    color: "var(--label-color, #0f172a)"
  }}>
              {item.label}:
            </strong>{" "}
            {item.text}
          </span>
        </div>)}
    </div>;
};

<EndpointMeta cus={50} mainnetOnly />

<Note>
  This is the successor to the legacy Deep Index [Top Traders by Token](/data-api/evm/token/signals/top-traders) endpoint, with a selectable ranking metric (`sortBy`) and low-liquidity, volume, and trade-count filters.
</Note>


## OpenAPI

````yaml openapi-files/data-api/api-v1.json GET /v1/chains/{chainAlias}/tokens/{tokenAddress}/top-traders
openapi: 3.0.0
info:
  title: Moralis Universal API 🚧
  description: This API is in early access and is subject to change.
  version: '1.0'
servers:
  - url: https://api.moralis.com
security: []
externalDocs:
  description: Moralis API Docs
  url: https://docs.moralis.com
paths:
  /v1/chains/{chainAlias}/tokens/{tokenAddress}/top-traders:
    get:
      tags:
        - PnL
      summary: Get the top traders for a token on a single chain.
      description: >-
        Leaderboard of top traders for a (chain, token) pair, ranked by a
        selectable PnL metric, with per-trader volumes and realized/unrealized
        profit.
      operationId: getTopTradersByToken
      parameters:
        - name: chainAlias
          required: true
          in: path
          description: The alias of the chain.
          schema:
            type: string
            enum:
              - '0x1'
              - ethereum
              - '0x171'
              - pulse
              - '0x2105'
              - base
              - '0x38'
              - binance
              - '0x89'
              - polygon
              - '0xa'
              - optimism
              - '0xa86a'
              - avalanche
        - name: tokenAddress
          required: true
          in: path
          description: The address
          examples:
            '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48':
              value: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
          schema:
            type: string
        - name: period
          required: false
          in: query
          schema:
            type: string
        - name: fromTimestamp
          required: false
          in: query
          schema:
            type: string
        - name: toTimestamp
          required: false
          in: query
          schema:
            type: string
        - name: limit
          required: false
          in: query
          schema:
            minimum: 1
            default: 100
            type: number
        - name: cursor
          required: false
          in: query
          description: Encoded v2 cursor (JWT).
          schema:
            type: string
        - name: sortBy
          required: false
          in: query
          schema:
            enum:
              - realizedPnl
              - unrealizedPnl
              - totalPnl
              - volume
              - tradeCount
            type: string
        - name: excludeLowLiquidity
          required: false
          in: query
          schema:
            type: boolean
        - name: minVolumeUsd
          required: false
          in: query
          schema:
            minimum: 0
            type: number
        - name: minTradeCount
          required: false
          in: query
          schema:
            minimum: 0
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetTopTradersByTokenResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetTopTradersByTokenResponse:
      type: object
      properties:
        meta:
          $ref: '#/components/schemas/SingleChainResponseMetaDto'
        token:
          $ref: '#/components/schemas/TopTradersTokenHeader'
        result:
          type: array
          items:
            $ref: '#/components/schemas/TopTraderRow'
        cursor:
          type: string
          nullable: true
          description: Encoded v2 cursor (JWT).
        limit:
          type: number
          example: 100
      required:
        - meta
        - token
        - result
        - cursor
        - limit
    SingleChainResponseMetaDto:
      type: object
      properties:
        syncedAt:
          type: object
          description: Last ingested block number per chain ID
          additionalProperties:
            type: number
          example:
            '0x1': 19800000
      required:
        - syncedAt
    TopTradersTokenHeader:
      type: object
      properties:
        chain:
          type: string
          example: '0x1'
        tokenAddress:
          type: string
          example: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
        name:
          type: string
          nullable: true
        symbol:
          type: string
          nullable: true
        decimals:
          type: number
          nullable: true
        logo:
          type: string
          nullable: true
        possibleSpam:
          type: boolean
          nullable: true
        verifiedContract:
          type: boolean
          nullable: true
        securityScore:
          type: number
          nullable: true
        currentPriceUsd:
          type: number
          nullable: true
          description: Latest USD price for the token (from most_active_pair_by_token).
      required:
        - chain
        - tokenAddress
        - name
        - symbol
        - decimals
        - logo
        - possibleSpam
        - verifiedContract
        - securityScore
        - currentPriceUsd
    TopTraderRow:
      type: object
      properties:
        walletAddress:
          type: string
          example: 0xWallet
        totalTokensBought:
          type: number
        totalTokensSold:
          type: number
        totalBoughtVolumeUsd:
          type: number
        totalSoldVolumeUsd:
          type: number
          description: 'Pinned field name: totalSoldVolumeUsd.'
        totalTrades:
          type: number
        avgBuyPriceUsd:
          type: number
        avgSellPriceUsd:
          type: number
        avgCostOfQuantitySold:
          type: number
        realizedProfitUsd:
          type: number
        realizedProfitPercentage:
          type: number
        unrealizedProfitUsd:
          type: number
        totalPnlUsd:
          type: number
        totalPnlPercentage:
          type: number
        roi:
          type: number
      required:
        - walletAddress
        - totalTokensBought
        - totalTokensSold
        - totalBoughtVolumeUsd
        - totalSoldVolumeUsd
        - totalTrades
        - avgBuyPriceUsd
        - avgSellPriceUsd
        - avgCostOfQuantitySold
        - realizedProfitUsd
        - realizedProfitPercentage
        - unrealizedProfitUsd
        - totalPnlUsd
        - totalPnlPercentage
        - roi
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````