# Trader rankings & risk metrics.

> Source: https://implyra.com/docs/trader-analytics
> Implyra API docs · API reference · Trader analytics

Find traders by performance and activity. Inspect the risk metrics behind a track record.

Transport: GET

## Rank and filter traders

`GET /leaderboard/global`

Request advanced=true to include the advanced metrics object when available. Rankings represent a snapshot; display updatedAt alongside your results.

| Name | Type | Description |
| --- | --- | --- |
| `advanced` | boolean | Include the optional advanced metrics object. |
| `sortBy / sortOrder` | query | Common sort fields: pnl, realized_pnl, win_rate, volume, sharpe, sortino, calmar, max_drawdown, roi and smart_score. pnl sorts total P&L; realized_pnl sorts realized P&L. Order is ASC or DESC; lower drawdown requires ASC. |
| `minPnl / maxPnl` | realized P&L · USD | These filters use the backend realized-P&L field, not the overallPnl headline (realized plus unrealized). A result can meet a realized-P&L threshold while showing a different overallPnl. Realized-history completeness is not established by this filter. |
| `minVolume / maxVolume` | USD | Filter by recorded total trading volume. |
| `minPositions / maxPositions` | integer | Filter by the recorded position count. Combine sample size with performance rather than treating a high ratio in isolation. |
| `minWinRate / maxWinRate` | 0–1 | Filter the ratio of winning closed positions. A value of 0.6 corresponds to 60%. |
| `isActive` | boolean | Restrict the snapshot by the recorded active classification. |
| `limit / cursor / offset` | pagination | Limit defaults to 100 and accepts 1–1000. Pass nextCursor as cursor for the next page, keeping filters and sort unchanged. Offset is also supported. |

**Rank a larger sample by Sharpe ratio**

```sh
curl --fail-with-body \
  "${IMPLYRA_API_URL%/}/leaderboard/global?advanced=true&sortBy=sharpe&sortOrder=DESC&minPositions=50&limit=20"
```

## Read the measures correctly

| Name | Type | Description |
| --- | --- | --- |
| `overallPnl` | USD | Realized plus unrealized P&L. |
| `winRate / totalClosedPositions` | 0–1 / count | The closed-position win rate and its reported sample size. |
| `advanced.sharpeRatio / sortinoRatio / calmarRatio` | number \| null | Risk-adjusted measures calculated from the available cumulative P&L history. These describe P&L changes, not cash-flow-adjusted account returns. Current calculations clamp these ratios to −10…10. |
| `advanced.maxDrawdown` | 0–1 \| null | Peak-to-trough decline relative to cumulative P&L gains, with a $1 minimum denominator and a 0–1 clamp. Multiply by 100 to display percent. It is not an account-equity drawdown. |
| `advanced.winRateWeighted` | 0–1 \| null | Bought volume in profitable closed positions divided by bought volume across closed and active positions. Both volumes sum total_bought. This is not a conventional weighted win rate calculated only from closed positions; open positions also contribute to the denominator. |
| `advanced.roi` | ratio \| null | A backend return ratio. Multiply by 100 for percent and keep the underlying coverage visible; do not present it as an annualized return. |
| `advanced.smartScore / confidenceScore` | 0–100 \| null | Smart score is a composite heuristic. Confidence score reflects sample size and trading volume, not confidence that a future prediction will be correct. |
| `advanced.bestTag / lastTradeAt / isActive` | context | The category and activity context from the advanced-metrics dataset. lastTradeAt is its last observed trade, not a guarantee that the full trader record is current. |

> **Preserve the reporting context.** Advanced metrics can cover an older or different period from the overall leaderboard P&L. A recent ranking updatedAt does not mean each advanced field was recomputed then. Keep their available history and lastTradeAt visible. Fields may be null, and the source can emit zero for insufficient history; neither establishes low risk.

## Use a typed response

Download the OpenAPI file, generate types, then reference the response type directly. TypeScript describes the contract; it does not validate arbitrary JSON at runtime.

- [Download OpenAPI](https://implyra.com/docs/openapi.json): Generate a paths type for your application.

**Typed trader ranking**

```sh
pnpm dlx openapi-typescript implyra-openapi.json -o src/types/implyra.ts
```

```ts
import type { paths } from "./types/implyra";

type Rankings = paths["/leaderboard/global"]["get"]["responses"][200]["content"]["application/json"];
type Trader = Rankings["rows"][number];

const baseUrl = process.env.IMPLYRA_API_URL;
if (!baseUrl) throw new Error("Set IMPLYRA_API_URL");
const url = new URL(
  "leaderboard/global", baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`
);
url.search = new URLSearchParams({
  advanced: "true", sortBy: "sharpe", sortOrder: "DESC",
  minPositions: "50", limit: "20"
}).toString();

const response = await fetch(url, { signal: AbortSignal.timeout(15_000) });
if (!response.ok) throw new Error(`Implyra HTTP ${response.status}`);
const result: Rankings = await response.json();

function drawdownLabel(trader: Trader) {
  const fraction = trader.advanced?.maxDrawdown;
  return fraction == null ? "Unavailable" : `${(fraction * 100).toFixed(1)}%`;
}
console.log(result.rows.map(trader => ({
  address: trader.address,
  pnlUsd: trader.overallPnl,
  drawdown: drawdownLabel(trader)
})));
```

## Continue into the portfolio

Use rows[].address to open a profile and inspect positions. A ranking identifies a record to research; the portfolio and history provide the next layer of context.

- [Profiles & positions](https://implyra.com/docs/wallets): Portfolio, closed records, transactions and P&L history.
