# Traders

> Intear API traders.get: a token's top traders by profit over the last day, week, month or all time.

This page is part of the Intear API docs. The Intear API is at `https://api.intea.rs` and `wss://api.intea.rs/ws`, with no API key. https://docs.intear.tech/api/llms-full.txt has all of its pages in one file, and https://docs.intear.tech/llms.txt lists every page of the Intear docs.

## `traders.get`

A token's traders, highest `pnl_usd` first. HTTP: `/traders`.

| Param | Description |
| --- | --- |
| `token` | **Required** |
| `range` | **Required**: `24h`, `7d`, `30d` or `all`, the time the PnL is over |
| `top` | 1 to 100, default 100 |

Result:

```json
{
  "height": 221346342,
  "timestamp_millis": 1792820731176,
  "columns": ["account_id", "pnl_usd", "realized_pnl_usd", "unrealized_pnl_usd", "bought_usd", "sold_usd", "buys", "sells", "held"],
  "rows": [
    ["veyo78.tg", 5.392796906334823, 4.513801437759369, 0.8789954685754537, 90.20841197398963, 39.03743424961835, 2, 1, "5462187045430453593840601784747899"],
    ["tradepromax.near", 3.1080841363277045, 3.1080841363277045, 0, 298.93467146592354, 302.04275560225125, 2, 1, "0"]
  ]
}
```

Each trader is the sum of their [positions](https://docs.intear.tech/api/reference/positions.md) in the token over `range`:
- A position opened in `range` counts whole, as `positions.get` has it.
- One opened before counts from the start of `range`, as if what it held then was bought at the price then. `bought_usd`, `sold_usd`, `buys` and `sells` are only what it did since. One that only held the token has `buys` and `sells` of 0, and only `unrealized_pnl_usd`.
- One closed before `range` doesn't count.

- `pnl_usd` is `realized_pnl_usd` plus `unrealized_pnl_usd`. Ties are by `account_id`.
- `realized_pnl_usd`: what sells got, minus what the part sold cost. `unrealized_pnl_usd`: what `held` is worth now, minus what it cost.
- `held` is what the open position holds, in the token's smallest units.

A token's top traders over a `range` are worked out at most every 30 seconds, so they can be up to 30 seconds behind `height`, on top of the few seconds [positions](https://docs.intear.tech/api/reference/positions.md) take to catch up. wNEAR, USDC and USDt are what positions are paid in, so they have no traders. A token that doesn't exist is a `not_found` error.
