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

# Leaderboard

leaderboardモジュール関連のデータをindexerでクエリするためのコードスニペット例。

## HTTP RESTを使用する

### leaderboardを取得する

```ts theme={null}
import { getNetworkEndpoints, Network } from "@injectivelabs/networks";
import { IndexerRestLeaderboardChronosApi } from "@injectivelabs/sdk-ts/client/indexer";

const endpoints = getNetworkEndpoints(Network.Testnet);
const indexerGrpcExplorerApi = new IndexerRestLeaderboardChronosApi(
  `${endpoints.chronos}/api/chronos/v1/leaderboard`
);

const SelectList = {
  Day: "1d",
  Week: "7d",
};

const resolution = SelectList.Day;

const leaderboard = await indexerGrpcExplorerApi.fetchLeaderboard(resolution);

console.log(leaderboard);
```
