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

# Token top traders

> Returns the top traders of a token ranked by PnL over the selected timeframe, each with tags, PnL, and funding details.

```bash theme={null}
curl "https://staging-api.struct.to/v1/token/top-traders?chain=robinhood&chain_id=4663&token_address=0x39dBED3a2bd333467115dE45665cC57F813C4571&pool_id=0xEd50bDeeA8aDC232f159486192a4157281D722ff&limit=50&fields=short" \
  -H "X-API-Key: YOUR_API_KEY"
```

```json Response (Long) theme={null}
[
  {
    "wallet": "0x12a371444CCeBb6B64Cc35EBbC70d1d998433d51",
    "rank": 1,
    "token_balance": 1250.5,
    "token_balance_usd": 120770.48,
    "token_balance_raw": "1250500000000000000000",
    "token_balance_supply_percentage": 0.125,
    "native_balance": 2.4,
    "native_balance_usd": 5937.72,
    "native_balance_raw": "2400000000000000000",
    "tags": [
      "Bundler",
      "Sniper",
      "Dev"
    ],
    "pnl": {
      "buy_count": 8,
      "sell_count": 5,
      "buy_native": 1.2,
      "buy_usd": 178.0,
      "buy_tokens": 680000,
      "sell_native": 1.6,
      "sell_usd": 237.0,
      "sell_tokens": 420000,
      "pnl_native": 0.4,
      "pnl_usd": 59.0,
      "pnl_native_percent": 33.33,
      "pnl_usd_percent": 33.15,
      "average_buy_price_native": 1.76e-06,
      "average_buy_price_usd": 0.00026176,
      "average_sell_price_native": 3.81e-06,
      "average_sell_price_usd": 0.00056429,
      "overall_average_price_native": 2.54e-06,
      "overall_average_price_usd": 0.00037727,
      "average_buy_market_cap_native": 1760,
      "average_buy_market_cap_usd": 261760,
      "average_sell_market_cap_native": 3810,
      "average_sell_market_cap_usd": 564290,
      "overall_average_market_cap_native": 2540,
      "overall_average_market_cap_usd": 377270,
      "first_active": 1705000000000,
      "last_active": 1710000000000,
      "last_pool": "0xEd50bDeeA8aDC232f159486192a4157281D722ff",
      "first_tx_hash": "0x7c4a8d09ca3762af61d53583ec55ad30131148048f16944d19399c267a8a4b8f",
      "opening_price_native": 1.2e-06,
      "opening_price_usd": 0.00018,
      "closing_price_native": 3.81e-06,
      "closing_price_usd": 0.00056429,
      "high_price_native": 4.2e-06,
      "high_price_usd": 0.00063,
      "low_price_native": 1.1e-06,
      "low_price_usd": 0.000165,
      "total_priority_fees": 0.014,
      "total_bot_fees": 0.008,
      "total_tip_amount": 0.002,
      "timeframe": "lifetime",
      "current_price_native": 3.906497e-05,
      "current_price_usd": 0.09664868619,
      "token_supply": 1000000000
    },
    "funding": {
      "funder": "0x92C5A42cF503b572955BcfA10E15D47cA5682387",
      "funder_type": "cex",
      "funder_name": "Binance",
      "amount": 0.5,
      "amount_raw": "500000000000000000",
      "decimals": 18,
      "name": "Ether",
      "symbol": "ETH",
      "hash": "0x1111111111111111111111111111111111111111111111111111111111111111",
      "block": 12345678,
      "timestamp": 1784216300000
    },
    "bot_name": "GMGN"
  }
]
```

```jsonc Response (Short) theme={null}
[
  {
    "w": "0x12a371444CCeBb6B64Cc35EBbC70d1d998433d51",
    "rk": 1,
    "tb": 1250.5,
    "tbu": 120770.48,
    "tbr": "1250500000000000000000",
    "tbs": 0.125,
    "nb": 2.4,
    "nbu": 5937.72,
    "nbr": "2400000000000000000",
    "tg": [
      "Bundler",
      "Sniper",
      "Dev"
    ],
    "pnl": {
      "bc": 8,
      "sc": 5,
      "bn": 1.2,
      "bu": 178.0,
      "bt": 680000,
      "sn": 1.6,
      "su": 237.0,
      "st": 420000,
      "pn": 0.4,
      "pu": 59.0,
      "pnp": 33.33,
      "pup": 33.15,
      "abpn": 1.76e-06,
      "abpu": 0.00026176,
      "aspn": 3.81e-06,
      "aspu": 0.00056429,
      "oapn": 2.54e-06,
      "oapu": 0.00037727,
      "abmcn": 1760,
      "abmcu": 261760,
      "asmcn": 3810,
      "asmcu": 564290,
      "oamcn": 2540,
      "oamcu": 377270,
      "fa": 1705000000000,
      "la": 1710000000000,
      "lpo": "0xEd50bDeeA8aDC232f159486192a4157281D722ff",
      "fth": "0x7c4a8d09ca3762af61d53583ec55ad30131148048f16944d19399c267a8a4b8f",
      "opn": 1.2e-06,
      "opu": 0.00018,
      "clpn": 3.81e-06,
      "clpu": 0.00056429,
      "hpn": 4.2e-06,
      "hpu": 0.00063,
      "lpn": 1.1e-06,
      "lpu": 0.000165,
      "tpf": 0.014,
      "tbf": 0.008,
      "tta": 0.002,
      "tf": "lifetime",
      "cpn": 3.906497e-05,
      "cpu": 0.09664868619,
      "ts": 1000000000
    },
    "f": {
      "a": "0x92C5A42cF503b572955BcfA10E15D47cA5682387",
      "t": "cex",
      "f": "Binance",
      "v": 0.5,
      "r": "500000000000000000",
      "d": 18,
      "n": "Ether",
      "s": "ETH",
      "h": "0x1111111111111111111111111111111111111111111111111111111111111111",
      "b": 12345678,
      "c": 1784216300000
    },
    "bn": "GMGN"
  }
]
```


## OpenAPI

````yaml onchain-openapi.json GET /token/top-traders
openapi: 3.1.0
info:
  title: Struct On-chain API
  description: >-
    RESTful API for token market data, discovery, holders, audits, and trader
    analytics across supported chains. Pass `fields=short` or header
    `x-field-names: short` for abbreviated keys. HTTP defaults to `long`. Token
    candlesticks, token trades and wallet batch trades also support
    `fields=array` for typed positional rows.
  version: 1.0.0
servers:
  - url: https://staging-api.struct.to/v1
    description: Staging
security:
  - ApiKey: []
paths:
  /token/top-traders:
    get:
      tags:
        - Token
      summary: Token top traders
      description: >-
        Returns the top traders of a token ranked by PnL over the selected
        timeframe, each with tags, PnL, and funding details.
      operationId: get_token_top_traders
      parameters:
        - name: chain
          in: query
          description: Chain name. Required unless `chain_id` is provided.
          required: false
          schema:
            type: string
          example: robinhood
        - name: chain_id
          in: query
          description: Chain id. Required unless `chain` is provided. Use `-1` for Solana.
          required: false
          schema:
            type: integer
            format: int64
          example: 4663
        - name: token_address
          in: query
          description: Token address (required).
          required: true
          schema:
            type: string
          example: '0x39dBED3a2bd333467115dE45665cC57F813C4571'
        - name: pool_id
          in: query
          description: Pool address (required).
          required: true
          schema:
            type: string
          example: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
        - name: timeframe
          in: query
          description: PnL lookback window (default 30d).
          required: false
          schema:
            $ref: '#/components/schemas/TopTradersTimeframe'
        - name: limit
          in: query
          description: Max traders to return (default 50, max 50).
          required: false
          schema:
            type: integer
            format: int32
          example: 50
        - name: tags
          in: query
          description: >-
            Single classification tag to require. Accepts snake_case,
            kebab-case, or spaced names. Valid: pro_trader, sniper,
            migration_sniper, insider, dev, bundler, block_zero_buyer, caller.
          required: false
          schema:
            type: string
        - name: x-field-names
          in: header
          required: false
          description: >-
            Select long (full) or short (abbreviated) field names. HTTP defaults
            to `long`. Takes precedence over `fields`. See [Response
            Format](/api-reference/response-format#long-and-short-field-names).
          schema:
            type: string
            enum:
              - long
              - short
            default: long
          example: short
        - name: fields
          in: query
          required: false
          description: >-
            Same as `x-field-names`. Use `long` or `short`. HTTP defaults to
            `long`. Ignored when the header is set. `field_names` is accepted as
            an alias.
          schema:
            type: string
            enum:
              - long
              - short
            default: long
          example: short
      responses:
        '200':
          description: Top traders
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TopTrader'
              examples:
                long:
                  summary: Response (Long)
                  value:
                    - wallet: '0x12a371444CCeBb6B64Cc35EBbC70d1d998433d51'
                      rank: 1
                      token_balance: 1250.5
                      token_balance_usd: 120770.48
                      token_balance_raw: '1250500000000000000000'
                      token_balance_supply_percentage: 0.125
                      native_balance: 2.4
                      native_balance_usd: 5937.72
                      native_balance_raw: '2400000000000000000'
                      tags:
                        - Bundler
                        - Sniper
                        - Dev
                      pnl:
                        buy_count: 8
                        sell_count: 5
                        buy_native: 1.2
                        buy_usd: 178
                        buy_tokens: 680000
                        sell_native: 1.6
                        sell_usd: 237
                        sell_tokens: 420000
                        pnl_native: 0.4
                        pnl_usd: 59
                        pnl_native_percent: 33.33
                        pnl_usd_percent: 33.15
                        average_buy_price_native: 0.00000176
                        average_buy_price_usd: 0.00026176
                        average_sell_price_native: 0.00000381
                        average_sell_price_usd: 0.00056429
                        overall_average_price_native: 0.00000254
                        overall_average_price_usd: 0.00037727
                        average_buy_market_cap_native: 1760
                        average_buy_market_cap_usd: 261760
                        average_sell_market_cap_native: 3810
                        average_sell_market_cap_usd: 564290
                        overall_average_market_cap_native: 2540
                        overall_average_market_cap_usd: 377270
                        first_active: 1705000000000
                        last_active: 1710000000000
                        last_pool: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
                        first_tx_hash: >-
                          0x7c4a8d09ca3762af61d53583ec55ad30131148048f16944d19399c267a8a4b8f
                        opening_price_native: 0.0000012
                        opening_price_usd: 0.00018
                        closing_price_native: 0.00000381
                        closing_price_usd: 0.00056429
                        high_price_native: 0.0000042
                        high_price_usd: 0.00063
                        low_price_native: 0.0000011
                        low_price_usd: 0.000165
                        total_priority_fees: 0.014
                        total_bot_fees: 0.008
                        total_tip_amount: 0.002
                        timeframe: lifetime
                        current_price_native: 0.00003906497
                        current_price_usd: 0.09664868619
                        token_supply: 1000000000
                      funding:
                        funder: '0x92C5A42cF503b572955BcfA10E15D47cA5682387'
                        funder_type: cex
                        funder_name: Binance
                        amount: 0.5
                        amount_raw: '500000000000000000'
                        decimals: 18
                        name: Ether
                        symbol: ETH
                        hash: >-
                          0x1111111111111111111111111111111111111111111111111111111111111111
                        block: 12345678
                        timestamp: 1784216300000
                      bot_name: GMGN
                short:
                  summary: Response (Short)
                  value:
                    - w: '0x12a371444CCeBb6B64Cc35EBbC70d1d998433d51'
                      rk: 1
                      tb: 1250.5
                      tbu: 120770.48
                      tbr: '1250500000000000000000'
                      tbs: 0.125
                      nb: 2.4
                      nbu: 5937.72
                      nbr: '2400000000000000000'
                      tg:
                        - Bundler
                        - Sniper
                        - Dev
                      pnl:
                        bc: 8
                        sc: 5
                        bn: 1.2
                        bu: 178
                        bt: 680000
                        sn: 1.6
                        su: 237
                        st: 420000
                        pn: 0.4
                        pu: 59
                        pnp: 33.33
                        pup: 33.15
                        abpn: 0.00000176
                        abpu: 0.00026176
                        aspn: 0.00000381
                        aspu: 0.00056429
                        oapn: 0.00000254
                        oapu: 0.00037727
                        abmcn: 1760
                        abmcu: 261760
                        asmcn: 3810
                        asmcu: 564290
                        oamcn: 2540
                        oamcu: 377270
                        fa: 1705000000000
                        la: 1710000000000
                        lpo: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
                        fth: >-
                          0x7c4a8d09ca3762af61d53583ec55ad30131148048f16944d19399c267a8a4b8f
                        opn: 0.0000012
                        opu: 0.00018
                        clpn: 0.00000381
                        clpu: 0.00056429
                        hpn: 0.0000042
                        hpu: 0.00063
                        lpn: 0.0000011
                        lpu: 0.000165
                        tpf: 0.014
                        tbf: 0.008
                        tta: 0.002
                        tf: lifetime
                        cpn: 0.00003906497
                        cpu: 0.09664868619
                        ts: 1000000000
                      f:
                        a: '0x92C5A42cF503b572955BcfA10E15D47cA5682387'
                        t: cex
                        f: Binance
                        v: 0.5
                        r: '500000000000000000'
                        d: 18
                        'n': Ether
                        s: ETH
                        h: >-
                          0x1111111111111111111111111111111111111111111111111111111111111111
                        b: 12345678
                        c: 1784216300000
                      bn: GMGN
        '400':
          description: >-
            Validation error — missing `token_address`/`pool_id`, invalid
            address, or invalid/multiple `tags`.
components:
  schemas:
    TopTradersTimeframe:
      type: string
      description: Lookback window for `/token/top-traders`.
      enum:
        - 1d
        - 3d
        - 7d
        - 14d
        - 30d
        - lifetime
    TopTrader:
      type: object
      description: |-
        A top trader row: a `TokenHolder` without its liquidity label, since top
        traders exclude liquidity addresses.
      required:
        - wallet
        - rank
        - token_balance
        - token_balance_raw
        - native_balance
        - native_balance_raw
        - tags
      properties:
        wallet:
          type: string
        rank:
          type: integer
          format: int64
          minimum: 0
        token_balance:
          $ref: '#/components/schemas/Decimal'
        token_balance_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        token_balance_raw:
          type: string
        token_balance_supply_percentage:
          type:
            - number
            - 'null'
          format: double
        native_balance:
          $ref: '#/components/schemas/Decimal'
        native_balance_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        native_balance_raw:
          type: string
        tags:
          type: array
          items:
            type: string
          description: >-
            Classification tags present on the trader, e.g. `Bundler`, `Sniper`,
            `Dev`.
          example:
            - Bundler
            - Sniper
            - Dev
        funding:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/FundingData'
        bot_name:
          type:
            - string
            - 'null'
        pnl:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/HolderPnlStats'
    Decimal:
      type: number
      format: double
      description: Floating-point number serialized as JSON number.
      examples:
        - 4.108801574e-7
    FundingData:
      type: object
      properties:
        funder:
          type: string
          example: '0x92C5A42cF503b572955BcfA10E15D47cA5682387'
        funder_type:
          type:
            - string
            - 'null'
          example: cex
        funder_name:
          type:
            - string
            - 'null'
          example: Binance
        amount:
          type: number
          format: double
          example: 0.5
        amount_raw:
          type: string
          example: '500000000000000000'
        decimals:
          type: integer
          format: int32
          minimum: 0
          example: 18
        name:
          type: string
          example: Ether
        symbol:
          type: string
          example: ETH
        hash:
          type: string
          example: '0x1111111111111111111111111111111111111111111111111111111111111111'
        block:
          type: integer
          format: int64
          minimum: 0
          example: 12345678
        timestamp:
          type:
            - integer
            - 'null'
          format: int64
          description: |-
            When the funding transfer confirmed, in milliseconds. Serialized as
            `timestamp`; the holders engines still send `confirmed_at`.
          example: 1784216300000
      example:
        funder: '0x92C5A42cF503b572955BcfA10E15D47cA5682387'
        funder_type: cex
        funder_name: Binance
        amount: 0.5
        amount_raw: '500000000000000000'
        decimals: 18
        name: Ether
        symbol: ETH
        hash: '0x1111111111111111111111111111111111111111111111111111111111111111'
        block: 12345678
        timestamp: 1784216300000
    HolderPnlStats:
      type: object
      properties:
        buy_count:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        sell_count:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        buy_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        buy_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        buy_tokens:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        sell_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        sell_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        sell_tokens:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        pnl_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        pnl_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        pnl_native_percent:
          type:
            - number
            - 'null'
          format: double
        pnl_usd_percent:
          type:
            - number
            - 'null'
          format: double
        average_buy_price_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        average_buy_price_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        average_sell_price_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        average_sell_price_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        overall_average_price_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        overall_average_price_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        average_buy_market_cap_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        average_buy_market_cap_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        average_sell_market_cap_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        average_sell_market_cap_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        overall_average_market_cap_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        overall_average_market_cap_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        first_active:
          type:
            - integer
            - 'null'
          format: int64
          description: Time of the first trade, in milliseconds.
        last_active:
          type:
            - integer
            - 'null'
          format: int64
          description: Time of the latest trade, in milliseconds.
        last_pool:
          type:
            - string
            - 'null'
        first_tx_hash:
          type:
            - string
            - 'null'
        opening_price_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        opening_price_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        closing_price_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        closing_price_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        high_price_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        high_price_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        low_price_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        low_price_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        total_priority_fees:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        total_bot_fees:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        total_tip_amount:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        timeframe:
          type:
            - string
            - 'null'
        current_price_native:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        current_price_usd:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
        token_supply:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Decimal'
      example:
        buy_count: 8
        sell_count: 5
        buy_native: 1.2
        buy_usd: 178
        buy_tokens: 680000
        sell_native: 1.6
        sell_usd: 237
        sell_tokens: 420000
        pnl_native: 0.4
        pnl_usd: 59
        pnl_native_percent: 33.33
        pnl_usd_percent: 33.15
        average_buy_price_native: 0.00000176
        average_buy_price_usd: 0.00026176
        average_sell_price_native: 0.00000381
        average_sell_price_usd: 0.00056429
        overall_average_price_native: 0.00000254
        overall_average_price_usd: 0.00037727
        average_buy_market_cap_native: 1760
        average_buy_market_cap_usd: 261760
        average_sell_market_cap_native: 3810
        average_sell_market_cap_usd: 564290
        overall_average_market_cap_native: 2540
        overall_average_market_cap_usd: 377270
        first_active: 1705000000000
        last_active: 1710000000000
        last_pool: '0xEd50bDeeA8aDC232f159486192a4157281D722ff'
        first_tx_hash: '0x7c4a8d09ca3762af61d53583ec55ad30131148048f16944d19399c267a8a4b8f'
        opening_price_native: 0.0000012
        opening_price_usd: 0.00018
        closing_price_native: 0.00000381
        closing_price_usd: 0.00056429
        high_price_native: 0.0000042
        high_price_usd: 0.00063
        low_price_native: 0.0000011
        low_price_usd: 0.000165
        total_priority_fees: 0.014
        total_bot_fees: 0.008
        total_tip_amount: 0.002
        timeframe: lifetime
        current_price_native: 0.00003906497
        current_price_usd: 0.09664868619
        token_supply: 1000000000
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Secret API key (`sk_*`) or JWT public key (`pk_jwt_*`).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.